@oxyhq/services 5.16.44 → 5.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -10
- package/lib/commonjs/core/OxyServices.js +1 -1
- package/lib/commonjs/core/index.js +20 -15
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.auth.js +36 -53
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.user.js +10 -17
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/commonjs/core/services/TokenService.js +27 -13
- package/lib/commonjs/core/services/TokenService.js.map +1 -1
- package/lib/commonjs/crypto/index.js +0 -16
- package/lib/commonjs/crypto/index.js.map +1 -1
- package/lib/commonjs/crypto/keyManager.js +21 -22
- package/lib/commonjs/crypto/keyManager.js.map +1 -1
- package/lib/commonjs/crypto/polyfill.js +1 -10
- package/lib/commonjs/crypto/polyfill.js.map +1 -1
- package/lib/commonjs/crypto/signatureService.js +18 -32
- package/lib/commonjs/crypto/signatureService.js.map +1 -1
- package/lib/commonjs/index.js +13 -134
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/interfaces.js +0 -7
- package/lib/commonjs/models/interfaces.js.map +1 -1
- package/lib/commonjs/node/index.js +1 -10
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -9
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +9 -20
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +779 -450
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +551 -0
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js +79 -0
- package/lib/commonjs/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +0 -20
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/index.js +0 -12
- package/lib/commonjs/ui/hooks/mutations/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +23 -74
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +0 -12
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +28 -64
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +73 -0
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/commonjs/ui/hooks/useProfileEditing.js +5 -3
- package/lib/commonjs/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +284 -0
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/commonjs/ui/index.js +2 -10
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +1 -5
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +97 -76
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +6 -6
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +6 -54
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +2 -54
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +12 -9
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +1 -7
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/utils/deviceManager.js +177 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +0 -13
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/index.js +7 -0
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/commonjs/utils/sessionUtils.js +1 -8
- package/lib/commonjs/utils/sessionUtils.js.map +1 -1
- package/lib/commonjs/utils/validationUtils.js +1 -15
- package/lib/commonjs/utils/validationUtils.js.map +1 -1
- package/lib/module/core/OxyServices.js +1 -1
- package/lib/module/core/index.js +4 -6
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.auth.js +36 -53
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.user.js +10 -17
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/module/core/services/TokenService.js +27 -13
- package/lib/module/core/services/TokenService.js.map +1 -1
- package/lib/module/crypto/index.js +0 -3
- package/lib/module/crypto/index.js.map +1 -1
- package/lib/module/crypto/keyManager.js +21 -22
- package/lib/module/crypto/keyManager.js.map +1 -1
- package/lib/module/crypto/polyfill.js +1 -2
- package/lib/module/crypto/polyfill.js.map +1 -1
- package/lib/module/crypto/signatureService.js +18 -32
- package/lib/module/crypto/signatureService.js.map +1 -1
- package/lib/module/index.js +7 -19
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/interfaces.js +0 -7
- package/lib/module/models/interfaces.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +2 -6
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +9 -20
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +779 -450
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +545 -0
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/context/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/context/hooks/useStorage.js +74 -0
- package/lib/module/ui/context/hooks/useStorage.js.map +1 -0
- package/lib/module/ui/hooks/index.js +0 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/index.js +1 -1
- package/lib/module/ui/hooks/mutations/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +21 -71
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +1 -1
- package/lib/module/ui/hooks/queries/index.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +1 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +27 -61
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -4
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +68 -0
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -0
- package/lib/module/ui/hooks/useProfileEditing.js +5 -3
- package/lib/module/ui/hooks/useProfileEditing.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +279 -0
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -0
- package/lib/module/ui/index.js +1 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +1 -5
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -9
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +19 -37
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +15 -2
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +98 -77
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +6 -6
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +6 -54
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +2 -6
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +12 -9
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +1 -7
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/utils/deviceManager.js +171 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/errorUtils.js +0 -7
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/index.js +1 -2
- package/lib/module/utils/index.js.map +1 -1
- package/lib/module/utils/sessionUtils.js +1 -8
- package/lib/module/utils/sessionUtils.js.map +1 -1
- package/lib/module/utils/validationUtils.js +0 -13
- package/lib/module/utils/validationUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +1 -1
- package/lib/typescript/core/index.d.ts +3 -3
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +21 -44
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +1 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +8 -15
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/core/services/TokenService.d.ts.map +1 -1
- package/lib/typescript/crypto/index.d.ts +0 -1
- package/lib/typescript/crypto/index.d.ts.map +1 -1
- package/lib/typescript/crypto/keyManager.d.ts +2 -15
- package/lib/typescript/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/crypto/polyfill.d.ts +1 -2
- package/lib/typescript/crypto/polyfill.d.ts.map +1 -1
- package/lib/typescript/crypto/signatureService.d.ts +0 -13
- package/lib/typescript/crypto/signatureService.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +7 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +36 -5
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/models/session.d.ts +18 -3
- package/lib/typescript/models/session.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts +0 -5
- package/lib/typescript/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +28 -5
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts +59 -0
- package/lib/typescript/ui/context/hooks/useAuthOperations.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/context/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts +22 -0
- package/lib/typescript/ui/context/hooks/useStorage.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +0 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts +8 -19
- package/lib/typescript/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts +1 -1
- package/lib/typescript/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts +0 -2
- package/lib/typescript/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts +5 -17
- package/lib/typescript/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts +27 -0
- package/lib/typescript/ui/hooks/useDeviceManagement.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useProfileEditing.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts +41 -0
- package/lib/typescript/ui/hooks/useSessionManagement.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +0 -1
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +1 -8
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/spacing.d.ts +0 -5
- package/lib/typescript/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts +4 -1
- package/lib/typescript/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts +0 -1
- package/lib/typescript/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/errorUtils.d.ts +0 -6
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/utils/index.d.ts +2 -0
- package/lib/typescript/utils/index.d.ts.map +1 -1
- package/lib/typescript/utils/sessionUtils.d.ts.map +1 -1
- package/lib/typescript/utils/validationUtils.d.ts +0 -8
- package/lib/typescript/utils/validationUtils.d.ts.map +1 -1
- package/package.json +1 -6
- package/src/core/OxyServices.ts +1 -1
- package/src/core/index.ts +5 -8
- package/src/core/mixins/OxyServices.auth.ts +44 -87
- package/src/core/mixins/OxyServices.user.ts +10 -18
- package/src/core/services/TokenService.ts +27 -16
- package/src/crypto/index.ts +1 -3
- package/src/crypto/keyManager.ts +21 -30
- package/src/crypto/polyfill.ts +1 -2
- package/src/crypto/signatureService.ts +19 -43
- package/src/index.ts +6 -41
- package/src/models/interfaces.ts +39 -12
- package/src/models/session.ts +19 -7
- package/src/node/index.ts +0 -3
- package/src/ui/components/BottomSheetRouter.tsx +1 -6
- package/src/ui/components/OxyProvider.tsx +10 -17
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/helpers.tsx +2 -2
- package/src/ui/components/TextField/types.tsx +1 -1
- package/src/ui/context/OxyContext.tsx +831 -463
- package/src/ui/context/hooks/useAuthOperations.ts +620 -0
- package/src/ui/context/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/context/hooks/useStorage.ts +104 -0
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/mutations/index.ts +0 -2
- package/src/ui/hooks/mutations/useAccountMutations.ts +20 -66
- package/src/ui/hooks/queries/index.ts +0 -2
- package/src/ui/hooks/queries/queryKeys.ts +0 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +19 -53
- package/src/ui/hooks/queries/useServicesQueries.ts +5 -5
- package/src/ui/hooks/useDeviceManagement.ts +108 -0
- package/src/ui/hooks/useProfileEditing.ts +3 -3
- package/src/ui/hooks/useSessionManagement.ts +405 -0
- package/src/ui/index.ts +1 -2
- package/src/ui/navigation/routes.ts +2 -6
- package/src/ui/screens/AccountCenterScreen.tsx +4 -9
- package/src/ui/screens/AccountSettingsScreen.tsx +31 -49
- package/src/ui/screens/AccountSwitcherScreen.tsx +5 -5
- package/src/ui/screens/OxyAuthScreen.tsx +19 -4
- package/src/ui/screens/PrivacySettingsScreen.tsx +101 -67
- package/src/ui/screens/ProfileScreen.tsx +10 -10
- package/src/ui/stores/authStore.ts +8 -48
- package/src/ui/styles/spacing.ts +2 -15
- package/src/ui/utils/avatarUtils.ts +21 -19
- package/src/ui/utils/sessionHelpers.ts +0 -7
- package/src/utils/__tests__/validationUtils.test.ts +1 -16
- package/src/utils/deviceManager.ts +198 -0
- package/src/utils/errorUtils.ts +1 -8
- package/src/utils/index.ts +2 -1
- package/src/utils/sessionUtils.ts +0 -8
- package/src/utils/validationUtils.ts +0 -12
- package/lib/commonjs/adapters/expo/crypto.js +0 -56
- package/lib/commonjs/adapters/expo/crypto.js.map +0 -1
- package/lib/commonjs/adapters/expo/fetch.js +0 -30
- package/lib/commonjs/adapters/expo/fetch.js.map +0 -1
- package/lib/commonjs/adapters/expo/index.js +0 -48
- package/lib/commonjs/adapters/expo/index.js.map +0 -1
- package/lib/commonjs/adapters/expo/storage.js +0 -201
- package/lib/commonjs/adapters/expo/storage.js.map +0 -1
- package/lib/commonjs/adapters/index.js +0 -48
- package/lib/commonjs/adapters/index.js.map +0 -1
- package/lib/commonjs/adapters/node/crypto.js +0 -40
- package/lib/commonjs/adapters/node/crypto.js.map +0 -1
- package/lib/commonjs/adapters/node/fetch.js +0 -62
- package/lib/commonjs/adapters/node/fetch.js.map +0 -1
- package/lib/commonjs/adapters/node/index.js +0 -34
- package/lib/commonjs/adapters/node/index.js.map +0 -1
- package/lib/commonjs/adapters/node/storage.js +0 -163
- package/lib/commonjs/adapters/node/storage.js.map +0 -1
- package/lib/commonjs/core/identity-session/DeviceManager.js +0 -237
- package/lib/commonjs/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/commonjs/core/identity-session/IdentityManager.js +0 -400
- package/lib/commonjs/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js +0 -394
- package/lib/commonjs/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/RefreshManager.js +0 -137
- package/lib/commonjs/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/SessionManager.js +0 -427
- package/lib/commonjs/core/identity-session/SessionManager.js.map +0 -1
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js +0 -24
- package/lib/commonjs/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/commonjs/core/identity-session/errors.js +0 -176
- package/lib/commonjs/core/identity-session/errors.js.map +0 -1
- package/lib/commonjs/core/identity-session/index.js +0 -80
- package/lib/commonjs/core/identity-session/index.js.map +0 -1
- package/lib/commonjs/core/identity-session/types.js +0 -2
- package/lib/commonjs/core/identity-session/types.js.map +0 -1
- package/lib/commonjs/crypto/README.md +0 -142
- package/lib/commonjs/crypto/core.js +0 -147
- package/lib/commonjs/crypto/core.js.map +0 -1
- package/lib/commonjs/node/signatureService.js +0 -107
- package/lib/commonjs/node/signatureService.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/index.js +0 -37
- package/lib/commonjs/ui/hooks/auth/index.js.map +0 -1
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js +0 -171
- package/lib/commonjs/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +0 -52
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js +0 -125
- package/lib/commonjs/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js +0 -81
- package/lib/commonjs/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/commonjs/ui/hooks/useTransferQueries.js +0 -85
- package/lib/commonjs/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/commonjs/ui/stores/transferStore.js +0 -157
- package/lib/commonjs/ui/stores/transferStore.js.map +0 -1
- package/lib/module/adapters/expo/crypto.js +0 -51
- package/lib/module/adapters/expo/crypto.js.map +0 -1
- package/lib/module/adapters/expo/fetch.js +0 -26
- package/lib/module/adapters/expo/fetch.js.map +0 -1
- package/lib/module/adapters/expo/index.js +0 -45
- package/lib/module/adapters/expo/index.js.map +0 -1
- package/lib/module/adapters/expo/storage.js +0 -198
- package/lib/module/adapters/expo/storage.js.map +0 -1
- package/lib/module/adapters/index.js +0 -45
- package/lib/module/adapters/index.js.map +0 -1
- package/lib/module/adapters/node/crypto.js +0 -36
- package/lib/module/adapters/node/crypto.js.map +0 -1
- package/lib/module/adapters/node/fetch.js +0 -57
- package/lib/module/adapters/node/fetch.js.map +0 -1
- package/lib/module/adapters/node/index.js +0 -31
- package/lib/module/adapters/node/index.js.map +0 -1
- package/lib/module/adapters/node/storage.js +0 -159
- package/lib/module/adapters/node/storage.js.map +0 -1
- package/lib/module/core/identity-session/DeviceManager.js +0 -232
- package/lib/module/core/identity-session/DeviceManager.js.map +0 -1
- package/lib/module/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/lib/module/core/identity-session/IdentityManager.js +0 -395
- package/lib/module/core/identity-session/IdentityManager.js.map +0 -1
- package/lib/module/core/identity-session/IdentitySessionCore.js +0 -390
- package/lib/module/core/identity-session/IdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/RefreshManager.js +0 -132
- package/lib/module/core/identity-session/RefreshManager.js.map +0 -1
- package/lib/module/core/identity-session/SessionManager.js +0 -422
- package/lib/module/core/identity-session/SessionManager.js.map +0 -1
- package/lib/module/core/identity-session/createIdentitySessionCore.js +0 -21
- package/lib/module/core/identity-session/createIdentitySessionCore.js.map +0 -1
- package/lib/module/core/identity-session/errors.js +0 -170
- package/lib/module/core/identity-session/errors.js.map +0 -1
- package/lib/module/core/identity-session/index.js +0 -17
- package/lib/module/core/identity-session/index.js.map +0 -1
- package/lib/module/core/identity-session/types.js +0 -2
- package/lib/module/core/identity-session/types.js.map +0 -1
- package/lib/module/crypto/README.md +0 -142
- package/lib/module/crypto/core.js +0 -133
- package/lib/module/crypto/core.js.map +0 -1
- package/lib/module/node/signatureService.js +0 -101
- package/lib/module/node/signatureService.js.map +0 -1
- package/lib/module/ui/hooks/auth/index.js +0 -7
- package/lib/module/ui/hooks/auth/index.js.map +0 -1
- package/lib/module/ui/hooks/auth/useUsernameValidation.js +0 -167
- package/lib/module/ui/hooks/auth/useUsernameValidation.js.map +0 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +0 -48
- package/lib/module/ui/hooks/useAvatarPicker.js.map +0 -1
- package/lib/module/ui/hooks/useIdentityTransfer.js +0 -121
- package/lib/module/ui/hooks/useIdentityTransfer.js.map +0 -1
- package/lib/module/ui/hooks/useTransferCodesPersistence.js +0 -77
- package/lib/module/ui/hooks/useTransferCodesPersistence.js.map +0 -1
- package/lib/module/ui/hooks/useTransferQueries.js +0 -80
- package/lib/module/ui/hooks/useTransferQueries.js.map +0 -1
- package/lib/module/ui/stores/transferStore.js +0 -152
- package/lib/module/ui/stores/transferStore.js.map +0 -1
- package/lib/typescript/adapters/expo/crypto.d.ts +0 -17
- package/lib/typescript/adapters/expo/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/fetch.d.ts +0 -16
- package/lib/typescript/adapters/expo/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/index.d.ts +0 -23
- package/lib/typescript/adapters/expo/index.d.ts.map +0 -1
- package/lib/typescript/adapters/expo/storage.d.ts +0 -23
- package/lib/typescript/adapters/expo/storage.d.ts.map +0 -1
- package/lib/typescript/adapters/index.d.ts +0 -17
- package/lib/typescript/adapters/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/crypto.d.ts +0 -17
- package/lib/typescript/adapters/node/crypto.d.ts.map +0 -1
- package/lib/typescript/adapters/node/fetch.d.ts +0 -16
- package/lib/typescript/adapters/node/fetch.d.ts.map +0 -1
- package/lib/typescript/adapters/node/index.d.ts +0 -23
- package/lib/typescript/adapters/node/index.d.ts.map +0 -1
- package/lib/typescript/adapters/node/storage.d.ts +0 -23
- package/lib/typescript/adapters/node/storage.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/DeviceManager.d.ts +0 -64
- package/lib/typescript/core/identity-session/DeviceManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentityManager.d.ts +0 -88
- package/lib/typescript/core/identity-session/IdentityManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts +0 -141
- package/lib/typescript/core/identity-session/IdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/RefreshManager.d.ts +0 -36
- package/lib/typescript/core/identity-session/RefreshManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/SessionManager.d.ts +0 -104
- package/lib/typescript/core/identity-session/SessionManager.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts +0 -11
- package/lib/typescript/core/identity-session/createIdentitySessionCore.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/errors.d.ts +0 -63
- package/lib/typescript/core/identity-session/errors.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/index.d.ts +0 -14
- package/lib/typescript/core/identity-session/index.d.ts.map +0 -1
- package/lib/typescript/core/identity-session/types.d.ts +0 -196
- package/lib/typescript/core/identity-session/types.d.ts.map +0 -1
- package/lib/typescript/crypto/core.d.ts +0 -56
- package/lib/typescript/crypto/core.d.ts.map +0 -1
- package/lib/typescript/node/signatureService.d.ts +0 -55
- package/lib/typescript/node/signatureService.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/index.d.ts +0 -6
- package/lib/typescript/ui/hooks/auth/index.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts +0 -32
- package/lib/typescript/ui/hooks/auth/useUsernameValidation.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts +0 -18
- package/lib/typescript/ui/hooks/useAvatarPicker.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts +0 -24
- package/lib/typescript/ui/hooks/useIdentityTransfer.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts +0 -6
- package/lib/typescript/ui/hooks/useTransferCodesPersistence.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts +0 -26
- package/lib/typescript/ui/hooks/useTransferQueries.d.ts.map +0 -1
- package/lib/typescript/ui/stores/transferStore.d.ts +0 -36
- package/lib/typescript/ui/stores/transferStore.d.ts.map +0 -1
- package/src/adapters/expo/crypto.ts +0 -55
- package/src/adapters/expo/fetch.ts +0 -28
- package/src/adapters/expo/index.ts +0 -51
- package/src/adapters/expo/storage.ts +0 -228
- package/src/adapters/index.ts +0 -48
- package/src/adapters/node/crypto.ts +0 -39
- package/src/adapters/node/fetch.ts +0 -59
- package/src/adapters/node/index.ts +0 -37
- package/src/adapters/node/storage.ts +0 -170
- package/src/core/identity-session/DeviceManager.ts +0 -273
- package/src/core/identity-session/INTEGRATION_GUIDE.md +0 -287
- package/src/core/identity-session/IdentityManager.ts +0 -474
- package/src/core/identity-session/IdentitySessionCore.ts +0 -464
- package/src/core/identity-session/RefreshManager.ts +0 -189
- package/src/core/identity-session/SessionManager.ts +0 -500
- package/src/core/identity-session/createIdentitySessionCore.ts +0 -19
- package/src/core/identity-session/errors.ts +0 -197
- package/src/core/identity-session/index.ts +0 -15
- package/src/core/identity-session/types.ts +0 -188
- package/src/crypto/README.md +0 -142
- package/src/crypto/__tests__/core.test.ts +0 -203
- package/src/crypto/core.ts +0 -142
- package/src/node/signatureService.ts +0 -126
- package/src/ui/hooks/auth/index.ts +0 -9
- package/src/ui/hooks/auth/useUsernameValidation.ts +0 -177
- package/src/ui/hooks/useAvatarPicker.ts +0 -62
- package/src/ui/hooks/useIdentityTransfer.ts +0 -135
- package/src/ui/hooks/useTransferCodesPersistence.ts +0 -80
- package/src/ui/hooks/useTransferQueries.ts +0 -102
- package/src/ui/stores/transferStore.ts +0 -201
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
IdentitySessionCore: true,
|
|
8
|
-
IdentityManager: true,
|
|
9
|
-
SessionManager: true,
|
|
10
|
-
DeviceManager: true,
|
|
11
|
-
RefreshManager: true,
|
|
12
|
-
createIdentitySessionCore: true
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "DeviceManager", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return _DeviceManager.DeviceManager;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "IdentityManager", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function () {
|
|
23
|
-
return _IdentityManager.IdentityManager;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "IdentitySessionCore", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function () {
|
|
29
|
-
return _IdentitySessionCore.IdentitySessionCore;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "RefreshManager", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _RefreshManager.RefreshManager;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(exports, "SessionManager", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function () {
|
|
41
|
-
return _SessionManager.SessionManager;
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "createIdentitySessionCore", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function () {
|
|
47
|
-
return _createIdentitySessionCore.createIdentitySessionCore;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
var _IdentitySessionCore = require("./IdentitySessionCore");
|
|
51
|
-
var _IdentityManager = require("./IdentityManager");
|
|
52
|
-
var _SessionManager = require("./SessionManager");
|
|
53
|
-
var _DeviceManager = require("./DeviceManager");
|
|
54
|
-
var _RefreshManager = require("./RefreshManager");
|
|
55
|
-
var _createIdentitySessionCore = require("./createIdentitySessionCore");
|
|
56
|
-
var _types = require("./types");
|
|
57
|
-
Object.keys(_types).forEach(function (key) {
|
|
58
|
-
if (key === "default" || key === "__esModule") return;
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
60
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
61
|
-
Object.defineProperty(exports, key, {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function () {
|
|
64
|
-
return _types[key];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
var _errors = require("./errors");
|
|
69
|
-
Object.keys(_errors).forEach(function (key) {
|
|
70
|
-
if (key === "default" || key === "__esModule") return;
|
|
71
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
72
|
-
if (key in exports && exports[key] === _errors[key]) return;
|
|
73
|
-
Object.defineProperty(exports, key, {
|
|
74
|
-
enumerable: true,
|
|
75
|
-
get: function () {
|
|
76
|
-
return _errors[key];
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_IdentitySessionCore","require","_IdentityManager","_SessionManager","_DeviceManager","_RefreshManager","_createIdentitySessionCore","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_errors"],"sourceRoot":"../../../../src","sources":["core/identity-session/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAF,MAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,MAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,MAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,OAAA,GAAAnB,OAAA;AAAAO,MAAA,CAAAC,IAAA,CAAAW,OAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,OAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,OAAA,CAAAT,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["core/identity-session/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
# Oxy Crypto Module
|
|
2
|
-
|
|
3
|
-
This module provides cryptographic operations for the Oxy ecosystem, supporting both React Native and Node.js environments.
|
|
4
|
-
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
The crypto module is organized into several layers:
|
|
8
|
-
|
|
9
|
-
### Core Layer (`core.ts`)
|
|
10
|
-
Platform-agnostic cryptographic functions that work everywhere:
|
|
11
|
-
- Signature verification using elliptic curve cryptography
|
|
12
|
-
- Public/private key validation
|
|
13
|
-
- Message formatting (auth, registration, requests)
|
|
14
|
-
- Utility functions (shortenPublicKey, derivePublicKey, etc.)
|
|
15
|
-
|
|
16
|
-
### Platform-Specific Implementations
|
|
17
|
-
|
|
18
|
-
#### React Native (`signatureService.ts`, `keyManager.ts`)
|
|
19
|
-
- **KeyManager**: Manages ECDSA key pairs with secure storage via Expo SecureStore
|
|
20
|
-
- ⚠️ **For Oxy Accounts app only** - Not intended for third-party apps
|
|
21
|
-
- Handles key generation, import, backup, and secure retrieval
|
|
22
|
-
- Private keys never leave the device
|
|
23
|
-
|
|
24
|
-
- **SignatureService**: Provides async signing and verification
|
|
25
|
-
- Uses `expo-crypto` for hashing in React Native
|
|
26
|
-
- Falls back to Node.js crypto when available
|
|
27
|
-
- Suitable for both React Native and Node.js environments
|
|
28
|
-
|
|
29
|
-
#### Node.js (`node/signatureService.ts`)
|
|
30
|
-
- Optimized synchronous signature operations for backend
|
|
31
|
-
- Uses Node's `crypto` module directly for better performance
|
|
32
|
-
- Exports same API as React Native version for consistency
|
|
33
|
-
|
|
34
|
-
## Usage
|
|
35
|
-
|
|
36
|
-
### In React Native / Accounts App
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { KeyManager, SignatureService } from '@oxyhq/services/crypto';
|
|
40
|
-
|
|
41
|
-
// Create identity (Accounts app only)
|
|
42
|
-
const publicKey = await KeyManager.createIdentity();
|
|
43
|
-
|
|
44
|
-
// Sign a challenge
|
|
45
|
-
const signature = await SignatureService.sign(message);
|
|
46
|
-
|
|
47
|
-
// Verify a signature
|
|
48
|
-
const isValid = await SignatureService.verify(message, signature, publicKey);
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### In Node.js Backend
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
import { SignatureService } from '@oxyhq/services/node';
|
|
55
|
-
|
|
56
|
-
// Generate challenge
|
|
57
|
-
const challenge = SignatureService.generateChallenge();
|
|
58
|
-
|
|
59
|
-
// Verify signature (synchronous)
|
|
60
|
-
const isValid = SignatureService.verifyChallengeResponse(
|
|
61
|
-
publicKey,
|
|
62
|
-
challenge,
|
|
63
|
-
signature,
|
|
64
|
-
timestamp
|
|
65
|
-
);
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### In Third-Party Apps (Services SDK)
|
|
69
|
-
|
|
70
|
-
Third-party apps should **not** use KeyManager directly. Instead, use the authentication flows provided by the OxyServices class:
|
|
71
|
-
|
|
72
|
-
```typescript
|
|
73
|
-
import { OxyServices } from '@oxyhq/services';
|
|
74
|
-
|
|
75
|
-
const oxy = new OxyServices({ baseURL: 'https://api.oxy.so' });
|
|
76
|
-
|
|
77
|
-
// Request authentication (shows QR code / deep link)
|
|
78
|
-
// User approves in Oxy Accounts app
|
|
79
|
-
// Returns session when approved
|
|
80
|
-
const session = await oxy.requestAuth({ appId: 'my-app' });
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Security Considerations
|
|
84
|
-
|
|
85
|
-
### Message Formats
|
|
86
|
-
All signed messages follow specific formats to prevent replay attacks:
|
|
87
|
-
|
|
88
|
-
- **Authentication**: `auth:{publicKey}:{challenge}:{timestamp}`
|
|
89
|
-
- **Registration**: `oxy:register:{publicKey}:{timestamp}`
|
|
90
|
-
- **API Requests**: `request:{publicKey}:{timestamp}:{canonicalData}`
|
|
91
|
-
|
|
92
|
-
Timestamps must be within 5 minutes to be valid.
|
|
93
|
-
|
|
94
|
-
### Key Storage
|
|
95
|
-
- Private keys are stored in device secure storage (iOS Keychain, Android Keystore)
|
|
96
|
-
- Never transmitted or exposed outside the device
|
|
97
|
-
- Only the Oxy Accounts app has access to private keys
|
|
98
|
-
|
|
99
|
-
### Backup Encryption
|
|
100
|
-
⚠️ **Current Implementation**: The backup encryption currently uses a custom XOR scheme with key stretching. This is functional but not optimal.
|
|
101
|
-
|
|
102
|
-
📋 **Planned Improvement**: Migrate to standard AES-256-GCM encryption for better security and interoperability.
|
|
103
|
-
|
|
104
|
-
## Separation of Concerns
|
|
105
|
-
|
|
106
|
-
### Oxy Accounts App
|
|
107
|
-
- Owns and manages the user's private key
|
|
108
|
-
- Handles identity creation, backup, and recovery
|
|
109
|
-
- Signs authentication challenges
|
|
110
|
-
- Uses `KeyManager` and `SignatureService`
|
|
111
|
-
|
|
112
|
-
### Services SDK / Third-Party Apps
|
|
113
|
-
- Does NOT generate or store private keys
|
|
114
|
-
- Displays QR codes and deep links for authentication
|
|
115
|
-
- Polls server for authentication status
|
|
116
|
-
- Uses `OxyServices` class for API communication
|
|
117
|
-
|
|
118
|
-
### API Backend
|
|
119
|
-
- Generates challenges
|
|
120
|
-
- Verifies signatures using public keys
|
|
121
|
-
- Manages sessions and user data
|
|
122
|
-
- Uses `SignatureService` from `@oxyhq/services/node`
|
|
123
|
-
|
|
124
|
-
## Migration from Old Signature Service
|
|
125
|
-
|
|
126
|
-
The API previously had a duplicate `signature.service.ts` file. This has been replaced with a re-export from `@oxyhq/services/node` to ensure consistency and eliminate duplication.
|
|
127
|
-
|
|
128
|
-
If you're maintaining code that imports from the old location, it will continue to work as the file now re-exports from the shared module.
|
|
129
|
-
|
|
130
|
-
## Testing
|
|
131
|
-
|
|
132
|
-
When making changes to crypto code:
|
|
133
|
-
1. Test in both React Native and Node.js environments
|
|
134
|
-
2. Verify signatures created in one environment can be verified in another
|
|
135
|
-
3. Check that timestamps are properly validated
|
|
136
|
-
4. Ensure message formats match exactly between client and server
|
|
137
|
-
|
|
138
|
-
## Further Reading
|
|
139
|
-
|
|
140
|
-
- [Public Key Authentication Guide](../docs/PUBLIC_KEY_AUTHENTICATION.md)
|
|
141
|
-
- [ECDSA on secp256k1](https://en.bitcoin.it/wiki/Secp256k1)
|
|
142
|
-
- [Expo SecureStore Documentation](https://docs.expo.dev/versions/latest/sdk/securestore/)
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MAX_SIGNATURE_AGE_MS = exports.CHALLENGE_TTL_MS = void 0;
|
|
7
|
-
exports.buildAuthMessage = buildAuthMessage;
|
|
8
|
-
exports.buildRegistrationMessage = buildRegistrationMessage;
|
|
9
|
-
exports.buildRequestMessage = buildRequestMessage;
|
|
10
|
-
exports.derivePublicKey = derivePublicKey;
|
|
11
|
-
exports.getEllipticCurve = getEllipticCurve;
|
|
12
|
-
exports.isTimestampFresh = isTimestampFresh;
|
|
13
|
-
exports.isValidPrivateKey = isValidPrivateKey;
|
|
14
|
-
exports.isValidPublicKey = isValidPublicKey;
|
|
15
|
-
exports.shortenPublicKey = shortenPublicKey;
|
|
16
|
-
exports.verifySignatureCore = verifySignatureCore;
|
|
17
|
-
var _elliptic = require("elliptic");
|
|
18
|
-
/**
|
|
19
|
-
* Core Cryptographic Functions - Platform Agnostic
|
|
20
|
-
*
|
|
21
|
-
* This module contains the core signature verification logic
|
|
22
|
-
* that is shared between all platforms (React Native, Node.js, Web).
|
|
23
|
-
* Platform-specific implementations (hashing, random generation) are injected.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
const ec = new _elliptic.ec('secp256k1');
|
|
27
|
-
|
|
28
|
-
// Constants for signature validation
|
|
29
|
-
const CHALLENGE_TTL_MS = exports.CHALLENGE_TTL_MS = 5 * 60 * 1000; // 5 minutes
|
|
30
|
-
const MAX_SIGNATURE_AGE_MS = exports.MAX_SIGNATURE_AGE_MS = 5 * 60 * 1000; // 5 minutes
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Core signature verification using elliptic curve
|
|
34
|
-
* This is platform-agnostic and works everywhere
|
|
35
|
-
*/
|
|
36
|
-
function verifySignatureCore(messageHash, signature, publicKey) {
|
|
37
|
-
try {
|
|
38
|
-
const key = ec.keyFromPublic(publicKey, 'hex');
|
|
39
|
-
return key.verify(messageHash, signature);
|
|
40
|
-
} catch {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Validate that a string is a valid public key
|
|
47
|
-
*/
|
|
48
|
-
function isValidPublicKey(publicKey) {
|
|
49
|
-
// Reject empty strings
|
|
50
|
-
if (!publicKey || publicKey.trim().length === 0) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
ec.keyFromPublic(publicKey, 'hex');
|
|
55
|
-
return true;
|
|
56
|
-
} catch {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Validate that a string is a valid private key
|
|
63
|
-
*/
|
|
64
|
-
function isValidPrivateKey(privateKey) {
|
|
65
|
-
// Reject empty strings
|
|
66
|
-
if (!privateKey || privateKey.trim().length === 0) {
|
|
67
|
-
return false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Private keys must be 64 hex characters (32 bytes)
|
|
71
|
-
if (!/^[0-9a-fA-F]{64}$/.test(privateKey)) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
try {
|
|
75
|
-
const keyPair = ec.keyFromPrivate(privateKey);
|
|
76
|
-
// Verify it can derive a public key and the key is valid
|
|
77
|
-
keyPair.getPublic('hex');
|
|
78
|
-
// Check that the private key is not zero (which would be invalid)
|
|
79
|
-
const priv = keyPair.getPrivate();
|
|
80
|
-
if (!priv || priv.isZero()) {
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
return true;
|
|
84
|
-
} catch {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Get a shortened display version of a public key
|
|
91
|
-
* Format: first 8 chars...last 8 chars
|
|
92
|
-
*/
|
|
93
|
-
function shortenPublicKey(publicKey) {
|
|
94
|
-
if (publicKey.length <= 20) return publicKey;
|
|
95
|
-
return `${publicKey.slice(0, 8)}...${publicKey.slice(-8)}`;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Derive public key from a private key (without storing)
|
|
100
|
-
*/
|
|
101
|
-
function derivePublicKey(privateKey) {
|
|
102
|
-
const keyPair = ec.keyFromPrivate(privateKey);
|
|
103
|
-
return keyPair.getPublic('hex');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Check timestamp freshness
|
|
108
|
-
*/
|
|
109
|
-
function isTimestampFresh(timestamp, maxAgeMs = MAX_SIGNATURE_AGE_MS) {
|
|
110
|
-
const now = Date.now();
|
|
111
|
-
return now - timestamp <= maxAgeMs;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Build authentication challenge message
|
|
116
|
-
* Format: auth:{publicKey}:{challenge}:{timestamp}
|
|
117
|
-
*/
|
|
118
|
-
function buildAuthMessage(publicKey, challenge, timestamp) {
|
|
119
|
-
return `auth:${publicKey}:${challenge}:${timestamp}`;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Build registration message
|
|
124
|
-
* Format: oxy:register:{publicKey}:{timestamp}
|
|
125
|
-
*/
|
|
126
|
-
function buildRegistrationMessage(publicKey, timestamp) {
|
|
127
|
-
return `oxy:register:${publicKey}:${timestamp}`;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Build request signature message
|
|
132
|
-
* Format: request:{publicKey}:{timestamp}:{canonicalString}
|
|
133
|
-
*/
|
|
134
|
-
function buildRequestMessage(publicKey, timestamp, data) {
|
|
135
|
-
const sortedKeys = Object.keys(data).sort();
|
|
136
|
-
const canonicalParts = sortedKeys.map(key => `${key}:${JSON.stringify(data[key])}`);
|
|
137
|
-
const canonicalString = canonicalParts.join('|');
|
|
138
|
-
return `request:${publicKey}:${timestamp}:${canonicalString}`;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Get the elliptic curve instance (for key generation)
|
|
143
|
-
*/
|
|
144
|
-
function getEllipticCurve() {
|
|
145
|
-
return ec;
|
|
146
|
-
}
|
|
147
|
-
//# sourceMappingURL=core.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_elliptic","require","ec","EC","CHALLENGE_TTL_MS","exports","MAX_SIGNATURE_AGE_MS","verifySignatureCore","messageHash","signature","publicKey","key","keyFromPublic","verify","isValidPublicKey","trim","length","isValidPrivateKey","privateKey","test","keyPair","keyFromPrivate","getPublic","priv","getPrivate","isZero","shortenPublicKey","slice","derivePublicKey","isTimestampFresh","timestamp","maxAgeMs","now","Date","buildAuthMessage","challenge","buildRegistrationMessage","buildRequestMessage","data","sortedKeys","Object","keys","sort","canonicalParts","map","JSON","stringify","canonicalString","join","getEllipticCurve"],"sourceRoot":"../../../src","sources":["crypto/core.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.SignatureService = void 0;
|
|
7
|
-
var _crypto = _interopRequireDefault(require("crypto"));
|
|
8
|
-
var _core = require("../crypto/core");
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
-
/**
|
|
11
|
-
* Node.js Signature Service
|
|
12
|
-
*
|
|
13
|
-
* Provides synchronous signature operations for Node.js backend.
|
|
14
|
-
* Uses Node's crypto module for hashing and the shared core for verification.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
class SignatureService {
|
|
18
|
-
/**
|
|
19
|
-
* Generate a random challenge string
|
|
20
|
-
*/
|
|
21
|
-
static generateChallenge() {
|
|
22
|
-
return _crypto.default.randomBytes(32).toString('hex');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Compute SHA-256 hash of a message (synchronous)
|
|
27
|
-
*/
|
|
28
|
-
static hashMessage(message) {
|
|
29
|
-
return _crypto.default.createHash('sha256').update(message).digest('hex');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Verify an ECDSA signature (synchronous)
|
|
34
|
-
*
|
|
35
|
-
* @param message - The original message that was signed
|
|
36
|
-
* @param signature - The signature in DER format (hex encoded)
|
|
37
|
-
* @param publicKey - The public key (hex encoded, uncompressed)
|
|
38
|
-
* @returns true if the signature is valid
|
|
39
|
-
*/
|
|
40
|
-
static verifySignature(message, signature, publicKey) {
|
|
41
|
-
const messageHash = SignatureService.hashMessage(message);
|
|
42
|
-
return (0, _core.verifySignatureCore)(messageHash, signature, publicKey);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Verify an authentication challenge response
|
|
47
|
-
*
|
|
48
|
-
* @param publicKey - The user's public key
|
|
49
|
-
* @param challenge - The original challenge string
|
|
50
|
-
* @param signature - The signature of the auth message
|
|
51
|
-
* @param timestamp - The timestamp when the signature was created
|
|
52
|
-
* @returns true if the challenge response is valid
|
|
53
|
-
*/
|
|
54
|
-
static verifyChallengeResponse(publicKey, challenge, signature, timestamp) {
|
|
55
|
-
// Check timestamp is not too old
|
|
56
|
-
if (!(0, _core.isTimestampFresh)(timestamp, _core.CHALLENGE_TTL_MS)) {
|
|
57
|
-
return false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Build the message and verify signature
|
|
61
|
-
const message = (0, _core.buildAuthMessage)(publicKey, challenge, timestamp);
|
|
62
|
-
return SignatureService.verifySignature(message, signature, publicKey);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Verify a registration signature
|
|
67
|
-
* Signature format: oxy:register:{publicKey}:{timestamp}
|
|
68
|
-
*/
|
|
69
|
-
static verifyRegistrationSignature(publicKey, signature, timestamp) {
|
|
70
|
-
// Check timestamp freshness
|
|
71
|
-
if (!(0, _core.isTimestampFresh)(timestamp, _core.MAX_SIGNATURE_AGE_MS)) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
const message = (0, _core.buildRegistrationMessage)(publicKey, timestamp);
|
|
75
|
-
return SignatureService.verifySignature(message, signature, publicKey);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Verify a signed request
|
|
80
|
-
* Used for authenticated API operations
|
|
81
|
-
*/
|
|
82
|
-
static verifyRequestSignature(publicKey, data, signature, timestamp) {
|
|
83
|
-
// Check timestamp freshness
|
|
84
|
-
if (!(0, _core.isTimestampFresh)(timestamp, _core.MAX_SIGNATURE_AGE_MS)) {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
const message = (0, _core.buildRequestMessage)(publicKey, timestamp, data);
|
|
88
|
-
return SignatureService.verifySignature(message, signature, publicKey);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Validate that a string is a valid public key
|
|
93
|
-
*/
|
|
94
|
-
static isValidPublicKey(publicKey) {
|
|
95
|
-
return (0, _core.isValidPublicKey)(publicKey);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Get a shortened display version of a public key
|
|
100
|
-
*/
|
|
101
|
-
static shortenPublicKey(publicKey) {
|
|
102
|
-
return (0, _core.shortenPublicKey)(publicKey);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.SignatureService = SignatureService;
|
|
106
|
-
var _default = exports.default = SignatureService;
|
|
107
|
-
//# sourceMappingURL=signatureService.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_crypto","_interopRequireDefault","require","_core","e","__esModule","default","SignatureService","generateChallenge","crypto","randomBytes","toString","hashMessage","message","createHash","update","digest","verifySignature","signature","publicKey","messageHash","verifySignatureCore","verifyChallengeResponse","challenge","timestamp","isTimestampFresh","CHALLENGE_TTL_MS","buildAuthMessage","verifyRegistrationSignature","MAX_SIGNATURE_AGE_MS","buildRegistrationMessage","verifyRequestSignature","data","buildRequestMessage","isValidPublicKey","shortenPublicKey","exports","_default"],"sourceRoot":"../../../src","sources":["node/signatureService.ts"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "USERNAME_DEBOUNCE_MS", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _useUsernameValidation.USERNAME_DEBOUNCE_MS;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "USERNAME_FORMAT_ERROR", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _useUsernameValidation.USERNAME_FORMAT_ERROR;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "USERNAME_MIN_LENGTH", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _useUsernameValidation.USERNAME_MIN_LENGTH;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "USERNAME_REGEX", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _useUsernameValidation.USERNAME_REGEX;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "useUsernameValidation", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _useUsernameValidation.useUsernameValidation;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
var _useUsernameValidation = require("./useUsernameValidation");
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_useUsernameValidation","require"],"sourceRoot":"../../../../../src","sources":["ui/hooks/auth/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAAA,sBAAA,GAAAC,OAAA","ignoreList":[]}
|