@oxyhq/services 5.17.17 → 5.18.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 (618) hide show
  1. package/README.md +32 -38
  2. package/lib/commonjs/core/CrossDomainAuth.js +277 -0
  3. package/lib/commonjs/core/CrossDomainAuth.js.map +1 -0
  4. package/lib/commonjs/core/HttpService.js +82 -15
  5. package/lib/commonjs/core/HttpService.js.map +1 -1
  6. package/lib/commonjs/core/OxyServices.base.js +11 -3
  7. package/lib/commonjs/core/OxyServices.base.js.map +1 -1
  8. package/lib/commonjs/core/OxyServices.js +4 -1
  9. package/lib/commonjs/core/OxyServices.js.map +1 -1
  10. package/lib/commonjs/core/index.js +30 -0
  11. package/lib/commonjs/core/index.js.map +1 -1
  12. package/lib/commonjs/core/mixins/OxyServices.assets.js +16 -3
  13. package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
  14. package/lib/commonjs/core/mixins/OxyServices.auth.js +73 -32
  15. package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
  16. package/lib/commonjs/core/mixins/OxyServices.features.js +372 -0
  17. package/lib/commonjs/core/mixins/OxyServices.features.js.map +1 -0
  18. package/lib/commonjs/core/mixins/OxyServices.fedcm.js +289 -0
  19. package/lib/commonjs/core/mixins/OxyServices.fedcm.js.map +1 -0
  20. package/lib/commonjs/core/mixins/OxyServices.popup.js +352 -0
  21. package/lib/commonjs/core/mixins/OxyServices.popup.js.map +1 -0
  22. package/lib/commonjs/core/mixins/OxyServices.redirect.js +378 -0
  23. package/lib/commonjs/core/mixins/OxyServices.redirect.js.map +1 -0
  24. package/lib/commonjs/core/mixins/OxyServices.user.js +35 -24
  25. package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
  26. package/lib/commonjs/core/mixins/index.js +28 -15
  27. package/lib/commonjs/core/mixins/index.js.map +1 -1
  28. package/lib/commonjs/crypto/index.js +30 -0
  29. package/lib/commonjs/crypto/index.js.map +1 -1
  30. package/lib/commonjs/crypto/keyManager.js +902 -0
  31. package/lib/commonjs/crypto/keyManager.js.map +1 -0
  32. package/lib/commonjs/crypto/polyfill.js +14 -5
  33. package/lib/commonjs/crypto/polyfill.js.map +1 -1
  34. package/lib/commonjs/crypto/recoveryPhrase.js +152 -0
  35. package/lib/commonjs/crypto/recoveryPhrase.js.map +1 -0
  36. package/lib/commonjs/crypto/signatureService.js +289 -0
  37. package/lib/commonjs/crypto/signatureService.js.map +1 -0
  38. package/lib/commonjs/i18n/locales/en-US.json +1 -1
  39. package/lib/commonjs/index.js +40 -26
  40. package/lib/commonjs/index.js.map +1 -1
  41. package/lib/commonjs/models/interfaces.js +0 -15
  42. package/lib/commonjs/models/interfaces.js.map +1 -1
  43. package/lib/commonjs/ui/components/BottomSheetRouter.js +9 -1
  44. package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
  45. package/lib/commonjs/ui/components/GroupedItem.js +11 -1
  46. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  47. package/lib/commonjs/ui/components/Icon.js.map +1 -1
  48. package/lib/commonjs/ui/components/IconButton/utils.js.map +1 -1
  49. package/lib/commonjs/ui/components/OxyProvider.js +41 -11
  50. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  51. package/lib/commonjs/ui/components/SettingRow.js +17 -4
  52. package/lib/commonjs/ui/components/SettingRow.js.map +1 -1
  53. package/lib/commonjs/ui/components/TextField/Adornment/utils.js.map +1 -1
  54. package/lib/commonjs/ui/components/TextField/helpers.js.map +1 -1
  55. package/lib/commonjs/ui/components/TouchableRipple/utils.js.map +1 -1
  56. package/lib/commonjs/ui/components/Typography/AnimatedText.js.map +1 -1
  57. package/lib/commonjs/ui/components/feedback/FormInput.js +72 -0
  58. package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -0
  59. package/lib/commonjs/ui/components/feedback/ProgressIndicator.js +33 -0
  60. package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +1 -0
  61. package/lib/commonjs/ui/components/feedback/constants.js +59 -0
  62. package/lib/commonjs/ui/components/feedback/constants.js.map +1 -0
  63. package/lib/commonjs/ui/components/feedback/feedbackStyles.js +262 -0
  64. package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -0
  65. package/lib/commonjs/ui/components/feedback/index.js +54 -0
  66. package/lib/commonjs/ui/components/feedback/index.js.map +1 -0
  67. package/lib/commonjs/ui/components/feedback/types.js +6 -0
  68. package/lib/commonjs/ui/components/feedback/types.js.map +1 -0
  69. package/lib/commonjs/ui/components/feedback/useFeedbackForm.js +52 -0
  70. package/lib/commonjs/ui/components/feedback/useFeedbackForm.js.map +1 -0
  71. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +282 -0
  72. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -0
  73. package/lib/commonjs/ui/components/modals/index.js +14 -0
  74. package/lib/commonjs/ui/components/modals/index.js.map +1 -0
  75. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +309 -0
  76. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -0
  77. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +79 -0
  78. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -0
  79. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +108 -0
  80. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -0
  81. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +79 -0
  82. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -0
  83. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +176 -0
  84. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -0
  85. package/lib/commonjs/ui/components/payment/constants.js +53 -0
  86. package/lib/commonjs/ui/components/payment/constants.js.map +1 -0
  87. package/lib/commonjs/ui/components/payment/index.js +80 -0
  88. package/lib/commonjs/ui/components/payment/index.js.map +1 -0
  89. package/lib/commonjs/ui/components/payment/paymentStyles.js +409 -0
  90. package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -0
  91. package/lib/commonjs/ui/components/payment/types.js +6 -0
  92. package/lib/commonjs/ui/components/payment/types.js.map +1 -0
  93. package/lib/commonjs/ui/context/OxyContext.js +110 -199
  94. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  95. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +150 -19
  96. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  97. package/lib/commonjs/ui/context/hooks/useSessionManagement.js +279 -0
  98. package/lib/commonjs/ui/context/hooks/useSessionManagement.js.map +1 -0
  99. package/lib/commonjs/ui/hooks/index.js +26 -0
  100. package/lib/commonjs/ui/hooks/index.js.map +1 -1
  101. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +79 -72
  102. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  103. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +38 -51
  104. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  105. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +3 -3
  106. package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  107. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +18 -12
  108. package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
  109. package/lib/commonjs/ui/hooks/useAsyncAction.js +95 -0
  110. package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -0
  111. package/lib/commonjs/ui/hooks/useProfileEditing.js +3 -5
  112. package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
  113. package/lib/commonjs/ui/hooks/useSessionManagement.js +4 -8
  114. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  115. package/lib/commonjs/ui/hooks/useSessionSocket.js +162 -315
  116. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  117. package/lib/commonjs/ui/hooks/useSettingToggle.js +126 -0
  118. package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -0
  119. package/lib/commonjs/ui/hooks/useStorage.js +24 -58
  120. package/lib/commonjs/ui/hooks/useStorage.js.map +1 -1
  121. package/lib/commonjs/ui/index.js +50 -21
  122. package/lib/commonjs/ui/index.js.map +1 -1
  123. package/lib/commonjs/ui/navigation/routes.js +6 -1
  124. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  125. package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -4
  126. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  127. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +33 -30
  128. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  129. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +29 -24
  130. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  131. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
  132. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  133. package/lib/commonjs/ui/screens/FAQScreen.js +315 -0
  134. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -0
  135. package/lib/commonjs/ui/screens/FeedbackScreen.js +73 -590
  136. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  137. package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -7
  138. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  139. package/lib/commonjs/ui/screens/OxyAuthScreen.js +134 -66
  140. package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
  141. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +67 -1395
  142. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  143. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +6 -13
  144. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  145. package/lib/commonjs/ui/screens/ProfileScreen.js +13 -5
  146. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  147. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +16 -10
  148. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  149. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +23 -11
  150. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  151. package/lib/commonjs/ui/stores/accountStore.js +2 -4
  152. package/lib/commonjs/ui/stores/accountStore.js.map +1 -1
  153. package/lib/commonjs/ui/stores/authStore.js +45 -32
  154. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  155. package/lib/commonjs/ui/styles/spacing.js +54 -2
  156. package/lib/commonjs/ui/styles/spacing.js.map +1 -1
  157. package/lib/commonjs/ui/utils/avatarUtils.js +37 -41
  158. package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
  159. package/lib/commonjs/ui/utils/storageHelpers.js.map +1 -1
  160. package/lib/commonjs/utils/errorUtils.js +13 -0
  161. package/lib/commonjs/utils/errorUtils.js.map +1 -1
  162. package/lib/commonjs/utils/validationUtils.js +15 -1
  163. package/lib/commonjs/utils/validationUtils.js.map +1 -1
  164. package/lib/module/core/CrossDomainAuth.js +271 -0
  165. package/lib/module/core/CrossDomainAuth.js.map +1 -0
  166. package/lib/module/core/HttpService.js +82 -15
  167. package/lib/module/core/HttpService.js.map +1 -1
  168. package/lib/module/core/OxyServices.base.js +11 -4
  169. package/lib/module/core/OxyServices.base.js.map +1 -1
  170. package/lib/module/core/OxyServices.js +4 -1
  171. package/lib/module/core/OxyServices.js.map +1 -1
  172. package/lib/module/core/index.js +6 -1
  173. package/lib/module/core/index.js.map +1 -1
  174. package/lib/module/core/mixins/OxyServices.assets.js +16 -3
  175. package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
  176. package/lib/module/core/mixins/OxyServices.auth.js +73 -32
  177. package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
  178. package/lib/module/core/mixins/OxyServices.features.js +369 -0
  179. package/lib/module/core/mixins/OxyServices.features.js.map +1 -0
  180. package/lib/module/core/mixins/OxyServices.fedcm.js +286 -0
  181. package/lib/module/core/mixins/OxyServices.fedcm.js.map +1 -0
  182. package/lib/module/core/mixins/OxyServices.popup.js +349 -0
  183. package/lib/module/core/mixins/OxyServices.popup.js.map +1 -0
  184. package/lib/module/core/mixins/OxyServices.redirect.js +375 -0
  185. package/lib/module/core/mixins/OxyServices.redirect.js.map +1 -0
  186. package/lib/module/core/mixins/OxyServices.user.js +35 -24
  187. package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
  188. package/lib/module/core/mixins/index.js +16 -3
  189. package/lib/module/core/mixins/index.js.map +1 -1
  190. package/lib/module/crypto/index.js +8 -4
  191. package/lib/module/crypto/index.js.map +1 -1
  192. package/lib/module/crypto/keyManager.js +899 -0
  193. package/lib/module/crypto/keyManager.js.map +1 -0
  194. package/lib/module/crypto/polyfill.js +6 -5
  195. package/lib/module/crypto/polyfill.js.map +1 -1
  196. package/lib/module/crypto/recoveryPhrase.js +147 -0
  197. package/lib/module/crypto/recoveryPhrase.js.map +1 -0
  198. package/lib/module/crypto/signatureService.js +286 -0
  199. package/lib/module/crypto/signatureService.js.map +1 -0
  200. package/lib/module/i18n/locales/en-US.json +1 -1
  201. package/lib/module/index.js +6 -9
  202. package/lib/module/index.js.map +1 -1
  203. package/lib/module/models/interfaces.js +0 -15
  204. package/lib/module/models/interfaces.js.map +1 -1
  205. package/lib/module/ui/components/BottomSheetRouter.js +6 -2
  206. package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
  207. package/lib/module/ui/components/GroupedItem.js +11 -1
  208. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  209. package/lib/module/ui/components/Icon.js.map +1 -1
  210. package/lib/module/ui/components/IconButton/utils.js.map +1 -1
  211. package/lib/module/ui/components/OxyProvider.js +41 -11
  212. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  213. package/lib/module/ui/components/SettingRow.js +17 -4
  214. package/lib/module/ui/components/SettingRow.js.map +1 -1
  215. package/lib/module/ui/components/TextField/Adornment/utils.js.map +1 -1
  216. package/lib/module/ui/components/TextField/helpers.js.map +1 -1
  217. package/lib/module/ui/components/TouchableRipple/utils.js.map +1 -1
  218. package/lib/module/ui/components/Typography/AnimatedText.js.map +1 -1
  219. package/lib/module/ui/components/feedback/FormInput.js +67 -0
  220. package/lib/module/ui/components/feedback/FormInput.js.map +1 -0
  221. package/lib/module/ui/components/feedback/ProgressIndicator.js +28 -0
  222. package/lib/module/ui/components/feedback/ProgressIndicator.js.map +1 -0
  223. package/lib/module/ui/components/feedback/constants.js +55 -0
  224. package/lib/module/ui/components/feedback/constants.js.map +1 -0
  225. package/lib/module/ui/components/feedback/feedbackStyles.js +257 -0
  226. package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -0
  227. package/lib/module/ui/components/feedback/index.js +8 -0
  228. package/lib/module/ui/components/feedback/index.js.map +1 -0
  229. package/lib/module/ui/components/feedback/types.js +4 -0
  230. package/lib/module/ui/components/feedback/types.js.map +1 -0
  231. package/lib/module/ui/components/feedback/useFeedbackForm.js +47 -0
  232. package/lib/module/ui/components/feedback/useFeedbackForm.js.map +1 -0
  233. package/lib/module/ui/components/modals/DeleteAccountModal.js +276 -0
  234. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -0
  235. package/lib/module/ui/components/modals/index.js +4 -0
  236. package/lib/module/ui/components/modals/index.js.map +1 -0
  237. package/lib/module/ui/components/payment/PaymentDetailsStep.js +303 -0
  238. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -0
  239. package/lib/module/ui/components/payment/PaymentMethodStep.js +73 -0
  240. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -0
  241. package/lib/module/ui/components/payment/PaymentReviewStep.js +102 -0
  242. package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -0
  243. package/lib/module/ui/components/payment/PaymentSuccessStep.js +73 -0
  244. package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -0
  245. package/lib/module/ui/components/payment/PaymentSummaryStep.js +170 -0
  246. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -0
  247. package/lib/module/ui/components/payment/constants.js +47 -0
  248. package/lib/module/ui/components/payment/constants.js.map +1 -0
  249. package/lib/module/ui/components/payment/index.js +10 -0
  250. package/lib/module/ui/components/payment/index.js.map +1 -0
  251. package/lib/module/ui/components/payment/paymentStyles.js +404 -0
  252. package/lib/module/ui/components/payment/paymentStyles.js.map +1 -0
  253. package/lib/module/ui/components/payment/types.js +4 -0
  254. package/lib/module/ui/components/payment/types.js.map +1 -0
  255. package/lib/module/ui/context/OxyContext.js +112 -191
  256. package/lib/module/ui/context/OxyContext.js.map +1 -1
  257. package/lib/module/ui/context/hooks/useAuthOperations.js +150 -19
  258. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  259. package/lib/module/ui/context/hooks/useSessionManagement.js +274 -0
  260. package/lib/module/ui/context/hooks/useSessionManagement.js.map +1 -0
  261. package/lib/module/ui/hooks/index.js +2 -0
  262. package/lib/module/ui/hooks/index.js.map +1 -1
  263. package/lib/module/ui/hooks/mutations/useAccountMutations.js +80 -72
  264. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  265. package/lib/module/ui/hooks/queries/useAccountQueries.js +31 -44
  266. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  267. package/lib/module/ui/hooks/queries/useSecurityQueries.js +1 -1
  268. package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
  269. package/lib/module/ui/hooks/queries/useServicesQueries.js +13 -7
  270. package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
  271. package/lib/module/ui/hooks/useAsyncAction.js +89 -0
  272. package/lib/module/ui/hooks/useAsyncAction.js.map +1 -0
  273. package/lib/module/ui/hooks/useProfileEditing.js +3 -5
  274. package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
  275. package/lib/module/ui/hooks/useSessionManagement.js +4 -8
  276. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  277. package/lib/module/ui/hooks/useSessionSocket.js +162 -315
  278. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  279. package/lib/module/ui/hooks/useSettingToggle.js +120 -0
  280. package/lib/module/ui/hooks/useSettingToggle.js.map +1 -0
  281. package/lib/module/ui/hooks/useStorage.js +25 -59
  282. package/lib/module/ui/hooks/useStorage.js.map +1 -1
  283. package/lib/module/ui/index.js +15 -10
  284. package/lib/module/ui/index.js.map +1 -1
  285. package/lib/module/ui/navigation/routes.js +6 -1
  286. package/lib/module/ui/navigation/routes.js.map +1 -1
  287. package/lib/module/ui/screens/AccountCenterScreen.js +6 -4
  288. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  289. package/lib/module/ui/screens/AccountOverviewScreen.js +33 -30
  290. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  291. package/lib/module/ui/screens/AccountSettingsScreen.js +29 -24
  292. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  293. package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
  294. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  295. package/lib/module/ui/screens/FAQScreen.js +310 -0
  296. package/lib/module/ui/screens/FAQScreen.js.map +1 -0
  297. package/lib/module/ui/screens/FeedbackScreen.js +64 -581
  298. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  299. package/lib/module/ui/screens/HelpSupportScreen.js +8 -7
  300. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  301. package/lib/module/ui/screens/OxyAuthScreen.js +135 -68
  302. package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
  303. package/lib/module/ui/screens/PaymentGatewayScreen.js +67 -1397
  304. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  305. package/lib/module/ui/screens/PrivacySettingsScreen.js +6 -13
  306. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  307. package/lib/module/ui/screens/ProfileScreen.js +13 -5
  308. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  309. package/lib/module/ui/screens/SavesCollectionsScreen.js +16 -10
  310. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  311. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +23 -11
  312. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  313. package/lib/module/ui/stores/accountStore.js +2 -4
  314. package/lib/module/ui/stores/accountStore.js.map +1 -1
  315. package/lib/module/ui/stores/authStore.js +45 -32
  316. package/lib/module/ui/stores/authStore.js.map +1 -1
  317. package/lib/module/ui/styles/spacing.js +6 -2
  318. package/lib/module/ui/styles/spacing.js.map +1 -1
  319. package/lib/module/ui/utils/avatarUtils.js +37 -40
  320. package/lib/module/ui/utils/avatarUtils.js.map +1 -1
  321. package/lib/module/ui/utils/storageHelpers.js.map +1 -1
  322. package/lib/module/utils/errorUtils.js +7 -0
  323. package/lib/module/utils/errorUtils.js.map +1 -1
  324. package/lib/module/utils/validationUtils.js +13 -0
  325. package/lib/module/utils/validationUtils.js.map +1 -1
  326. package/lib/typescript/core/CrossDomainAuth.d.ts +161 -0
  327. package/lib/typescript/core/CrossDomainAuth.d.ts.map +1 -0
  328. package/lib/typescript/core/HttpService.d.ts +1 -1
  329. package/lib/typescript/core/HttpService.d.ts.map +1 -1
  330. package/lib/typescript/core/OxyServices.base.d.ts +0 -6
  331. package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
  332. package/lib/typescript/core/OxyServices.d.ts +5 -36
  333. package/lib/typescript/core/OxyServices.d.ts.map +1 -1
  334. package/lib/typescript/core/index.d.ts +4 -0
  335. package/lib/typescript/core/index.d.ts.map +1 -1
  336. package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
  337. package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
  338. package/lib/typescript/core/mixins/OxyServices.auth.d.ts +40 -20
  339. package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
  340. package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
  341. package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
  342. package/lib/typescript/core/mixins/OxyServices.features.d.ts +229 -0
  343. package/lib/typescript/core/mixins/OxyServices.features.d.ts.map +1 -0
  344. package/lib/typescript/core/mixins/OxyServices.fedcm.d.ts +195 -0
  345. package/lib/typescript/core/mixins/OxyServices.fedcm.d.ts.map +1 -0
  346. package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
  347. package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
  348. package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
  349. package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
  350. package/lib/typescript/core/mixins/OxyServices.popup.d.ts +206 -0
  351. package/lib/typescript/core/mixins/OxyServices.popup.d.ts.map +1 -0
  352. package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
  353. package/lib/typescript/core/mixins/OxyServices.redirect.d.ts +246 -0
  354. package/lib/typescript/core/mixins/OxyServices.redirect.d.ts.map +1 -0
  355. package/lib/typescript/core/mixins/OxyServices.security.d.ts.map +1 -1
  356. package/lib/typescript/core/mixins/OxyServices.user.d.ts +6 -4
  357. package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
  358. package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
  359. package/lib/typescript/core/mixins/index.d.ts +291 -9
  360. package/lib/typescript/core/mixins/index.d.ts.map +1 -1
  361. package/lib/typescript/crypto/index.d.ts +6 -3
  362. package/lib/typescript/crypto/index.d.ts.map +1 -1
  363. package/lib/typescript/crypto/keyManager.d.ts +190 -0
  364. package/lib/typescript/crypto/keyManager.d.ts.map +1 -0
  365. package/lib/typescript/crypto/polyfill.d.ts +4 -3
  366. package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
  367. package/lib/typescript/crypto/recoveryPhrase.d.ts +59 -0
  368. package/lib/typescript/crypto/recoveryPhrase.d.ts.map +1 -0
  369. package/lib/typescript/crypto/signatureService.d.ts +87 -0
  370. package/lib/typescript/crypto/signatureService.d.ts.map +1 -0
  371. package/lib/typescript/index.d.ts +5 -6
  372. package/lib/typescript/index.d.ts.map +1 -1
  373. package/lib/typescript/models/interfaces.d.ts +2 -14
  374. package/lib/typescript/models/interfaces.d.ts.map +1 -1
  375. package/lib/typescript/models/session.d.ts +0 -9
  376. package/lib/typescript/models/session.d.ts.map +1 -1
  377. package/lib/typescript/types/bip39.d.ts +32 -0
  378. package/lib/typescript/ui/components/BottomSheetRouter.d.ts +5 -0
  379. package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
  380. package/lib/typescript/ui/components/GroupedItem.d.ts +5 -1
  381. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  382. package/lib/typescript/ui/components/IconButton/utils.d.ts +1 -1
  383. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  384. package/lib/typescript/ui/components/SettingRow.d.ts +6 -0
  385. package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -1
  386. package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
  387. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts +1 -1
  388. package/lib/typescript/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
  389. package/lib/typescript/ui/components/TextField/helpers.d.ts +8 -8
  390. package/lib/typescript/ui/components/TextField/types.d.ts +1 -0
  391. package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
  392. package/lib/typescript/ui/components/feedback/FormInput.d.ts +20 -0
  393. package/lib/typescript/ui/components/feedback/FormInput.d.ts.map +1 -0
  394. package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts +11 -0
  395. package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts.map +1 -0
  396. package/lib/typescript/ui/components/feedback/constants.d.ts +5 -0
  397. package/lib/typescript/ui/components/feedback/constants.d.ts.map +1 -0
  398. package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts +280 -0
  399. package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts.map +1 -0
  400. package/lib/typescript/ui/components/feedback/index.d.ts +7 -0
  401. package/lib/typescript/ui/components/feedback/index.d.ts.map +1 -0
  402. package/lib/typescript/ui/components/feedback/types.d.ts +46 -0
  403. package/lib/typescript/ui/components/feedback/types.d.ts.map +1 -0
  404. package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts +9 -0
  405. package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts.map +1 -0
  406. package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts +19 -0
  407. package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts.map +1 -0
  408. package/lib/typescript/ui/components/modals/index.d.ts +2 -0
  409. package/lib/typescript/ui/components/modals/index.d.ts.map +1 -0
  410. package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts +21 -0
  411. package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -0
  412. package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts +14 -0
  413. package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts.map +1 -0
  414. package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts +16 -0
  415. package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts.map +1 -0
  416. package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts +10 -0
  417. package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -0
  418. package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts +15 -0
  419. package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -0
  420. package/lib/typescript/ui/components/payment/constants.d.ts +7 -0
  421. package/lib/typescript/ui/components/payment/constants.d.ts.map +1 -0
  422. package/lib/typescript/ui/components/payment/index.d.ts +9 -0
  423. package/lib/typescript/ui/components/payment/index.d.ts.map +1 -0
  424. package/lib/typescript/ui/components/payment/paymentStyles.d.ts +396 -0
  425. package/lib/typescript/ui/components/payment/paymentStyles.d.ts.map +1 -0
  426. package/lib/typescript/ui/components/payment/types.d.ts +40 -0
  427. package/lib/typescript/ui/components/payment/types.d.ts.map +1 -0
  428. package/lib/typescript/ui/components/types.d.ts +4 -0
  429. package/lib/typescript/ui/components/types.d.ts.map +1 -1
  430. package/lib/typescript/ui/context/OxyContext.d.ts +57 -3
  431. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  432. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +10 -3
  433. package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  434. package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts +41 -0
  435. package/lib/typescript/ui/context/hooks/useSessionManagement.d.ts.map +1 -0
  436. package/lib/typescript/ui/hooks/index.d.ts +2 -0
  437. package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
  438. package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  439. package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  440. package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
  441. package/lib/typescript/ui/hooks/useAsyncAction.d.ts +51 -0
  442. package/lib/typescript/ui/hooks/useAsyncAction.d.ts.map +1 -0
  443. package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
  444. package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -1
  445. package/lib/typescript/ui/hooks/useSessionSocket.d.ts +1 -2
  446. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  447. package/lib/typescript/ui/hooks/useSettingToggle.d.ts +55 -0
  448. package/lib/typescript/ui/hooks/useSettingToggle.d.ts.map +1 -0
  449. package/lib/typescript/ui/hooks/useStorage.d.ts +3 -9
  450. package/lib/typescript/ui/hooks/useStorage.d.ts.map +1 -1
  451. package/lib/typescript/ui/index.d.ts +6 -2
  452. package/lib/typescript/ui/index.d.ts.map +1 -1
  453. package/lib/typescript/ui/navigation/routes.d.ts +1 -1
  454. package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
  455. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  456. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  457. package/lib/typescript/ui/screens/FAQScreen.d.ts +5 -0
  458. package/lib/typescript/ui/screens/FAQScreen.d.ts.map +1 -0
  459. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
  460. package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
  461. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts +1 -1
  462. package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
  463. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +3 -15
  464. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  465. package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  466. package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
  467. package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  468. package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
  469. package/lib/typescript/ui/stores/accountStore.d.ts.map +1 -1
  470. package/lib/typescript/ui/stores/authStore.d.ts +8 -7
  471. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  472. package/lib/typescript/ui/styles/spacing.d.ts +5 -0
  473. package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
  474. package/lib/typescript/ui/types/navigation.d.ts +2 -1
  475. package/lib/typescript/ui/types/navigation.d.ts.map +1 -1
  476. package/lib/typescript/ui/utils/avatarUtils.d.ts +2 -13
  477. package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
  478. package/lib/typescript/ui/utils/storageHelpers.d.ts +0 -3
  479. package/lib/typescript/ui/utils/storageHelpers.d.ts.map +1 -1
  480. package/lib/typescript/utils/errorUtils.d.ts +6 -0
  481. package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
  482. package/lib/typescript/utils/validationUtils.d.ts +8 -0
  483. package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
  484. package/package.json +8 -7
  485. package/src/core/CrossDomainAuth.ts +307 -0
  486. package/src/core/HttpService.ts +99 -16
  487. package/src/core/OxyServices.base.ts +20 -3
  488. package/src/core/OxyServices.ts +7 -3
  489. package/src/core/index.ts +9 -1
  490. package/src/core/mixins/OxyServices.assets.ts +14 -3
  491. package/src/core/mixins/OxyServices.auth.ts +105 -36
  492. package/src/core/mixins/OxyServices.features.ts +428 -0
  493. package/src/core/mixins/OxyServices.fedcm.ts +315 -0
  494. package/src/core/mixins/OxyServices.popup.ts +402 -0
  495. package/src/core/mixins/OxyServices.redirect.ts +397 -0
  496. package/src/core/mixins/OxyServices.user.ts +39 -24
  497. package/src/core/mixins/index.ts +33 -14
  498. package/src/crypto/index.ts +16 -5
  499. package/src/crypto/keyManager.ts +966 -0
  500. package/src/crypto/polyfill.ts +6 -5
  501. package/src/crypto/recoveryPhrase.ts +166 -0
  502. package/src/crypto/signatureService.ts +323 -0
  503. package/src/i18n/locales/en-US.json +1 -1
  504. package/src/index.ts +19 -15
  505. package/src/models/interfaces.ts +4 -16
  506. package/src/models/session.ts +2 -11
  507. package/src/types/bip39.d.ts +32 -0
  508. package/src/ui/components/BottomSheetRouter.tsx +6 -1
  509. package/src/ui/components/GroupedItem.tsx +19 -1
  510. package/src/ui/components/Icon.tsx +1 -1
  511. package/src/ui/components/IconButton/utils.ts +1 -1
  512. package/src/ui/components/OxyProvider.tsx +44 -12
  513. package/src/ui/components/SettingRow.tsx +26 -4
  514. package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
  515. package/src/ui/components/TextField/Adornment/utils.ts +2 -2
  516. package/src/ui/components/TextField/helpers.tsx +10 -10
  517. package/src/ui/components/TextField/types.tsx +1 -1
  518. package/src/ui/components/TouchableRipple/utils.ts +2 -2
  519. package/src/ui/components/Typography/AnimatedText.tsx +2 -2
  520. package/src/ui/components/feedback/FormInput.tsx +84 -0
  521. package/src/ui/components/feedback/ProgressIndicator.tsx +35 -0
  522. package/src/ui/components/feedback/constants.ts +22 -0
  523. package/src/ui/components/feedback/feedbackStyles.ts +247 -0
  524. package/src/ui/components/feedback/index.ts +6 -0
  525. package/src/ui/components/feedback/types.ts +52 -0
  526. package/src/ui/components/feedback/useFeedbackForm.ts +44 -0
  527. package/src/ui/components/modals/DeleteAccountModal.tsx +294 -0
  528. package/src/ui/components/modals/index.ts +1 -0
  529. package/src/ui/components/payment/PaymentDetailsStep.tsx +222 -0
  530. package/src/ui/components/payment/PaymentMethodStep.tsx +89 -0
  531. package/src/ui/components/payment/PaymentReviewStep.tsx +126 -0
  532. package/src/ui/components/payment/PaymentSuccessStep.tsx +71 -0
  533. package/src/ui/components/payment/PaymentSummaryStep.tsx +159 -0
  534. package/src/ui/components/payment/constants.ts +39 -0
  535. package/src/ui/components/payment/index.ts +9 -0
  536. package/src/ui/components/payment/paymentStyles.ts +397 -0
  537. package/src/ui/components/payment/types.ts +45 -0
  538. package/src/ui/components/types.tsx +6 -0
  539. package/src/ui/context/OxyContext.tsx +173 -195
  540. package/src/ui/context/hooks/useAuthOperations.ts +177 -36
  541. package/src/ui/context/hooks/useSessionManagement.ts +399 -0
  542. package/src/ui/hooks/index.ts +3 -1
  543. package/src/ui/hooks/mutations/useAccountMutations.ts +83 -76
  544. package/src/ui/hooks/queries/useAccountQueries.ts +29 -35
  545. package/src/ui/hooks/queries/useSecurityQueries.ts +1 -1
  546. package/src/ui/hooks/queries/useServicesQueries.ts +14 -6
  547. package/src/ui/hooks/useAsyncAction.ts +129 -0
  548. package/src/ui/hooks/useProfileEditing.ts +3 -3
  549. package/src/ui/hooks/useSessionManagement.ts +5 -10
  550. package/src/ui/hooks/useSessionSocket.ts +46 -175
  551. package/src/ui/hooks/useSettingToggle.ts +147 -0
  552. package/src/ui/hooks/useStorage.ts +24 -76
  553. package/src/ui/index.ts +22 -13
  554. package/src/ui/navigation/routes.ts +8 -2
  555. package/src/ui/screens/AccountCenterScreen.tsx +4 -4
  556. package/src/ui/screens/AccountOverviewScreen.tsx +36 -38
  557. package/src/ui/screens/AccountSettingsScreen.tsx +34 -37
  558. package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
  559. package/src/ui/screens/FAQScreen.tsx +332 -0
  560. package/src/ui/screens/FeedbackScreen.tsx +91 -626
  561. package/src/ui/screens/HelpSupportScreen.tsx +7 -5
  562. package/src/ui/screens/OxyAuthScreen.tsx +138 -64
  563. package/src/ui/screens/PaymentGatewayScreen.tsx +96 -1275
  564. package/src/ui/screens/PrivacySettingsScreen.tsx +6 -12
  565. package/src/ui/screens/ProfileScreen.tsx +11 -6
  566. package/src/ui/screens/SavesCollectionsScreen.tsx +19 -10
  567. package/src/ui/screens/karma/KarmaCenterScreen.tsx +10 -10
  568. package/src/ui/stores/accountStore.ts +1 -11
  569. package/src/ui/stores/authStore.ts +43 -44
  570. package/src/ui/styles/spacing.ts +15 -2
  571. package/src/ui/types/navigation.ts +2 -2
  572. package/src/ui/utils/avatarUtils.ts +39 -46
  573. package/src/ui/utils/storageHelpers.ts +0 -4
  574. package/src/utils/__tests__/validationUtils.test.ts +16 -1
  575. package/src/utils/errorUtils.ts +8 -1
  576. package/src/utils/validationUtils.ts +12 -0
  577. package/lib/commonjs/core/services/SessionService.js +0 -163
  578. package/lib/commonjs/core/services/SessionService.js.map +0 -1
  579. package/lib/commonjs/core/services/TokenService.js +0 -220
  580. package/lib/commonjs/core/services/TokenService.js.map +0 -1
  581. package/lib/commonjs/crypto/types.js +0 -2
  582. package/lib/commonjs/crypto/types.js.map +0 -1
  583. package/lib/commonjs/ui/context/OxyContextBase.js +0 -21
  584. package/lib/commonjs/ui/context/OxyContextBase.js.map +0 -1
  585. package/lib/commonjs/ui/context/hooks/useStorage.js +0 -79
  586. package/lib/commonjs/ui/context/hooks/useStorage.js.map +0 -1
  587. package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -56
  588. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
  589. package/lib/module/core/services/SessionService.js +0 -159
  590. package/lib/module/core/services/SessionService.js.map +0 -1
  591. package/lib/module/core/services/TokenService.js +0 -217
  592. package/lib/module/core/services/TokenService.js.map +0 -1
  593. package/lib/module/crypto/types.js +0 -2
  594. package/lib/module/crypto/types.js.map +0 -1
  595. package/lib/module/ui/context/OxyContextBase.js +0 -16
  596. package/lib/module/ui/context/OxyContextBase.js.map +0 -1
  597. package/lib/module/ui/context/hooks/useStorage.js +0 -74
  598. package/lib/module/ui/context/hooks/useStorage.js.map +0 -1
  599. package/lib/module/ui/hooks/useAvatarPicker.js +0 -50
  600. package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
  601. package/lib/typescript/core/services/SessionService.d.ts +0 -78
  602. package/lib/typescript/core/services/SessionService.d.ts.map +0 -1
  603. package/lib/typescript/core/services/TokenService.d.ts +0 -72
  604. package/lib/typescript/core/services/TokenService.d.ts.map +0 -1
  605. package/lib/typescript/crypto/types.d.ts +0 -22
  606. package/lib/typescript/crypto/types.d.ts.map +0 -1
  607. package/lib/typescript/ui/context/OxyContextBase.d.ts +0 -63
  608. package/lib/typescript/ui/context/OxyContextBase.d.ts.map +0 -1
  609. package/lib/typescript/ui/context/hooks/useStorage.d.ts +0 -22
  610. package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +0 -1
  611. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -19
  612. package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
  613. package/src/core/services/SessionService.ts +0 -173
  614. package/src/core/services/TokenService.ts +0 -237
  615. package/src/crypto/types.ts +0 -23
  616. package/src/ui/context/OxyContextBase.tsx +0 -78
  617. package/src/ui/context/hooks/useStorage.ts +0 -104
  618. package/src/ui/hooks/useAvatarPicker.ts +0 -61
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_elliptic","require","_reactNative","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SecureStore","ExpoCrypto","ec","EC","STORAGE_KEYS","PRIVATE_KEY","PUBLIC_KEY","BACKUP_PRIVATE_KEY","BACKUP_PUBLIC_KEY","BACKUP_TIMESTAMP","SHARED_PRIVATE_KEY","SHARED_PUBLIC_KEY","SHARED_SESSION_TOKEN","SHARED_SESSION_ID","IOS_KEYCHAIN_GROUP","ANDROID_ACCOUNT_TYPE","initSecureStore","Promise","resolve","then","error","errorMessage","Error","message","String","isReactNative","navigator","product","isNodeJS","process","versions","node","isWebPlatform","Platform","OS","window","initExpoCrypto","uint8ArrayToHex","bytes","Array","from","map","b","toString","padStart","join","getSecureRandomBytes","length","Crypto","getRandomBytes","getCrypto","Function","crypto","Uint8Array","randomBytes","KeyManager","cachedPublicKey","cachedHasIdentity","cachedSharedPublicKey","cachedHasSharedIdentity","invalidateCache","invalidateSharedCache","generateKeyPairSync","keyPair","genKeyPair","privateKey","getPrivate","publicKey","getPublic","generateKeyPair","privateKeyHex","keyFromPrivate","createSharedIdentity","store","setItemAsync","keychainAccessible","WHEN_UNLOCKED_THIS_DEVICE_ONLY","keychainAccessGroup","__DEV__","console","log","getSharedPublicKey","getItemAsync","warn","getSharedPrivateKey","hasSharedIdentity","hasShared","importSharedIdentity","storeSharedSession","sessionId","accessToken","WHEN_UNLOCKED","getSharedSession","clearSharedSession","deleteItemAsync","migrateToSharedIdentity","getPrivateKey","createIdentity","importKeyPair","getPublicKey","hasIdentity","deleteIdentity","skipBackup","force","userConfirmed","backupSuccess","backupIdentity","backupError","Date","now","verifyIdentityIntegrity","isValidPrivateKey","isValidPublicKey","derivedPublicKey","derivePublicKey","getKeyPairObject","restoreIdentityFromBackup","backupPrivateKey","backupPublicKey","restored","keyFromPublic","shortenPublicKey","slice","exports","_default"],"sourceRoot":"../../../src","sources":["crypto/keyManager.ts"],"mappings":";;;;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B,EAAW;IACpD,IAAI;MACF,MAAMF,OAAO,GAAG7D,EAAE,CAACqE,cAAc,CAACN,UAAU,CAAC;MAC7C;MACAF,OAAO,CAACK,SAAS,CAAC,KAAK,CAAC;MACxB,OAAO,IAAI;IACb,CAAC,CAAC,MAAM;MACN,OAAO,KAAK;IACd;EACF;;EAEA;AACF;AACA;AACA;EACE,OAAOqD,gBAAgBA,CAACtD,SAAiB,EAAU;IACjD,IAAIA,SAAS,CAACpB,MAAM,IAAI,EAAE,EAAE,OAAOoB,SAAS;IAC5C,OAAO,GAAGA,SAAS,CAACuD,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAMvD,SAAS,CAACuD,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;EAC5D;AACF;AAACC,OAAA,CAAApE,UAAA,GAAAA,UAAA;AAAA,IAAAqE,QAAA,GAAAD,OAAA,CAAApI,OAAA,GAEcgE,UAAU","ignoreList":[]}
@@ -1,5 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Buffer", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _buffer.Buffer;
10
+ }
11
+ });
3
12
  var _buffer = require("buffer");
4
13
  /**
5
14
  * Crypto Polyfills for React Native
@@ -8,12 +17,12 @@ var _buffer = require("buffer");
8
17
  * before any crypto operations are performed.
9
18
  *
10
19
  * Polyfills included:
11
- * - Buffer: Required by crypto libraries
12
- * - crypto.getRandomValues: Required for secure random number generation
20
+ * - Buffer: Required by bip39 and other crypto libraries
21
+ * - crypto.getRandomValues: Required by bip39 for secure random number generation
13
22
  */
14
23
 
15
24
  // Import Buffer polyfill for React Native compatibility
16
- // Some crypto libraries depend on Buffer which isn't available in React Native
25
+ // Libraries like bip39 depend on Buffer which isn't available in React Native
17
26
 
18
27
  // Get the global object in a cross-platform way
19
28
  const getGlobalObject = () => {
@@ -31,7 +40,7 @@ if (!globalObject.Buffer) {
31
40
  }
32
41
 
33
42
  // Polyfill crypto.getRandomValues for React Native
34
- // This is required by crypto libraries for secure random number generation
43
+ // This is required by bip39 and other crypto libraries
35
44
 
36
45
  // Cache for expo-crypto module
37
46
  let expoCryptoModule = null;
@@ -73,5 +82,5 @@ if (typeof globalObject.crypto === 'undefined') {
73
82
  globalObject.crypto.getRandomValues = cryptoPolyfill.getRandomValues;
74
83
  }
75
84
 
76
- // No longer re-exporting `Buffer` from this module; import from 'buffer' where needed.
85
+ // Re-export Buffer for convenience
77
86
  //# sourceMappingURL=polyfill.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_buffer","require","getGlobalObject","globalThis","global","window","self","globalObject","Buffer","expoCryptoModule","getRandomBytesSync","byteCount","Error","cryptoModule","getRandomBytes","cryptoPolyfill","getRandomValues","array","bytes","byteLength","uint8View","Uint8Array","buffer","byteOffset","set","crypto"],"sourceRoot":"../../../src","sources":["crypto/polyfill.ts"],"mappings":";;AAaA,IAAAA,OAAA,GAAAC,OAAA;AAbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAGA;AACA,MAAMC,eAAe,GAAGA,CAAA,KAAyB;EAC/C,IAAI,OAAOC,UAAU,KAAK,WAAW,EAAE,OAAOA,UAAU;EACxD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAOA,MAAM;EAChD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAOA,MAAM;EAChD,IAAI,OAAOC,IAAI,KAAK,WAAW,EAAE,OAAOA,IAAI;EAC5C,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAMC,YAAY,GAAGL,eAAe,CAAC,CAAC;;AAEtC;AACA,IAAI,CAACK,YAAY,CAACC,MAAM,EAAE;EACvBD,YAAY,CAA0CC,MAAM,GAAGA,cAAM;AACxE;;AAEA;AACA;;AAKA;AACA,IAAIC,gBAAqD,GAAG,IAAI;;AAEhE;AACA;AACA;AACA;AACA,SAASC,kBAAkBA,CAACC,SAAiB,EAAc;EACzD,IAAI,CAACF,gBAAgB,EAAE;IACrB;IACA,IAAI;MACF;MACAA,gBAAgB,GAAGR,OAAO,CAAC,aAAa,CAAC;IAC3C,CAAC,CAAC,MAAM;MACN,MAAM,IAAIW,KAAK,CAAC,6DAA6D,CAAC;IAChF;EACF;EACA;EACA,MAAMC,YAAY,GAAGJ,gBAAgB;EACrC,IAAI,CAACI,YAAY,EAAE;IACjB,MAAM,IAAID,KAAK,CAAC,mCAAmC,CAAC;EACtD;EACA,OAAOC,YAAY,CAACC,cAAc,CAACH,SAAS,CAAC;AAC/C;AAEA,MAAMI,cAA0B,GAAG;EACjCC,eAAeA,CAA4BC,KAAQ,EAAK;IACtD,MAAMC,KAAK,GAAGR,kBAAkB,CAACO,KAAK,CAACE,UAAU,CAAC;IAClD,MAAMC,SAAS,GAAG,IAAIC,UAAU,CAACJ,KAAK,CAACK,MAAM,EAAEL,KAAK,CAACM,UAAU,EAAEN,KAAK,CAACE,UAAU,CAAC;IAClFC,SAAS,CAACI,GAAG,CAACN,KAAK,CAAC;IACpB,OAAOD,KAAK;EACd;AACF,CAAC;;AAED;AACA,IAAI,OAAOV,YAAY,CAACkB,MAAM,KAAK,WAAW,EAAE;EAC7ClB,YAAY,CAAuCkB,MAAM,GAAGV,cAAc;AAC7E,CAAC,MAAM,IAAI,OAAOR,YAAY,CAACkB,MAAM,CAACT,eAAe,KAAK,UAAU,EAAE;EACnET,YAAY,CAACkB,MAAM,CAAgBT,eAAe,GAAGD,cAAc,CAACC,eAAe;AACtF;;AAEA","ignoreList":[]}
1
+ {"version":3,"names":["_buffer","require","getGlobalObject","globalThis","global","window","self","globalObject","Buffer","expoCryptoModule","getRandomBytesSync","byteCount","Error","cryptoModule","getRandomBytes","cryptoPolyfill","getRandomValues","array","bytes","byteLength","uint8View","Uint8Array","buffer","byteOffset","set","crypto"],"sourceRoot":"../../../src","sources":["crypto/polyfill.ts"],"mappings":";;;;;;;;;;;AAaA,IAAAA,OAAA,GAAA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AAC;IAClFC,SAAS,CAACI,GAAG,CAACN,KAAK,CAAC;IACpB,OAAOD,KAAK;EACd;AACF,CAAC;;AAED;AACA,IAAI,OAAOV,YAAY,CAACkB,MAAM,KAAK,WAAW,EAAE;EAC7ClB,YAAY,CAAuCkB,MAAM,GAAGV,cAAc;AAC7E,CAAC,MAAM,IAAI,OAAOR,YAAY,CAACkB,MAAM,CAACT,eAAe,KAAK,UAAU,EAAE;EACnET,YAAY,CAACkB,MAAM,CAAgBT,eAAe,GAAGD,cAAc,CAACC,eAAe;AACtF;;AAEA","ignoreList":[]}
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.RecoveryPhraseService = void 0;
7
+ var bip39 = _interopRequireWildcard(require("bip39"));
8
+ var _keyManager = require("./keyManager");
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * Recovery Phrase Service - BIP39 Mnemonic Generation
12
+ *
13
+ * Handles generation and restoration of recovery phrases (mnemonic seeds)
14
+ * for backing up and restoring user identities.
15
+ *
16
+ * Note: This module requires the polyfill to be loaded first (done via crypto/index.ts)
17
+ */
18
+
19
+ /**
20
+ * Convert Uint8Array or array-like to hexadecimal string
21
+ * Works in both Node.js and React Native without depending on Buffer
22
+ */
23
+ function toHex(data) {
24
+ // Convert to array of numbers if needed
25
+ const bytes = data instanceof Uint8Array ? data : new Uint8Array(data);
26
+ return Array.from(bytes).map(b => b.toString(16).padStart(2, '0')).join('');
27
+ }
28
+ class RecoveryPhraseService {
29
+ /**
30
+ * Generate a new identity with a recovery phrase
31
+ * Returns the mnemonic phrase (should only be shown once to the user)
32
+ */
33
+ static async generateIdentityWithRecovery() {
34
+ // Generate 128-bit entropy for 12-word mnemonic
35
+ const mnemonic = bip39.generateMnemonic(128);
36
+
37
+ // Derive private key from mnemonic
38
+ // Using the seed directly as the private key (simplified approach)
39
+ const seed = await bip39.mnemonicToSeed(mnemonic);
40
+
41
+ // Use first 32 bytes of seed as private key
42
+ const seedSlice = seed.subarray ? seed.subarray(0, 32) : seed.slice(0, 32);
43
+ const privateKeyHex = toHex(seedSlice);
44
+
45
+ // Import the derived key pair
46
+ const publicKey = await _keyManager.KeyManager.importKeyPair(privateKeyHex);
47
+ return {
48
+ phrase: mnemonic,
49
+ words: mnemonic.split(' '),
50
+ publicKey
51
+ };
52
+ }
53
+
54
+ /**
55
+ * Generate a 24-word recovery phrase for higher security
56
+ */
57
+ static async generateIdentityWithRecovery24() {
58
+ // Generate 256-bit entropy for 24-word mnemonic
59
+ const mnemonic = bip39.generateMnemonic(256);
60
+ const seed = await bip39.mnemonicToSeed(mnemonic);
61
+ const seedSlice = seed.subarray ? seed.subarray(0, 32) : seed.slice(0, 32);
62
+ const privateKeyHex = toHex(seedSlice);
63
+ const publicKey = await _keyManager.KeyManager.importKeyPair(privateKeyHex);
64
+ return {
65
+ phrase: mnemonic,
66
+ words: mnemonic.split(' '),
67
+ publicKey
68
+ };
69
+ }
70
+
71
+ /**
72
+ * Restore an identity from a recovery phrase
73
+ */
74
+ static async restoreFromPhrase(phrase) {
75
+ // Normalize and validate the phrase
76
+ const normalizedPhrase = phrase.trim().toLowerCase();
77
+ if (!bip39.validateMnemonic(normalizedPhrase)) {
78
+ throw new Error('Invalid recovery phrase. Please check the words and try again.');
79
+ }
80
+
81
+ // Derive the same private key from the mnemonic
82
+ const seed = await bip39.mnemonicToSeed(normalizedPhrase);
83
+ const seedSlice = seed.subarray ? seed.subarray(0, 32) : seed.slice(0, 32);
84
+ const privateKeyHex = toHex(seedSlice);
85
+
86
+ // Import and store the key pair
87
+ const publicKey = await _keyManager.KeyManager.importKeyPair(privateKeyHex);
88
+ return publicKey;
89
+ }
90
+
91
+ /**
92
+ * Validate a recovery phrase without importing it
93
+ */
94
+ static validatePhrase(phrase) {
95
+ const normalizedPhrase = phrase.trim().toLowerCase();
96
+ return bip39.validateMnemonic(normalizedPhrase);
97
+ }
98
+
99
+ /**
100
+ * Get the word list for autocomplete/validation
101
+ */
102
+ static getWordList() {
103
+ return bip39.wordlists.english;
104
+ }
105
+
106
+ /**
107
+ * Check if a word is valid in the BIP39 word list
108
+ */
109
+ static isValidWord(word) {
110
+ return bip39.wordlists.english.includes(word.toLowerCase());
111
+ }
112
+
113
+ /**
114
+ * Get suggestions for a partial word
115
+ */
116
+ static getSuggestions(partial, limit = 5) {
117
+ const lowerPartial = partial.toLowerCase();
118
+ return bip39.wordlists.english.filter(word => word.startsWith(lowerPartial)).slice(0, limit);
119
+ }
120
+
121
+ /**
122
+ * Derive the public key from a phrase without storing
123
+ * Useful for verification before importing
124
+ */
125
+ static async derivePublicKeyFromPhrase(phrase) {
126
+ const normalizedPhrase = phrase.trim().toLowerCase();
127
+ if (!bip39.validateMnemonic(normalizedPhrase)) {
128
+ throw new Error('Invalid recovery phrase');
129
+ }
130
+ const seed = await bip39.mnemonicToSeed(normalizedPhrase);
131
+ const seedSlice = seed.subarray ? seed.subarray(0, 32) : seed.slice(0, 32);
132
+ const privateKeyHex = toHex(seedSlice);
133
+ return _keyManager.KeyManager.derivePublicKey(privateKeyHex);
134
+ }
135
+
136
+ /**
137
+ * Convert a phrase to its word array
138
+ */
139
+ static phraseToWords(phrase) {
140
+ return phrase.trim().toLowerCase().split(/\s+/);
141
+ }
142
+
143
+ /**
144
+ * Convert a word array to a phrase string
145
+ */
146
+ static wordsToPhrase(words) {
147
+ return words.map(w => w.toLowerCase().trim()).join(' ');
148
+ }
149
+ }
150
+ exports.RecoveryPhraseService = RecoveryPhraseService;
151
+ var _default = exports.default = RecoveryPhraseService;
152
+ //# sourceMappingURL=recoveryPhrase.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["bip39","_interopRequireWildcard","require","_keyManager","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","toHex","data","bytes","Uint8Array","Array","from","map","b","toString","padStart","join","RecoveryPhraseService","generateIdentityWithRecovery","mnemonic","generateMnemonic","seed","mnemonicToSeed","seedSlice","subarray","slice","privateKeyHex","publicKey","KeyManager","importKeyPair","phrase","words","split","generateIdentityWithRecovery24","restoreFromPhrase","normalizedPhrase","trim","toLowerCase","validateMnemonic","Error","validatePhrase","getWordList","wordlists","english","isValidWord","word","includes","getSuggestions","partial","limit","lowerPartial","filter","startsWith","derivePublicKeyFromPhrase","derivePublicKey","phraseToWords","wordsToPhrase","w","exports","_default"],"sourceRoot":"../../../src","sources":["crypto/recoveryPhrase.ts"],"mappings":";;;;;;AASA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAA0C,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CA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,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC;IAEpD,IAAI,CAACtD,KAAK,CAACuD,gBAAgB,CAACH,gBAAgB,CAAC,EAAE;MAC7C,MAAM,IAAII,KAAK,CAAC,yBAAyB,CAAC;IAC5C;IAEA,MAAMlB,IAAI,GAAG,MAAMtC,KAAK,CAACuC,cAAc,CAACa,gBAAgB,CAAC;IACzD,MAAMZ,SAAS,GAAGF,IAAI,CAACG,QAAQ,GAAGH,IAAI,CAACG,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,GAAGH,IAAI,CAACI,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1E,MAAMC,aAAa,GAAGpB,KAAK,CAACiB,SAAS,CAAC;IAEtC,OAAOK,sBAAU,CAAC0B,eAAe,CAAC5B,aAAa,CAAC;EAClD;;EAEA;AACF;AACA;EACE,OAAO6B,aAAaA,CAACzB,MAAc,EAAY;IAC7C,OAAOA,MAAM,CAACM,IAAI,CAAC,CAAC,CAACC,WAAW,CAAC,CAAC,CAACL,KAAK,CAAC,KAAK,CAAC;EACjD;;EAEA;AACF;AACA;EACE,OAAOwB,aAAaA,CAACzB,KAAe,EAAU;IAC5C,OAAOA,KAAK,CAACnB,GAAG,CAAC6C,CAAC,IAAIA,CAAC,CAACpB,WAAW,CAAC,CAAC,CAACD,IAAI,CAAC,CAAC,CAAC,CAACpB,IAAI,CAAC,GAAG,CAAC;EACzD;AACF;AAAC0C,OAAA,CAAAzC,qBAAA,GAAAA,qBAAA;AAAA,IAAA0C,QAAA,GAAAD,OAAA,CAAA7D,OAAA,GAEcoB,qBAAqB","ignoreList":[]}
@@ -0,0 +1,289 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.SignatureService = void 0;
7
+ var _elliptic = require("elliptic");
8
+ var _keyManager = require("./keyManager");
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /**
10
+ * Signature Service - ECDSA Digital Signatures
11
+ *
12
+ * Handles signing and verification of messages using ECDSA secp256k1.
13
+ * Used for authenticating requests and proving identity ownership.
14
+ */
15
+ // Lazy import for expo-crypto
16
+ let ExpoCrypto = null;
17
+ const ec = new _elliptic.ec('secp256k1');
18
+
19
+ /**
20
+ * Check if we're in a React Native environment
21
+ */
22
+ function isReactNative() {
23
+ return typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
24
+ }
25
+
26
+ /**
27
+ * Check if we're in a Node.js environment
28
+ */
29
+ function isNodeJS() {
30
+ return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
31
+ }
32
+
33
+ /**
34
+ * Initialize expo-crypto module
35
+ */
36
+ async function initExpoCrypto() {
37
+ if (!ExpoCrypto) {
38
+ ExpoCrypto = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-crypto')));
39
+ }
40
+ return ExpoCrypto;
41
+ }
42
+
43
+ /**
44
+ * Compute SHA-256 hash of a string
45
+ */
46
+ async function sha256(message) {
47
+ // In React Native, always use expo-crypto
48
+ if (isReactNative() || !isNodeJS()) {
49
+ const Crypto = await initExpoCrypto();
50
+ return Crypto.digestStringAsync(Crypto.CryptoDigestAlgorithm.SHA256, message);
51
+ }
52
+
53
+ // In Node.js, use Node's crypto module
54
+ // Use Function constructor to prevent Metro bundler from statically analyzing this require
55
+ // This ensures the require is only evaluated in Node.js runtime, not during Metro bundling
56
+ try {
57
+ // eslint-disable-next-line @typescript-eslint/no-implied-eval
58
+ const getCrypto = new Function('return require("crypto")');
59
+ const crypto = getCrypto();
60
+ return crypto.createHash('sha256').update(message).digest('hex');
61
+ } catch (error) {
62
+ // Fallback to expo-crypto if Node crypto fails
63
+ const Crypto = await initExpoCrypto();
64
+ return Crypto.digestStringAsync(Crypto.CryptoDigestAlgorithm.SHA256, message);
65
+ }
66
+ }
67
+ class SignatureService {
68
+ /**
69
+ * Generate a random challenge string (for offline use)
70
+ * Uses expo-crypto in React Native, crypto.randomBytes in Node.js
71
+ */
72
+ static async generateChallenge() {
73
+ if (isReactNative() || !isNodeJS()) {
74
+ // Use expo-crypto for React Native (expo-random is deprecated)
75
+ const Crypto = await initExpoCrypto();
76
+ const randomBytes = await Crypto.getRandomBytesAsync(32);
77
+ return Array.from(randomBytes).map(b => b.toString(16).padStart(2, '0')).join('');
78
+ }
79
+
80
+ // Node.js fallback
81
+ try {
82
+ // eslint-disable-next-line @typescript-eslint/no-implied-eval
83
+ const getCrypto = new Function('return require("crypto")');
84
+ const crypto = getCrypto();
85
+ return crypto.randomBytes(32).toString('hex');
86
+ } catch (error) {
87
+ // Fallback to expo-crypto if Node crypto fails
88
+ const Crypto = await initExpoCrypto();
89
+ const randomBytes = await Crypto.getRandomBytesAsync(32);
90
+ return Array.from(randomBytes).map(b => b.toString(16).padStart(2, '0')).join('');
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Hash a message using SHA-256
96
+ */
97
+ static async hashMessage(message) {
98
+ return sha256(message);
99
+ }
100
+
101
+ /**
102
+ * Sign a message using the stored private key
103
+ * Returns the signature in DER format (hex encoded)
104
+ */
105
+ static async sign(message) {
106
+ const keyPair = await _keyManager.KeyManager.getKeyPairObject();
107
+ if (!keyPair) {
108
+ throw new Error('No identity found. Please create or import an identity first.');
109
+ }
110
+ const messageHash = await sha256(message);
111
+ const signature = keyPair.sign(messageHash);
112
+ return signature.toDER('hex');
113
+ }
114
+
115
+ /**
116
+ * Sign a message with an explicit private key (without storing)
117
+ * Useful for one-time operations or testing
118
+ */
119
+ static async signWithKey(message, privateKey) {
120
+ const keyPair = ec.keyFromPrivate(privateKey);
121
+ const messageHash = await sha256(message);
122
+ const signature = keyPair.sign(messageHash);
123
+ return signature.toDER('hex');
124
+ }
125
+
126
+ /**
127
+ * Verify a signature against a message and public key
128
+ */
129
+ static async verify(message, signature, publicKey) {
130
+ try {
131
+ const key = ec.keyFromPublic(publicKey, 'hex');
132
+ const messageHash = await sha256(message);
133
+ return key.verify(messageHash, signature);
134
+ } catch {
135
+ return false;
136
+ }
137
+ }
138
+
139
+ /**
140
+ * Synchronous verification (for Node.js backend)
141
+ * Uses crypto module directly for hashing
142
+ * Note: This method should only be used in Node.js environments
143
+ */
144
+ static verifySync(message, signature, publicKey) {
145
+ try {
146
+ if (!isNodeJS()) {
147
+ // In React Native, use async verify instead
148
+ throw new Error('verifySync should only be used in Node.js. Use verify() in React Native.');
149
+ }
150
+ // Use Function constructor to prevent Metro bundler from statically analyzing this require
151
+ // eslint-disable-next-line @typescript-eslint/no-implied-eval
152
+ const getCrypto = new Function('return require("crypto")');
153
+ const crypto = getCrypto();
154
+ const key = ec.keyFromPublic(publicKey, 'hex');
155
+ const messageHash = crypto.createHash('sha256').update(message).digest('hex');
156
+ return key.verify(messageHash, signature);
157
+ } catch {
158
+ return false;
159
+ }
160
+ }
161
+
162
+ /**
163
+ * Create a signed message object with metadata
164
+ */
165
+ static async createSignedMessage(message) {
166
+ const publicKey = await _keyManager.KeyManager.getPublicKey();
167
+ if (!publicKey) {
168
+ throw new Error('No identity found. Please create or import an identity first.');
169
+ }
170
+ const timestamp = Date.now();
171
+ const messageWithTimestamp = `${message}:${timestamp}`;
172
+ const signature = await SignatureService.sign(messageWithTimestamp);
173
+ return {
174
+ message,
175
+ signature,
176
+ publicKey,
177
+ timestamp
178
+ };
179
+ }
180
+
181
+ /**
182
+ * Verify a signed message object
183
+ * Checks both signature validity and timestamp freshness
184
+ */
185
+ static async verifySignedMessage(signedMessage, maxAgeMs = 5 * 60 * 1000 // 5 minutes default
186
+ ) {
187
+ const {
188
+ message,
189
+ signature,
190
+ publicKey,
191
+ timestamp
192
+ } = signedMessage;
193
+
194
+ // Check timestamp freshness
195
+ const now = Date.now();
196
+ if (now - timestamp > maxAgeMs) {
197
+ return false;
198
+ }
199
+
200
+ // Verify signature
201
+ const messageWithTimestamp = `${message}:${timestamp}`;
202
+ return SignatureService.verify(messageWithTimestamp, signature, publicKey);
203
+ }
204
+
205
+ /**
206
+ * Create a signed authentication challenge response
207
+ * Used for challenge-response authentication
208
+ */
209
+ static async signChallenge(challenge) {
210
+ const publicKey = await _keyManager.KeyManager.getPublicKey();
211
+ if (!publicKey) {
212
+ throw new Error('No identity found. Please create or import an identity first.');
213
+ }
214
+ const timestamp = Date.now();
215
+ const message = `auth:${publicKey}:${challenge}:${timestamp}`;
216
+ const signature = await SignatureService.sign(message);
217
+ return {
218
+ challenge: signature,
219
+ publicKey,
220
+ timestamp
221
+ };
222
+ }
223
+
224
+ /**
225
+ * Verify a challenge response
226
+ */
227
+ static async verifyChallengeResponse(originalChallenge, response, maxAgeMs = 5 * 60 * 1000) {
228
+ const {
229
+ challenge: signature,
230
+ publicKey,
231
+ timestamp
232
+ } = response;
233
+
234
+ // Check timestamp freshness
235
+ const now = Date.now();
236
+ if (now - timestamp > maxAgeMs) {
237
+ return false;
238
+ }
239
+ const message = `auth:${publicKey}:${originalChallenge}:${timestamp}`;
240
+ return SignatureService.verify(message, signature, publicKey);
241
+ }
242
+
243
+ /**
244
+ * Create a registration signature
245
+ * Used when registering a new identity with the server
246
+ * Format matches server expectation: oxy:register:{publicKey}:{timestamp}
247
+ */
248
+ static async createRegistrationSignature() {
249
+ const publicKey = await _keyManager.KeyManager.getPublicKey();
250
+ if (!publicKey) {
251
+ throw new Error('No identity found. Please create or import an identity first.');
252
+ }
253
+ const timestamp = Date.now();
254
+ const message = `oxy:register:${publicKey}:${timestamp}`;
255
+ const signature = await SignatureService.sign(message);
256
+ return {
257
+ signature,
258
+ publicKey,
259
+ timestamp
260
+ };
261
+ }
262
+
263
+ /**
264
+ * Sign arbitrary data for API requests
265
+ * Creates a canonical string representation and signs it
266
+ */
267
+ static async signRequestData(data) {
268
+ const publicKey = await _keyManager.KeyManager.getPublicKey();
269
+ if (!publicKey) {
270
+ throw new Error('No identity found. Please create or import an identity first.');
271
+ }
272
+ const timestamp = Date.now();
273
+
274
+ // Create canonical string representation
275
+ const sortedKeys = Object.keys(data).sort();
276
+ const canonicalParts = sortedKeys.map(key => `${key}:${JSON.stringify(data[key])}`);
277
+ const canonicalString = canonicalParts.join('|');
278
+ const message = `request:${publicKey}:${timestamp}:${canonicalString}`;
279
+ const signature = await SignatureService.sign(message);
280
+ return {
281
+ signature,
282
+ publicKey,
283
+ timestamp
284
+ };
285
+ }
286
+ }
287
+ exports.SignatureService = SignatureService;
288
+ var _default = exports.default = SignatureService;
289
+ //# sourceMappingURL=signatureService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_elliptic","require","_keyManager","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ExpoCrypto","ec","EC","isReactNative","navigator","product","isNodeJS","process","versions","node","initExpoCrypto","Promise","resolve","then","sha256","message","Crypto","digestStringAsync","CryptoDigestAlgorithm","SHA256","getCrypto","Function","crypto","createHash","update","digest","error","SignatureService","generateChallenge","randomBytes","getRandomBytesAsync","Array","from","map","b","toString","padStart","join","hashMessage","sign","keyPair","KeyManager","getKeyPairObject","Error","messageHash","signature","toDER","signWithKey","privateKey","keyFromPrivate","verify","publicKey","key","keyFromPublic","verifySync","createSignedMessage","getPublicKey","timestamp","Date","now","messageWithTimestamp","verifySignedMessage","signedMessage","maxAgeMs","signChallenge","challenge","verifyChallengeResponse","originalChallenge","response","createRegistrationSignature","signRequestData","data","sortedKeys","keys","sort","canonicalParts","JSON","stringify","canonicalString","exports","_default"],"sourceRoot":"../../../src","sources":["crypto/signatureService.ts"],"mappings":";;;;;;AAO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gBAAgB","ignoreList":[]}
@@ -237,7 +237,7 @@
237
237
  "enterCode": "Enter the 6‑digit code from your authenticator app.",
238
238
  "newPassword": "Set New Password",
239
239
  "resetSuccess": "Your password has been reset! You can now sign in.",
240
- "noEmail": "We no longer send recovery emails. Please use your backup file to restore your identity. Contact support if you need assistance.",
240
+ "noEmail": "We no longer send recovery emails. Please use your recovery phrase to restore your identity. Contact support if you need assistance.",
241
241
  "password": {
242
242
  "minLength": "Password must be at least 8 characters long",
243
243
  "mismatch": "Passwords do not match",