@oxy.so/services 11.5.0 → 11.8.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 (234) hide show
  1. package/android/src/main/java/so/oxy/security/OxyCallerPolicy.kt +18 -0
  2. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  3. package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  4. package/lib/commonjs/assets/assets/fonts/icons/manifest.json +6 -4
  5. package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  6. package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  7. package/lib/commonjs/assets/fonts/icons/manifest.json +6 -4
  8. package/lib/commonjs/ui/components/organizations/OrganizationClaimReview.js +2 -2
  9. package/lib/commonjs/ui/components/organizations/OrganizationClaimReview.js.map +1 -1
  10. package/lib/commonjs/ui/components/organizations/OrganizationDirectorySearch.js +5 -5
  11. package/lib/commonjs/ui/components/organizations/OrganizationDirectorySearch.js.map +1 -1
  12. package/lib/commonjs/ui/components/organizations/OrganizationSettings.js +4 -4
  13. package/lib/commonjs/ui/components/organizations/OrganizationSettings.js.map +1 -1
  14. package/lib/commonjs/ui/components/organizations/OrganizationTypePicker.js +2 -2
  15. package/lib/commonjs/ui/components/organizations/OrganizationTypePicker.js.map +1 -1
  16. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js +3 -3
  17. package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  18. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +6 -2
  19. package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  20. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +4 -4
  21. package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  22. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +7 -7
  23. package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
  24. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +6 -6
  25. package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  26. package/lib/commonjs/ui/components/signIn/ReauthStep.js +4 -4
  27. package/lib/commonjs/ui/components/signIn/ReauthStep.js.map +1 -1
  28. package/lib/commonjs/ui/components/signIn/accountFlowParts.js +23 -23
  29. package/lib/commonjs/ui/components/signIn/accountFlowParts.js.map +1 -1
  30. package/lib/commonjs/ui/components/supervision/PersonPicker.js +69 -0
  31. package/lib/commonjs/ui/components/supervision/PersonPicker.js.map +1 -0
  32. package/lib/commonjs/ui/components/supervision/presentation.js +23 -0
  33. package/lib/commonjs/ui/components/supervision/presentation.js.map +1 -0
  34. package/lib/commonjs/ui/context/OxyContext.js +7 -4
  35. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  36. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +5 -2
  37. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  38. package/lib/commonjs/ui/hooks/queries/useSupervision.js +37 -0
  39. package/lib/commonjs/ui/hooks/queries/useSupervision.js.map +1 -0
  40. package/lib/commonjs/ui/icons/subsetGlyphMaps.js +2 -0
  41. package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
  42. package/lib/commonjs/ui/index.js +13 -0
  43. package/lib/commonjs/ui/index.js.map +1 -1
  44. package/lib/commonjs/ui/navigation/routes.js +1 -0
  45. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  46. package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
  47. package/lib/commonjs/ui/oauth/applicationSessionLane.js +2 -2
  48. package/lib/commonjs/ui/oauth/applicationSessionLane.js.map +1 -1
  49. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +3 -3
  50. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/CreateAccountScreen.js +22 -14
  52. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/ManageAccountScreen.js +7 -0
  54. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SupervisionScreen.js +529 -0
  56. package/lib/commonjs/ui/screens/SupervisionScreen.js.map +1 -0
  57. package/lib/commonjs/ui/screens/index.js +7 -0
  58. package/lib/commonjs/ui/screens/index.js.map +1 -1
  59. package/lib/commonjs/ui/utils/identityCrypto.js +19 -0
  60. package/lib/commonjs/ui/utils/identityCrypto.js.map +1 -0
  61. package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  62. package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  63. package/lib/module/assets/assets/fonts/icons/manifest.json +6 -4
  64. package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  65. package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  66. package/lib/module/assets/fonts/icons/manifest.json +6 -4
  67. package/lib/module/ui/components/organizations/OrganizationClaimReview.js +2 -2
  68. package/lib/module/ui/components/organizations/OrganizationClaimReview.js.map +1 -1
  69. package/lib/module/ui/components/organizations/OrganizationDirectorySearch.js +5 -5
  70. package/lib/module/ui/components/organizations/OrganizationDirectorySearch.js.map +1 -1
  71. package/lib/module/ui/components/organizations/OrganizationSettings.js +4 -4
  72. package/lib/module/ui/components/organizations/OrganizationSettings.js.map +1 -1
  73. package/lib/module/ui/components/organizations/OrganizationTypePicker.js +1 -1
  74. package/lib/module/ui/components/organizations/OrganizationTypePicker.js.map +1 -1
  75. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js +1 -1
  76. package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -1
  77. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +5 -1
  78. package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
  79. package/lib/module/ui/components/signIn/OxyPasswordPanel.js +1 -1
  80. package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -1
  81. package/lib/module/ui/components/signIn/OxySignInPanel.js +1 -1
  82. package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
  83. package/lib/module/ui/components/signIn/OxySignUpPanel.js +5 -5
  84. package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
  85. package/lib/module/ui/components/signIn/ReauthStep.js +1 -1
  86. package/lib/module/ui/components/signIn/ReauthStep.js.map +1 -1
  87. package/lib/module/ui/components/signIn/accountFlowParts.js +1 -1
  88. package/lib/module/ui/components/signIn/accountFlowParts.js.map +1 -1
  89. package/lib/module/ui/components/supervision/PersonPicker.js +65 -0
  90. package/lib/module/ui/components/supervision/PersonPicker.js.map +1 -0
  91. package/lib/module/ui/components/supervision/presentation.js +19 -0
  92. package/lib/module/ui/components/supervision/presentation.js.map +1 -0
  93. package/lib/module/ui/context/OxyContext.js +6 -3
  94. package/lib/module/ui/context/OxyContext.js.map +1 -1
  95. package/lib/module/ui/context/hooks/useAuthOperations.js +4 -1
  96. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  97. package/lib/module/ui/hooks/queries/useSupervision.js +32 -0
  98. package/lib/module/ui/hooks/queries/useSupervision.js.map +1 -0
  99. package/lib/module/ui/icons/subsetGlyphMaps.js +2 -0
  100. package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
  101. package/lib/module/ui/index.js +1 -0
  102. package/lib/module/ui/index.js.map +1 -1
  103. package/lib/module/ui/navigation/routes.js +1 -0
  104. package/lib/module/ui/navigation/routes.js.map +1 -1
  105. package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
  106. package/lib/module/ui/oauth/applicationSessionLane.js +2 -2
  107. package/lib/module/ui/oauth/applicationSessionLane.js.map +1 -1
  108. package/lib/module/ui/screens/AccountSettingsScreen.js +2 -2
  109. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  110. package/lib/module/ui/screens/CreateAccountScreen.js +16 -8
  111. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  112. package/lib/module/ui/screens/ManageAccountScreen.js +7 -0
  113. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  114. package/lib/module/ui/screens/SupervisionScreen.js +525 -0
  115. package/lib/module/ui/screens/SupervisionScreen.js.map +1 -0
  116. package/lib/module/ui/screens/index.js +1 -0
  117. package/lib/module/ui/screens/index.js.map +1 -1
  118. package/lib/module/ui/utils/identityCrypto.js +13 -0
  119. package/lib/module/ui/utils/identityCrypto.js.map +1 -0
  120. package/lib/typescript/commonjs/ui/components/organizations/OrganizationClaimReview.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/components/organizations/OrganizationDirectorySearch.d.ts +1 -1
  122. package/lib/typescript/commonjs/ui/components/organizations/OrganizationDirectorySearch.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/organizations/OrganizationSettings.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/components/organizations/OrganizationTypePicker.d.ts +1 -1
  125. package/lib/typescript/commonjs/ui/components/organizations/OrganizationTypePicker.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts +1 -1
  131. package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts +1 -1
  133. package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/ui/components/supervision/PersonPicker.d.ts +6 -0
  135. package/lib/typescript/commonjs/ui/components/supervision/PersonPicker.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/ui/components/supervision/presentation.d.ts +3 -0
  137. package/lib/typescript/commonjs/ui/components/supervision/presentation.d.ts.map +1 -0
  138. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/hooks/queries/useSupervision.d.ts +475 -0
  141. package/lib/typescript/commonjs/ui/hooks/queries/useSupervision.d.ts.map +1 -0
  142. package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
  143. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  144. package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +2 -0
  146. package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/ui/index.d.ts +1 -0
  148. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  150. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +4 -0
  152. package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/ui/screens/SupervisionScreen.d.ts +3 -0
  157. package/lib/typescript/commonjs/ui/screens/SupervisionScreen.d.ts.map +1 -0
  158. package/lib/typescript/commonjs/ui/screens/index.d.ts +1 -0
  159. package/lib/typescript/commonjs/ui/screens/index.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts +44 -0
  161. package/lib/typescript/commonjs/ui/utils/identityCrypto.d.ts.map +1 -0
  162. package/lib/typescript/module/ui/components/organizations/OrganizationClaimReview.d.ts.map +1 -1
  163. package/lib/typescript/module/ui/components/organizations/OrganizationDirectorySearch.d.ts +1 -1
  164. package/lib/typescript/module/ui/components/organizations/OrganizationDirectorySearch.d.ts.map +1 -1
  165. package/lib/typescript/module/ui/components/organizations/OrganizationSettings.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/components/organizations/OrganizationTypePicker.d.ts +1 -1
  167. package/lib/typescript/module/ui/components/organizations/OrganizationTypePicker.d.ts.map +1 -1
  168. package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
  172. package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts +1 -1
  173. package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts.map +1 -1
  174. package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts +1 -1
  175. package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
  176. package/lib/typescript/module/ui/components/supervision/PersonPicker.d.ts +6 -0
  177. package/lib/typescript/module/ui/components/supervision/PersonPicker.d.ts.map +1 -0
  178. package/lib/typescript/module/ui/components/supervision/presentation.d.ts +3 -0
  179. package/lib/typescript/module/ui/components/supervision/presentation.d.ts.map +1 -0
  180. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  182. package/lib/typescript/module/ui/hooks/queries/useSupervision.d.ts +475 -0
  183. package/lib/typescript/module/ui/hooks/queries/useSupervision.d.ts.map +1 -0
  184. package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
  185. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
  186. package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
  187. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +2 -0
  188. package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
  189. package/lib/typescript/module/ui/index.d.ts +1 -0
  190. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  191. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  192. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  193. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +4 -0
  194. package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
  195. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  196. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  198. package/lib/typescript/module/ui/screens/SupervisionScreen.d.ts +3 -0
  199. package/lib/typescript/module/ui/screens/SupervisionScreen.d.ts.map +1 -0
  200. package/lib/typescript/module/ui/screens/index.d.ts +1 -0
  201. package/lib/typescript/module/ui/screens/index.d.ts.map +1 -1
  202. package/lib/typescript/module/ui/utils/identityCrypto.d.ts +44 -0
  203. package/lib/typescript/module/ui/utils/identityCrypto.d.ts.map +1 -0
  204. package/package.json +6 -22
  205. package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
  206. package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
  207. package/src/assets/fonts/icons/manifest.json +6 -4
  208. package/src/ui/components/organizations/OrganizationClaimReview.tsx +3 -5
  209. package/src/ui/components/organizations/OrganizationDirectorySearch.tsx +12 -9
  210. package/src/ui/components/organizations/OrganizationSettings.tsx +6 -9
  211. package/src/ui/components/organizations/OrganizationTypePicker.tsx +2 -1
  212. package/src/ui/components/signIn/OxyAuthenticatorPanel.tsx +2 -1
  213. package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +3 -1
  214. package/src/ui/components/signIn/OxyPasswordPanel.tsx +1 -1
  215. package/src/ui/components/signIn/OxySignInPanel.tsx +6 -4
  216. package/src/ui/components/signIn/OxySignUpPanel.tsx +6 -9
  217. package/src/ui/components/signIn/ReauthStep.tsx +2 -6
  218. package/src/ui/components/signIn/accountFlowParts.tsx +2 -2
  219. package/src/ui/components/supervision/PersonPicker.tsx +67 -0
  220. package/src/ui/components/supervision/presentation.ts +17 -0
  221. package/src/ui/context/OxyContext.tsx +7 -3
  222. package/src/ui/context/hooks/useAuthOperations.ts +2 -1
  223. package/src/ui/hooks/queries/useSupervision.ts +25 -0
  224. package/src/ui/icons/subsetGlyphMaps.ts +2 -0
  225. package/src/ui/index.ts +2 -0
  226. package/src/ui/navigation/routes.ts +2 -0
  227. package/src/ui/navigation/surfaceRegistry.ts +1 -0
  228. package/src/ui/oauth/applicationSessionLane.ts +2 -2
  229. package/src/ui/screens/AccountSettingsScreen.tsx +6 -2
  230. package/src/ui/screens/CreateAccountScreen.tsx +25 -10
  231. package/src/ui/screens/ManageAccountScreen.tsx +10 -0
  232. package/src/ui/screens/SupervisionScreen.tsx +593 -0
  233. package/src/ui/screens/index.ts +2 -0
  234. package/src/ui/utils/identityCrypto.ts +10 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,4BAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,0BAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2BAAwB,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,4BAAyB,CAAC;AAE3E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,wBAAqB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The self-custody identity (`@oxy.so/core/crypto`: secp256k1, bip39, the AEAD
3
+ * cipher — ~32 KB gzipped on web), loaded where a key or signature is used.
4
+ *
5
+ * Importing it statically put it in every app's startup JavaScript, although a
6
+ * reader without an identity key never touches it before first paint. Core's
7
+ * `crypto` entry installs its polyfill before anything else, so loading it
8
+ * late keeps the order every key operation relies on.
9
+ */
10
+ export declare const loadIdentityCrypto: () => Promise<{
11
+ default: typeof import("@oxy.so/core/crypto");
12
+ KeyManager: typeof import("@oxy.so/core/crypto").KeyManager;
13
+ IdentityAlreadyExistsError: typeof import("@oxy.so/core/crypto").IdentityAlreadyExistsError;
14
+ IdentityPersistError: typeof import("@oxy.so/core/crypto").IdentityPersistError;
15
+ IdentityUnavailableError: typeof import("@oxy.so/core/crypto").IdentityUnavailableError;
16
+ readIdentityMarker: typeof import("@oxy.so/core/crypto").readIdentityMarker;
17
+ updateIdentityMarker: typeof import("@oxy.so/core/crypto").updateIdentityMarker;
18
+ SignatureService: typeof import("@oxy.so/core/crypto").SignatureService;
19
+ RecoveryPhraseService: typeof import("@oxy.so/core/crypto").RecoveryPhraseService;
20
+ BACKUP_KDF_ENCRYPTION_INFO: "oxy-backup-encryption-key";
21
+ hkdfSha256: typeof import("@oxy.so/core/crypto").hkdfSha256;
22
+ encryptAead: typeof import("@oxy.so/core/crypto").encryptAead;
23
+ decryptAead: typeof import("@oxy.so/core/crypto").decryptAead;
24
+ AEAD_KEY_LENGTH: 32;
25
+ AEAD_NONCE_LENGTH: 24;
26
+ deriveSharedSecret: typeof import("@oxy.so/core/crypto").deriveSharedSecret;
27
+ SCOPED_SEED_KDF_SALT: "oxy-identity-scoped-seed-v1";
28
+ SOCIAL_RECEIVE_CHAIN_CODE_KEY: "oxypay/faircoin/social/v1";
29
+ MAX_SOCIAL_RECEIVE_INDEX: 2147483647;
30
+ deriveScopedSeedFromKey: typeof import("@oxy.so/core/crypto").deriveScopedSeedFromKey;
31
+ deriveSocialReceiveKey: typeof import("@oxy.so/core/crypto").deriveSocialReceiveKey;
32
+ signSocialReceiveDigest: typeof import("@oxy.so/core/crypto").signSocialReceiveDigest;
33
+ authChallengeDigest: typeof import("@oxy.so/core/crypto").authChallengeDigest;
34
+ digestIdentityPayload: typeof import("@oxy.so/core/crypto").digestIdentityPayload;
35
+ signIdentityProof: typeof import("@oxy.so/core/crypto").signIdentityProof;
36
+ deriveIdentityLinkCode: typeof import("@oxy.so/core/crypto").deriveIdentityLinkCode;
37
+ solveRegistrationPow: typeof import("@oxy.so/core/crypto").solveRegistrationPow;
38
+ createContentHasher: typeof import("@oxy.so/core/crypto").createContentHasher;
39
+ canonicalize: typeof import("@oxy.so/protocol").canonicalize;
40
+ loadCommonsIdentityBridge: typeof import("@oxy.so/protocol").loadCommonsIdentityBridge;
41
+ signMessage: typeof import("@oxy.so/protocol").signMessage;
42
+ verifySignature: typeof import("@oxy.so/protocol").verifySignature;
43
+ }>;
44
+ //# sourceMappingURL=identityCrypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityCrypto.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/identityCrypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/services",
3
- "version": "11.5.0",
3
+ "version": "11.8.0",
4
4
  "description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -111,7 +111,7 @@
111
111
  ],
112
112
  "repository": {
113
113
  "type": "git",
114
- "url": "https://github.com/oxyhq/sdk",
114
+ "url": "git+https://github.com/OxyHQ/oxy.git",
115
115
  "directory": "packages/services"
116
116
  },
117
117
  "author": "OxyHQ",
@@ -136,33 +136,18 @@
136
136
  "copy-dts": "copyfiles -u 1 \"src/**/*.d.ts\" lib/typescript",
137
137
  "delete-debug-view": "rm -rf ./lib/commonjs/components/bottomSheetDebugView ./lib/module/components/bottomSheetDebugView ./lib/typescript/components/bottomSheetDebugView || true",
138
138
  "delete-dts.js": "find ./lib/commonjs -name '*.d.js*' -delete && find ./lib/module -name '*.d.js*' -delete",
139
- "release": "rm -rf lib && bun run build && release-it",
140
139
  "prepublishOnly": "node ../../scripts/assert-bun-publish.mjs && bun run typescript && bun run test && bun run build"
141
140
  },
142
- "release-it": {
143
- "git": {
144
- "tagName": "@oxy.so/services@${version}",
145
- "tagAnnotation": "Release @oxy.so/services@${version}",
146
- "commitMessage": "chore(services): release @oxy.so/services@${version}"
147
- },
148
- "github": {
149
- "release": true,
150
- "releaseName": "@oxy.so/services@${version}"
151
- },
152
- "npm": {
153
- "publish": true
154
- }
155
- },
156
141
  "dependencies": {
157
142
  "@expo/config-plugins": "57.0.9",
158
- "@oxy.so/contracts": "4.16.0",
143
+ "@oxy.so/contracts": "4.21.0",
159
144
  "color": "^5.0.3"
160
145
  },
161
146
  "devDependencies": {
162
147
  "@commitlint/cli": "^21.2.1",
163
148
  "@commitlint/config-conventional": "^21.2.0",
164
149
  "@expo/vector-icons": "^15.0.3",
165
- "@oxy.so/core": "4.10.0",
150
+ "@oxy.so/core": "4.17.0",
166
151
  "@react-native-async-storage/async-storage": "^2.0.0",
167
152
  "@react-native-community/netinfo": "^12.0.1",
168
153
  "@react-native/babel-preset": "^0.86.2",
@@ -177,7 +162,7 @@
177
162
  "@types/jest": "^30.0.0",
178
163
  "@types/node": "^20.19.43",
179
164
  "@types/react": "*",
180
- "@oxy.so/bloom": "^10.4.0",
165
+ "@oxy.so/bloom": "^10.9.0",
181
166
  "copyfiles": "^2.4.1",
182
167
  "expo-clipboard": "~57.0.2",
183
168
  "expo-constants": "~57.0.5",
@@ -205,7 +190,6 @@
205
190
  "react-native-reanimated": "4.5.0",
206
191
  "react-native-safe-area-context": "~5.8.0",
207
192
  "react-native-svg": "15.15.5",
208
- "release-it": "^19.0.6",
209
193
  "socket.io-client": "^4.8.1",
210
194
  "ts-jest": "^29.4.12",
211
195
  "typescript": "^5.9.2",
@@ -215,7 +199,7 @@
215
199
  "peerDependencies": {
216
200
  "@expo/vector-icons": "^15.0.3",
217
201
  "@oxy.so/bloom": ">=6.2.1 <6.3.0 || >=7.1.2 <7.2.0 || >=7.7.0 <7.8.0 || >=7.13.1 <7.34.0 || >=8.0.0 <8.2.0 || >=9.0.0 <9.1.0 || >=10.0.0",
218
- "@oxy.so/core": "4.10.0",
202
+ "@oxy.so/core": "4.17.0",
219
203
  "@react-native-async-storage/async-storage": "^2.0.0",
220
204
  "@react-native-community/netinfo": ">=11.4.1 <13.0.0",
221
205
  "@tanstack/query-async-storage-persister": "^5.101",
@@ -6,7 +6,7 @@
6
6
  "fontFamily": "OxyServicesIonicons",
7
7
  "file": "src/assets/fonts/icons/OxyServicesIonicons.ttf",
8
8
  "bytes": 43004,
9
- "sha256": "367d1eb46c64097ace34b793d7fbff9257c0da191d8cab73329cfe8999e95611",
9
+ "sha256": "f6617b302f84bfad9625e5b7cfebe3bc1c2b29d5dfea4f727c5fdd7393069a73",
10
10
  "names": [
11
11
  "add",
12
12
  "add-circle-outline",
@@ -151,8 +151,8 @@
151
151
  "materialCommunityIcons": {
152
152
  "fontFamily": "OxyServicesMaterialCommunityIcons",
153
153
  "file": "src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf",
154
- "bytes": 28852,
155
- "sha256": "844252d83e5510b012333218db9e16cc997164360d1ab4f24148c3ca384ab740",
154
+ "bytes": 29224,
155
+ "sha256": "b490224be59f3195d1907810f33dee438cfde45fc24d5d7f80a93b9d8af93eb7",
156
156
  "names": [
157
157
  "account",
158
158
  "account-circle",
@@ -213,6 +213,7 @@
213
213
  "code-tags",
214
214
  "cog",
215
215
  "cog-outline",
216
+ "contacts",
216
217
  "contain",
217
218
  "content-copy",
218
219
  "controller",
@@ -220,6 +221,7 @@
220
221
  "credit-card",
221
222
  "cube-outline",
222
223
  "database-outline",
224
+ "decimal",
223
225
  "delete",
224
226
  "delete-outline",
225
227
  "devices",
@@ -349,5 +351,5 @@
349
351
  }
350
352
  },
351
353
  "glyphMapsFile": "src/ui/icons/subsetGlyphMaps.ts",
352
- "glyphMapsSha256": "25d2d86d08ea7238dfe49210cf98754ffcc60fefbe5b8ad812e13c2d3239948f"
354
+ "glyphMapsSha256": "96b7c9a8bfa5332ba2c27bf26a42ffd308d141861b4bc4b78744bc566afdf519"
353
355
  }
@@ -2,10 +2,8 @@ import { useState } from 'react';
2
2
  import { ActivityIndicator, View } from 'react-native';
3
3
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
4
4
  import { isHttpRequestError } from '@oxy.so/core';
5
- import {
6
- organizationClaimReviewSchema,
7
- type OrganizationClaimReview as OrganizationClaimReviewInput,
8
- } from '@oxy.so/contracts';
5
+ import type { OrganizationClaimReview as OrganizationClaimReviewInput } from '@oxy.so/contracts';
6
+ import { organizationClaimReviewCheck, parseContract } from '@oxy.so/contracts/client';
9
7
  import { Button } from '@oxy.so/bloom/button';
10
8
  import { SettingsListGroup, SettingsListItem } from '@oxy.so/bloom/settings-list';
11
9
  import { TextField, TextFieldInput } from '@oxy.so/bloom/text-field';
@@ -123,7 +121,7 @@ function ReviewDetail({ claimId, onClose }: { claimId: string; onClose: () => vo
123
121
  throw new Error('Independent staff review is required');
124
122
  return oxyServices.organizations.reviewClaim(
125
123
  claimId,
126
- organizationClaimReviewSchema.parse({ decision, evidenceReference: evidence }),
124
+ parseContract(organizationClaimReviewCheck, { decision, evidenceReference: evidence }),
127
125
  );
128
126
  },
129
127
  onError: (error) => {
@@ -1,12 +1,13 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { ActivityIndicator, View } from 'react-native';
3
3
  import { useInfiniteQuery, useMutation, useQueryClient } from '@tanstack/react-query';
4
+ import type { Organization, OrganizationType } from '@oxy.so/contracts';
4
5
  import {
5
- createOrganizationSchema,
6
- organizationClaimInputSchema,
7
- type Organization,
8
- type OrganizationType,
9
- } from '@oxy.so/contracts';
6
+ createOrganizationCheck,
7
+ organizationClaimInputCheck,
8
+ parseContract,
9
+ checkContract,
10
+ } from '@oxy.so/contracts/client';
10
11
  import { Avatar } from '@oxy.so/bloom/avatar';
11
12
  import { Button } from '@oxy.so/bloom/button';
12
13
  import { SettingsListGroup, SettingsListItem } from '@oxy.so/bloom/settings-list';
@@ -56,7 +57,7 @@ export function OrganizationDirectorySearch({
56
57
  throw new Error('An active organization and personal session are required');
57
58
  return oxyServices.organizations.claim(
58
59
  selected.accountId,
59
- organizationClaimInputSchema.parse({ evidenceReference: evidence }),
60
+ parseContract(organizationClaimInputCheck, { evidenceReference: evidence }),
60
61
  );
61
62
  },
62
63
  onSuccess: () => queryClient.invalidateQueries({ queryKey: ['oxy', 'organizations'] }),
@@ -65,7 +66,7 @@ export function OrganizationDirectorySearch({
65
66
  mutationFn: () => {
66
67
  if (!personalReady) throw new Error('A personal session is required');
67
68
  return oxyServices.organizations.create(
68
- createOrganizationSchema.parse({ name: search.trim(), organizationType: type }),
69
+ parseContract(createOrganizationCheck, { name: search.trim(), organizationType: type }),
69
70
  );
70
71
  },
71
72
  onSuccess: (organization) => {
@@ -210,8 +211,10 @@ export function OrganizationDirectorySearch({
210
211
  loading={create.isPending}
211
212
  onPress={() => {
212
213
  if (
213
- !createOrganizationSchema.safeParse({ name: search.trim(), organizationType: type })
214
- .success
214
+ checkContract(createOrganizationCheck, {
215
+ name: search.trim(),
216
+ organizationType: type,
217
+ }) === null
215
218
  ) {
216
219
  setValidationError(true);
217
220
  return;
@@ -1,11 +1,8 @@
1
1
  import { useState } from 'react';
2
2
  import { ActivityIndicator, View } from 'react-native';
3
3
  import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
4
- import {
5
- updateOrganizationSchema,
6
- type Organization,
7
- type OrganizationType,
8
- } from '@oxy.so/contracts';
4
+ import type { Organization, OrganizationType, UpdateOrganization } from '@oxy.so/contracts';
5
+ import { updateOrganizationCheck, checkContract } from '@oxy.so/contracts/client';
9
6
  import { Button } from '@oxy.so/bloom/button';
10
7
  import { toast } from '@oxy.so/bloom/toast';
11
8
  import { SettingsListGroup } from '@oxy.so/bloom/settings-list';
@@ -62,7 +59,7 @@ function OrganizationForm({ organization }: { organization: Organization }) {
62
59
  const [type, setType] = useState<OrganizationType>(organization.organizationType);
63
60
  const [invalid, setInvalid] = useState(false);
64
61
  const save = useMutation({
65
- mutationFn: (input: ReturnType<typeof updateOrganizationSchema.parse>) => {
62
+ mutationFn: (input: UpdateOrganization) => {
66
63
  if (!canUsePrivateApi) throw new Error('An authenticated session is required');
67
64
  return oxyServices.organizations.update(organization.accountId, input);
68
65
  },
@@ -113,14 +110,14 @@ function OrganizationForm({ organization }: { organization: Organization }) {
113
110
  disabled={save.isPending || !canUsePrivateApi}
114
111
  loading={save.isPending}
115
112
  onPress={() => {
116
- const input = updateOrganizationSchema.safeParse({
113
+ const input = checkContract(updateOrganizationCheck, {
117
114
  legalName: legalName.trim() || null,
118
115
  websiteUrl: website.trim() || null,
119
116
  countryCode: country.trim().toUpperCase() || null,
120
117
  organizationType: type,
121
118
  });
122
- setInvalid(!input.success);
123
- if (input.success) save.mutate(input.data);
119
+ setInvalid(input === null);
120
+ if (input) save.mutate(input);
124
121
  }}
125
122
  >
126
123
  {t('organizationDirectory.save')}
@@ -1,4 +1,5 @@
1
- import { ORGANIZATION_TYPES, type OrganizationType } from '@oxy.so/contracts';
1
+ import type { OrganizationType } from '@oxy.so/contracts';
2
+ import { ORGANIZATION_TYPES } from '@oxy.so/contracts/client';
2
3
  import { SettingsListGroup, SettingsListItem } from '@oxy.so/bloom/settings-list';
3
4
  import { Text } from '@oxy.so/bloom/typography';
4
5
  import { useI18n } from '../../hooks/useI18n';
@@ -19,7 +19,8 @@ import { CodeBlock } from '@oxy.so/bloom/code';
19
19
  import { useTheme } from '@oxy.so/bloom/theme';
20
20
  import { toast } from '@oxy.so/bloom/toast';
21
21
  import { Text } from '@oxy.so/bloom/typography';
22
- import { TOTP_DIGITS, type TotpEnrollResponse } from '@oxy.so/contracts';
22
+ import type { TotpEnrollResponse } from '@oxy.so/contracts';
23
+ import { TOTP_DIGITS } from '@oxy.so/contracts/client';
23
24
  import { useQueryClient } from '@tanstack/react-query';
24
25
  import { useOxy } from '../../context/OxyContext';
25
26
  import { useSignInMethods } from '../../hooks/queries/useAuthMethods';
@@ -19,9 +19,9 @@ import { Button } from '@oxy.so/bloom/button';
19
19
  import { Loading } from '@oxy.so/bloom/loading';
20
20
  import { useTheme } from '@oxy.so/bloom/theme';
21
21
  import { Text } from '@oxy.so/bloom/typography';
22
- import { deriveIdentityLinkCode } from '@oxy.so/core/crypto';
23
22
  import type { IdentityLinkCreateResponse } from '@oxy.so/contracts';
24
23
  import { useOxy } from '../../context/OxyContext';
24
+ import { loadIdentityCrypto } from '../../utils/identityCrypto';
25
25
  import { useSignInMethods } from '../../hooks/queries/useAuthMethods';
26
26
  import { useI18n } from '../../hooks/useI18n';
27
27
  import { OxyAuthScreen, OxyAuthScreenHeader } from './OxyAuthScreen';
@@ -99,6 +99,8 @@ export const OxyLinkCommonsPanel: React.FC<OxyLinkCommonsPanelProps> = ({ onLink
99
99
  const state = await oxyServices.identity.links.get(link.linkId);
100
100
  if (stopped) return;
101
101
  if (state.status === 'signed' && state.publicKey) {
102
+ const { deriveIdentityLinkCode } = await loadIdentityCrypto();
103
+ if (stopped) return;
102
104
  setStep({
103
105
  name: 'matching',
104
106
  link,
@@ -11,7 +11,7 @@ import { StyleSheet } from 'react-native';
11
11
  import { Field } from '@oxy.so/bloom/field';
12
12
  import { Switch } from '@oxy.so/bloom/switch';
13
13
  import { toast } from '@oxy.so/bloom/toast';
14
- import { PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH } from '@oxy.so/contracts';
14
+ import { PASSWORD_MAX_LENGTH, PASSWORD_MIN_LENGTH } from '@oxy.so/contracts/client';
15
15
  import { useQueryClient } from '@tanstack/react-query';
16
16
  import { useOxy } from '../../context/OxyContext';
17
17
  import { useSignInMethods } from '../../hooks/queries/useAuthMethods';
@@ -36,6 +36,11 @@ import { useTheme } from '@oxy.so/bloom/theme';
36
36
  import { toast } from '@oxy.so/bloom/toast';
37
37
  import { Text } from '@oxy.so/bloom/typography';
38
38
  import type { SwitcherContextRow } from '@oxy.so/core/session';
39
+ import type {
40
+ EmailSignInAccountOption,
41
+ EmailSignInStepResult,
42
+ LoginResult,
43
+ } from '@oxy.so/contracts';
39
44
  import {
40
45
  EMAIL_CODE_LENGTH,
41
46
  EMAIL_SIGNIN_LONG_CODE_LENGTH,
@@ -43,10 +48,7 @@ import {
43
48
  TOTP_DIGITS,
44
49
  isEmailSignInChooseAccount,
45
50
  isSecondFactorRequired,
46
- type EmailSignInAccountOption,
47
- type EmailSignInStepResult,
48
- type LoginResult,
49
- } from '@oxy.so/contracts';
51
+ } from '@oxy.so/contracts/client';
50
52
  import { useQueryClient } from '@tanstack/react-query';
51
53
  import { useOxy } from '../../context/OxyContext';
52
54
  import { useAccountDialogSnapshot } from '../../hooks/accountDialogSnapshot';
@@ -15,11 +15,8 @@ import type React from 'react';
15
15
  import { useEffect, useState } from 'react';
16
16
  import { Linking, Platform } from 'react-native';
17
17
  import { toast } from '@oxy.so/bloom/toast';
18
- import {
19
- SIGN_IN_ERROR_CODES,
20
- emailAddressSchema,
21
- type EmailVerificationConfirmResponse,
22
- } from '@oxy.so/contracts';
18
+ import type { EmailVerificationConfirmResponse } from '@oxy.so/contracts';
19
+ import { SIGN_IN_ERROR_CODES, emailAddressCheck, checkContract } from '@oxy.so/contracts/client';
23
20
  import { useOxy } from '../../context/OxyContext';
24
21
  import { useAccountDialogSnapshot } from '../../hooks/accountDialogSnapshot';
25
22
  import { useI18n } from '../../hooks/useI18n';
@@ -126,13 +123,13 @@ export const OxySignUpPanel: React.FC<OxySignUpPanelProps> = ({
126
123
  };
127
124
 
128
125
  const submitEmail = () => {
129
- const parsed = emailAddressSchema.safeParse(email);
130
- if (!parsed.success) {
126
+ const address = checkContract(emailAddressCheck, email);
127
+ if (address === null) {
131
128
  setError(t('signup.email.invalid'));
132
129
  return;
133
130
  }
134
- setEmail(parsed.data);
135
- run(() => sendCode(parsed.data));
131
+ setEmail(address);
132
+ run(() => sendCode(address));
136
133
  };
137
134
 
138
135
  // The code step reports this promise's failure in place.
@@ -8,12 +8,8 @@
8
8
 
9
9
  import type React from 'react';
10
10
  import { useState } from 'react';
11
- import {
12
- EMAIL_CODE_LENGTH,
13
- TOTP_DIGITS,
14
- type ReauthAction,
15
- type ReauthProof,
16
- } from '@oxy.so/contracts';
11
+ import type { ReauthAction, ReauthProof } from '@oxy.so/contracts';
12
+ import { EMAIL_CODE_LENGTH, TOTP_DIGITS } from '@oxy.so/contracts/client';
17
13
  import { useOxy } from '../../context/OxyContext';
18
14
  import { useI18n } from '../../hooks/useI18n';
19
15
  import { SubtleLink } from '../authChooser/primitives';
@@ -18,6 +18,7 @@ import { useTheme } from '@oxy.so/bloom/theme';
18
18
  import { TextField, TextFieldHint, TextFieldInput, TextFieldLabel } from '@oxy.so/bloom/text-field';
19
19
  import { Text } from '@oxy.so/bloom/typography';
20
20
  import { WizardProgress } from '@oxy.so/bloom/wizard';
21
+ import type { EmailVerificationConfirmResponse } from '@oxy.so/contracts';
21
22
  import {
22
23
  EMAIL_CODE_LENGTH,
23
24
  EMAIL_SIGNIN_LONG_CODE_ALPHABET,
@@ -25,8 +26,7 @@ import {
25
26
  EMAIL_VERIFICATION_ERROR_CODES,
26
27
  SIGN_IN_ERROR_CODES,
27
28
  normalizeEmailSignInCode,
28
- type EmailVerificationConfirmResponse,
29
- } from '@oxy.so/contracts';
29
+ } from '@oxy.so/contracts/client';
30
30
  import { useOxy } from '../../context/OxyContext';
31
31
  import { useI18n } from '../../hooks/useI18n';
32
32
  import type { Translate } from '../authChooser/types';
@@ -0,0 +1,67 @@
1
+ import { useState } from 'react';
2
+ import { View } from 'react-native';
3
+ import { useQuery } from '@tanstack/react-query';
4
+ import { Button } from '@oxy.so/bloom/button';
5
+ import { Text } from '@oxy.so/bloom/typography';
6
+ import type { SafetyPerson } from '@oxy.so/contracts';
7
+ import { useOxy } from '../../context/OxyContext';
8
+ import { useI18n } from '../../hooks/useI18n';
9
+ import { AccountFlowField, AccountFlowNote } from '../signIn/accountFlowParts';
10
+ export function PersonPicker({
11
+ onSelect,
12
+ exclude = [],
13
+ }: {
14
+ onSelect: (person: SafetyPerson) => void;
15
+ exclude?: string[];
16
+ }) {
17
+ const { oxyServices, user } = useOxy(),
18
+ { t } = useI18n();
19
+ const [text, setText] = useState(''),
20
+ [query, setQuery] = useState('');
21
+ const results = useQuery({
22
+ queryKey: ['oxy', 'safety', 'people', user?.id, query],
23
+ queryFn: () => oxyServices.safety.people({ query }),
24
+ enabled: query.length >= 2,
25
+ staleTime: 0,
26
+ gcTime: 0,
27
+ retry: false,
28
+ });
29
+ return (
30
+ <View style={{ gap: 12 }}>
31
+ <AccountFlowNote>{t('supervision.exactHandleHint')}</AccountFlowNote>
32
+ <AccountFlowField
33
+ label={t('supervision.searchLabel')}
34
+ value={text}
35
+ onChange={setText}
36
+ onSubmit={() => setQuery(text.trim().replace(/^@/, ''))}
37
+ error={null}
38
+ testID="supervision-person-query"
39
+ />
40
+ <Button
41
+ onPress={() => setQuery(text.trim().replace(/^@/, ''))}
42
+ disabled={text.trim().length < 2}
43
+ loading={results.isFetching}
44
+ >
45
+ {t('supervision.search')}
46
+ </Button>
47
+ {results.isError ? (
48
+ <AccountFlowNote>{t('supervision.loadError')}</AccountFlowNote>
49
+ ) : (
50
+ results.data?.items
51
+ .filter((person) => !exclude.includes(person.accountId))
52
+ .map((person) => (
53
+ <Button
54
+ key={person.accountId}
55
+ appearance="plain"
56
+ onPress={() => onSelect(person)}
57
+ testID={`supervision-person-${person.accountId}`}
58
+ >
59
+ {person.displayName ?? person.username ?? t('supervision.account')}{' '}
60
+ {person.username ? `@${person.username}` : ''}
61
+ </Button>
62
+ ))
63
+ )}
64
+ {results.data?.items.length === 0 ? <Text>{t('supervision.noPeople')}</Text> : null}
65
+ </View>
66
+ );
67
+ }
@@ -0,0 +1,17 @@
1
+ /** Format integer authorization evidence without rounding it through a floating-point division. */
2
+ export function formatApprovalAmount(minor: number, currency: string, locale: string): string {
3
+ const digits =
4
+ new Intl.NumberFormat(locale, { style: 'currency', currency }).resolvedOptions()
5
+ .maximumFractionDigits ?? 2;
6
+ const value = BigInt(minor),
7
+ absolute = value < 0n ? -value : value,
8
+ scale = 10n ** BigInt(digits);
9
+ const whole = new Intl.NumberFormat(locale, { maximumFractionDigits: 0 }).format(
10
+ absolute / scale,
11
+ );
12
+ const decimal =
13
+ new Intl.NumberFormat(locale).formatToParts(1.1).find((part) => part.type === 'decimal')
14
+ ?.value ?? '.';
15
+ const fraction = digits ? `${decimal}${(absolute % scale).toString().padStart(digits, '0')}` : '';
16
+ return `${value < 0n ? '-' : ''}${whole}${fraction} ${currency}`;
17
+ }
@@ -29,7 +29,6 @@ import type {
29
29
  AccountDialogController,
30
30
  AccountDialogView,
31
31
  } from '@oxy.so/core/session';
32
- import { KeyManager } from '@oxy.so/core/crypto';
33
32
  import {
34
33
  refreshDeviceSecretArm,
35
34
  establishIdentitySession,
@@ -60,6 +59,7 @@ import {
60
59
  type RequestOAuthConsentOptions,
61
60
  } from '../oauth/explicitOAuthConsent';
62
61
  import { isWebBrowser } from '../utils/isWebBrowser';
62
+ import { loadIdentityCrypto } from '../utils/identityCrypto';
63
63
  import { resolveDeliveryPlatform } from '../utils/deliveryPlatform';
64
64
  import { runProviderColdBoot } from '../boot/runProviderColdBoot';
65
65
  import { resolveApplicationSessionLane } from '../oauth/applicationSessionLane';
@@ -696,6 +696,7 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
696
696
  try {
697
697
  // The same keys the refresh handler's second arm signs with: the
698
698
  // identity-bound client's own key, or the cross-app shared identity.
699
+ const { KeyManager } = await loadIdentityCrypto();
699
700
  return identity ? await KeyManager.hasIdentity() : await KeyManager.hasSharedIdentity();
700
701
  } catch {
701
702
  return false;
@@ -1495,9 +1496,12 @@ export const OxyRuntimeProvider: React.FC<OxyRuntimeProviderProps> = ({
1495
1496
  // — a locked keychain must never be misreported as "no identity". `hasIdentity`
1496
1497
  // still resolves `false` and `getPublicKey` still resolves `null` for a genuine
1497
1498
  // absence.
1498
- const hasIdentity = useCallback(async (): Promise<boolean> => KeyManager.hasIdentity(), []);
1499
+ const hasIdentity = useCallback(
1500
+ async (): Promise<boolean> => (await loadIdentityCrypto()).KeyManager.hasIdentity(),
1501
+ [],
1502
+ );
1499
1503
  const getPublicKey = useCallback(
1500
- async (): Promise<string | null> => KeyManager.getPublicKey(),
1504
+ async (): Promise<string | null> => (await loadIdentityCrypto()).KeyManager.getPublicKey(),
1501
1505
  [],
1502
1506
  );
1503
1507
 
@@ -8,9 +8,9 @@ import type { LogoutResult } from '../oxyContextTypes';
8
8
  import { DeviceManager } from '@oxy.so/core/session';
9
9
  import { fetchSessionsWithFallback } from '../../utils/sessionHelpers';
10
10
  import { handleAuthError, isInvalidSessionError } from '../../utils/errorHandlers';
11
+ import { loadIdentityCrypto } from '../../utils/identityCrypto';
11
12
  import type { StorageInterface } from '../../utils/storageHelpers';
12
13
  import type { OxyServices } from '@oxy.so/core';
13
- import { SignatureService } from '@oxy.so/core/crypto';
14
14
 
15
15
  export interface UseAuthOperationsOptions {
16
16
  oxyServices: OxyServices;
@@ -126,6 +126,7 @@ export const useAuthOperations = ({
126
126
  // in local storage as 'oxy_biometric_enabled' and can be checked there.
127
127
 
128
128
  // Sign the challenge
129
+ const { SignatureService } = await loadIdentityCrypto();
129
130
  const { challenge: signature, timestamp } = await SignatureService.signChallenge(challenge);
130
131
 
131
132
  let fullUser: User;
@@ -0,0 +1,25 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import { useOxy } from '../../context/OxyContext';
3
+ export const supervisionQueryKeys = {
4
+ all: ['oxy', 'safety', 'supervision'] as const,
5
+ account: (id: string, sessionId: string) =>
6
+ ['oxy', 'safety', 'supervision', id, sessionId] as const,
7
+ };
8
+ /** Advisory UI state only. Every read/write still requires the live server policy. */
9
+ export function useSupervision() {
10
+ const { oxyServices, user, isAuthenticated, activeSessionId } = useOxy();
11
+ const result = useQuery({
12
+ queryKey: supervisionQueryKeys.account(user?.id ?? '', activeSessionId ?? ''),
13
+ queryFn: () => oxyServices.safety.supervisionState(),
14
+ enabled: isAuthenticated && !!activeSessionId && user?.kind === 'personal',
15
+ staleTime: 0,
16
+ gcTime: 0,
17
+ refetchOnWindowFocus: 'always',
18
+ refetchOnMount: 'always',
19
+ retry: false,
20
+ });
21
+ return {
22
+ ...result,
23
+ data: result.isFetchedAfterMount && !result.isError ? result.data : undefined,
24
+ };
25
+ }
@@ -199,6 +199,7 @@ export const materialCommunityIconsGlyphMap = {
199
199
  "code-tags": 983412,
200
200
  "cog": 984211,
201
201
  "cog-outline": 985275,
202
+ "contacts": 984779,
202
203
  "contain": 985662,
203
204
  "content-copy": 983439,
204
205
  "controller": 983732,
@@ -206,6 +207,7 @@ export const materialCommunityIconsGlyphMap = {
206
207
  "credit-card": 987119,
207
208
  "cube-outline": 983463,
208
209
  "database-outline": 988722,
210
+ "decimal": 987297,
209
211
  "delete": 983476,
210
212
  "delete-outline": 985575,
211
213
  "devices": 987056,
package/src/ui/index.ts CHANGED
@@ -57,3 +57,5 @@ export {
57
57
  extractErrorMessage,
58
58
  } from './utils/errorHandlers';
59
59
  export type { HandleAuthErrorOptions } from './utils/errorHandlers';
60
+
61
+ export { useSupervision, supervisionQueryKeys } from './hooks/queries/useSupervision';