@cedros/login-react 0.0.12 → 0.0.14
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 +68 -0
- package/dist/AdminDepositList-CyT4VBH8.js +311 -0
- package/dist/AdminDepositList-CyT4VBH8.js.map +1 -0
- package/dist/AdminDepositList-b2AXtLg0.cjs +1 -0
- package/dist/AdminDepositList-b2AXtLg0.cjs.map +1 -0
- package/dist/AdminWithdrawalHistory-Cud-yuWy.js +916 -0
- package/dist/AdminWithdrawalHistory-Cud-yuWy.js.map +1 -0
- package/dist/AdminWithdrawalHistory-DL9zbu2b.cjs +1 -0
- package/dist/AdminWithdrawalHistory-DL9zbu2b.cjs.map +1 -0
- package/dist/AuthenticationSettings-D739nNul.cjs +1 -0
- package/dist/AuthenticationSettings-D739nNul.cjs.map +1 -0
- package/dist/AuthenticationSettings-DtLoxQ2z.cjs +1 -0
- package/dist/AuthenticationSettings-DtLoxQ2z.cjs.map +1 -0
- package/dist/AuthenticationSettings-Dx3JCI3m.js +9 -0
- package/dist/AuthenticationSettings-Dx3JCI3m.js.map +1 -0
- package/dist/AuthenticationSettings-vowmQPXz.js +525 -0
- package/dist/AuthenticationSettings-vowmQPXz.js.map +1 -0
- package/dist/AutosaveStatus-CCrZszKA.cjs +1 -0
- package/dist/AutosaveStatus-CCrZszKA.cjs.map +1 -0
- package/dist/AutosaveStatus-Ciyt350A.js +1497 -0
- package/dist/AutosaveStatus-Ciyt350A.js.map +1 -0
- package/dist/CreditSystemSettings-BQ3h4CyM.js +210 -0
- package/dist/CreditSystemSettings-BQ3h4CyM.js.map +1 -0
- package/dist/CreditSystemSettings-C6dUsu72.cjs +1 -0
- package/dist/CreditSystemSettings-C6dUsu72.cjs.map +1 -0
- package/dist/CreditSystemSettings-CBot8EPW.cjs +1 -0
- package/dist/CreditSystemSettings-CBot8EPW.cjs.map +1 -0
- package/dist/CreditSystemSettings-bVuNLsqp.js +9 -0
- package/dist/CreditSystemSettings-bVuNLsqp.js.map +1 -0
- package/dist/DepositsSection-BkKUS4vk.cjs +1 -0
- package/dist/DepositsSection-BkKUS4vk.cjs.map +1 -0
- package/dist/{DepositsSection-0Hqr0yDm.js → DepositsSection-DD9MKUFt.js} +20 -14
- package/dist/DepositsSection-DD9MKUFt.js.map +1 -0
- package/dist/EmailRegisterForm-Pvm3I8GP.cjs +1 -0
- package/dist/EmailRegisterForm-Pvm3I8GP.cjs.map +1 -0
- package/dist/EmailRegisterForm-nI0BOIxR.js +927 -0
- package/dist/EmailRegisterForm-nI0BOIxR.js.map +1 -0
- package/dist/EmailSettings-B9qwPSiM.cjs +1 -0
- package/dist/EmailSettings-B9qwPSiM.cjs.map +1 -0
- package/dist/EmailSettings-CCA8dNCi.js +17 -0
- package/dist/EmailSettings-CCA8dNCi.js.map +1 -0
- package/dist/EmailSettings-RbgAq9FB.cjs +1 -0
- package/dist/EmailSettings-RbgAq9FB.cjs.map +1 -0
- package/dist/{AuthenticationSettings-BSoIQ58T.js → EmailSettings-mxlKNcPl.js} +3 -3
- package/dist/EmailSettings-mxlKNcPl.js.map +1 -0
- package/dist/EmbeddedWalletSettings-B4h-8rxB.cjs +1 -0
- package/dist/EmbeddedWalletSettings-B4h-8rxB.cjs.map +1 -0
- package/dist/EmbeddedWalletSettings-BInZvFZf.js +79 -0
- package/dist/EmbeddedWalletSettings-BInZvFZf.js.map +1 -0
- package/dist/{EmbeddedWalletSettings-iVf_3pn3.js → EmbeddedWalletSettings-CXlZFFDw.js} +3 -3
- package/dist/EmbeddedWalletSettings-CXlZFFDw.js.map +1 -0
- package/dist/EmbeddedWalletSettings-D5JXae1L.cjs +1 -0
- package/dist/EmbeddedWalletSettings-D5JXae1L.cjs.map +1 -0
- package/dist/ErrorMessage-CHbYbVi2.cjs +1 -0
- package/dist/ErrorMessage-CHbYbVi2.cjs.map +1 -0
- package/dist/ErrorMessage-CcEK0pYO.js +64 -0
- package/dist/ErrorMessage-CcEK0pYO.js.map +1 -0
- package/dist/{GoogleLoginButton-BzHr545L.js → GoogleLoginButton-CXwp4LsQ.js} +4 -3
- package/dist/{GoogleLoginButton-BzHr545L.js.map → GoogleLoginButton-CXwp4LsQ.js.map} +1 -1
- package/dist/GoogleLoginButton-zS_69-KV.cjs +1 -0
- package/dist/{GoogleLoginButton-DoAdOqb3.cjs.map → GoogleLoginButton-zS_69-KV.cjs.map} +1 -1
- package/dist/LoadingSpinner-6vml-zwr.js +79 -0
- package/dist/LoadingSpinner-6vml-zwr.js.map +1 -0
- package/dist/LoadingSpinner-d6sSxgQN.cjs +1 -0
- package/dist/LoadingSpinner-d6sSxgQN.cjs.map +1 -0
- package/dist/PermissionsSection-BPbE-hNx.cjs +1 -0
- package/dist/PermissionsSection-BPbE-hNx.cjs.map +1 -0
- package/dist/PermissionsSection-CighC1p6.js +1026 -0
- package/dist/PermissionsSection-CighC1p6.js.map +1 -0
- package/dist/ServerSettings-BE8fsE5k.js +84 -0
- package/dist/ServerSettings-BE8fsE5k.js.map +1 -0
- package/dist/ServerSettings-CYTlQ2xy.cjs +1 -0
- package/dist/ServerSettings-CYTlQ2xy.cjs.map +1 -0
- package/dist/ServerSettings-DFs9jQ3f.cjs +1 -0
- package/dist/ServerSettings-DFs9jQ3f.cjs.map +1 -0
- package/dist/{ServerSettings-C_osdbiX.js → ServerSettings-pSmWDC1d.js} +3 -3
- package/dist/ServerSettings-pSmWDC1d.js.map +1 -0
- package/dist/SettingsPageLayout--GZ_iHLc.js +50 -0
- package/dist/SettingsPageLayout--GZ_iHLc.js.map +1 -0
- package/dist/SettingsPageLayout-j5lMjEID.cjs +1 -0
- package/dist/SettingsPageLayout-j5lMjEID.cjs.map +1 -0
- package/dist/SolanaLoginButton-BjOxpE1C.cjs +1 -0
- package/dist/{SolanaLoginButton-CPzms0kf.cjs.map → SolanaLoginButton-BjOxpE1C.cjs.map} +1 -1
- package/dist/{SolanaLoginButton-C-CfZxAZ.js → SolanaLoginButton-P22QjBaO.js} +5 -4
- package/dist/{SolanaLoginButton-C-CfZxAZ.js.map → SolanaLoginButton-P22QjBaO.js.map} +1 -1
- package/dist/StatsBar-BX-hHtTq.js +66 -0
- package/dist/StatsBar-BX-hHtTq.js.map +1 -0
- package/dist/StatsBar-DTUZCwDD.cjs +1 -0
- package/dist/StatsBar-DTUZCwDD.cjs.map +1 -0
- package/dist/{TeamSection-Bjt72upx.js → TeamSection-BIECkp7g.js} +27 -26
- package/dist/TeamSection-BIECkp7g.js.map +1 -0
- package/dist/TeamSection-BOH9pv_E.cjs +1 -0
- package/dist/TeamSection-BOH9pv_E.cjs.map +1 -0
- package/dist/UsersSection-e6q7FHzx.cjs +1 -0
- package/dist/UsersSection-e6q7FHzx.cjs.map +1 -0
- package/dist/UsersSection-t-zm0jZW.js +33 -0
- package/dist/UsersSection-t-zm0jZW.js.map +1 -0
- package/dist/{WebhookSettings-IyhyTFes.js → WebhookSettings-Bb70MbFj.js} +4 -4
- package/dist/WebhookSettings-Bb70MbFj.js.map +1 -0
- package/dist/WebhookSettings-C-gvNAW1.cjs +1 -0
- package/dist/WebhookSettings-C-gvNAW1.cjs.map +1 -0
- package/dist/WebhookSettings-CGyDKjrm.cjs +1 -0
- package/dist/WebhookSettings-CGyDKjrm.cjs.map +1 -0
- package/dist/WebhookSettings-kIstSjZi.js +17 -0
- package/dist/WebhookSettings-kIstSjZi.js.map +1 -0
- package/dist/WithdrawalsSection-sljIyeaz.cjs +1 -0
- package/dist/WithdrawalsSection-sljIyeaz.cjs.map +1 -0
- package/dist/WithdrawalsSection-yRDTVFsb.js +27 -0
- package/dist/WithdrawalsSection-yRDTVFsb.js.map +1 -0
- package/dist/admin-only.cjs +1 -0
- package/dist/admin-only.cjs.map +1 -0
- package/dist/{admin/types.d.ts → admin-only.d.ts} +228 -167
- package/dist/admin-only.js +8 -0
- package/dist/admin-only.js.map +1 -0
- package/dist/assets/argon2Worker-Bi5TuQvD.js.map +1 -1
- package/dist/email-only.cjs +1 -1
- package/dist/email-only.d.ts +645 -16
- package/dist/email-only.js +16 -13
- package/dist/email-only.js.map +1 -1
- package/dist/google-only.cjs +1 -1
- package/dist/google-only.d.ts +554 -13
- package/dist/google-only.js +11 -8
- package/dist/google-only.js.map +1 -1
- package/dist/index.cjs +2061 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5030 -144
- package/dist/index.js +13482 -117
- package/dist/index.js.map +1 -1
- package/dist/login-react.css +1 -1
- package/dist/plugin-8_dpq7tC.cjs +1 -0
- package/dist/plugin-8_dpq7tC.cjs.map +1 -0
- package/dist/plugin-D1NdppqC.js +596 -0
- package/dist/plugin-D1NdppqC.js.map +1 -0
- package/dist/sanitization-Bo_tn-L2.cjs +1 -0
- package/dist/sanitization-Bo_tn-L2.cjs.map +1 -0
- package/dist/sanitization-CQ-H1MSg.js +39 -0
- package/dist/sanitization-CQ-H1MSg.js.map +1 -0
- package/dist/shamir-4DyQMJCk.cjs +1 -0
- package/dist/shamir-4DyQMJCk.cjs.map +1 -0
- package/dist/{solanaKeypair-BlXol3nh.js → shamir-L-s-Tp1Z.js} +765 -757
- package/dist/shamir-L-s-Tp1Z.js.map +1 -0
- package/dist/silentWalletEnroll-BgTb4H5I.cjs +1 -0
- package/dist/silentWalletEnroll-BgTb4H5I.cjs.map +1 -0
- package/dist/silentWalletEnroll-DWt6Pr3B.js +41 -0
- package/dist/silentWalletEnroll-DWt6Pr3B.js.map +1 -0
- package/dist/solana-only.cjs +1 -1
- package/dist/solana-only.d.ts +605 -13
- package/dist/solana-only.js +12 -9
- package/dist/solana-only.js.map +1 -1
- package/dist/style.d.ts +1 -0
- package/dist/useAdminDeposits-BTSyeAfg.js +151 -0
- package/dist/useAdminDeposits-BTSyeAfg.js.map +1 -0
- package/dist/useAdminDeposits-BkkCwHWp.cjs +1 -0
- package/dist/useAdminDeposits-BkkCwHWp.cjs.map +1 -0
- package/dist/{ErrorMessage-DU2VBb85.js → useAuth-C3dpk0po.js} +1005 -1241
- package/dist/useAuth-C3dpk0po.js.map +1 -0
- package/dist/useAuth-D3Pk_H3z.cjs +1 -0
- package/dist/useAuth-D3Pk_H3z.cjs.map +1 -0
- package/dist/useCedrosLogin-C9MrcZvh.cjs +1 -0
- package/dist/useCedrosLogin-C9MrcZvh.cjs.map +1 -0
- package/dist/useCedrosLogin-_94MmGGq.js +216 -0
- package/dist/useCedrosLogin-_94MmGGq.js.map +1 -0
- package/dist/useOrgs-C3pzMA9h.js +215 -0
- package/dist/useOrgs-C3pzMA9h.js.map +1 -0
- package/dist/useOrgs-DDVRCaVi.cjs +1 -0
- package/dist/useOrgs-DDVRCaVi.cjs.map +1 -0
- package/dist/useSystemSettings-DBlAMjFi.js +97 -0
- package/dist/useSystemSettings-DBlAMjFi.js.map +1 -0
- package/dist/useSystemSettings-DRrreszl.cjs +1 -0
- package/dist/useSystemSettings-DRrreszl.cjs.map +1 -0
- package/dist/useUsersStatsSummary-8qY7iP4G.cjs +1 -0
- package/dist/useUsersStatsSummary-8qY7iP4G.cjs.map +1 -0
- package/dist/useUsersStatsSummary-NjEFvWuz.js +1246 -0
- package/dist/useUsersStatsSummary-NjEFvWuz.js.map +1 -0
- package/dist/{validation-BebL7hMF.js → validation-B8kMV3BL.js} +1 -1
- package/dist/{validation-BebL7hMF.js.map → validation-B8kMV3BL.js.map} +1 -1
- package/dist/{validation-BeXIfuHB.cjs → validation-BuGQrA-K.cjs} +1 -1
- package/dist/{validation-BeXIfuHB.cjs.map → validation-BuGQrA-K.cjs.map} +1 -1
- package/package.json +11 -1
- package/dist/AuthenticationSettings-BSoIQ58T.js.map +0 -1
- package/dist/AuthenticationSettings-CNmWEPFV.cjs +0 -1
- package/dist/AuthenticationSettings-CNmWEPFV.cjs.map +0 -1
- package/dist/CreditSystemSettings-BYxoFwaP.js +0 -9
- package/dist/CreditSystemSettings-BYxoFwaP.js.map +0 -1
- package/dist/CreditSystemSettings-D2fLorNx.cjs +0 -1
- package/dist/CreditSystemSettings-D2fLorNx.cjs.map +0 -1
- package/dist/DepositsSection-0Hqr0yDm.js.map +0 -1
- package/dist/DepositsSection-CGKCzM-H.cjs +0 -1
- package/dist/DepositsSection-CGKCzM-H.cjs.map +0 -1
- package/dist/EmailRegisterForm-C0PStlj5.js +0 -961
- package/dist/EmailRegisterForm-C0PStlj5.js.map +0 -1
- package/dist/EmailRegisterForm-DaPLGws2.cjs +0 -1
- package/dist/EmailRegisterForm-DaPLGws2.cjs.map +0 -1
- package/dist/EmailSettings-CiLDwzNb.cjs +0 -1
- package/dist/EmailSettings-CiLDwzNb.cjs.map +0 -1
- package/dist/EmailSettings-DTjpO65J.js +0 -9
- package/dist/EmailSettings-DTjpO65J.js.map +0 -1
- package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs +0 -1
- package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs.map +0 -1
- package/dist/EmbeddedWalletSettings-iVf_3pn3.js.map +0 -1
- package/dist/ErrorMessage-BXHiYibN.cjs +0 -1
- package/dist/ErrorMessage-BXHiYibN.cjs.map +0 -1
- package/dist/ErrorMessage-DU2VBb85.js.map +0 -1
- package/dist/GoogleLoginButton-DoAdOqb3.cjs +0 -1
- package/dist/ServerSettings-C_osdbiX.js.map +0 -1
- package/dist/ServerSettings-HqSb_VDj.cjs +0 -1
- package/dist/ServerSettings-HqSb_VDj.cjs.map +0 -1
- package/dist/SolanaLoginButton-CPzms0kf.cjs +0 -1
- package/dist/TeamSection-Bjt72upx.js.map +0 -1
- package/dist/TeamSection-DZeWHkLd.cjs +0 -1
- package/dist/TeamSection-DZeWHkLd.cjs.map +0 -1
- package/dist/UsersSection-DU86czWP.cjs +0 -1
- package/dist/UsersSection-DU86czWP.cjs.map +0 -1
- package/dist/UsersSection-hAcyfSZk.js +0 -81
- package/dist/UsersSection-hAcyfSZk.js.map +0 -1
- package/dist/WebhookSettings-Br9bakAL.cjs +0 -1
- package/dist/WebhookSettings-Br9bakAL.cjs.map +0 -1
- package/dist/WebhookSettings-IyhyTFes.js.map +0 -1
- package/dist/WithdrawalsSection-B1415d-G.js +0 -20
- package/dist/WithdrawalsSection-B1415d-G.js.map +0 -1
- package/dist/WithdrawalsSection-iZJBuZ7O.cjs +0 -1
- package/dist/WithdrawalsSection-iZJBuZ7O.cjs.map +0 -1
- package/dist/admin/AdminShell.d.ts +0 -38
- package/dist/admin/icons.d.ts +0 -2
- package/dist/admin/index.d.ts +0 -10
- package/dist/admin/plugin.d.ts +0 -3
- package/dist/admin/sections/AuthenticationSettings.d.ts +0 -3
- package/dist/admin/sections/CreditSystemSettings.d.ts +0 -3
- package/dist/admin/sections/DepositsSection.d.ts +0 -3
- package/dist/admin/sections/EmailSettings.d.ts +0 -3
- package/dist/admin/sections/EmbeddedWalletSettings.d.ts +0 -3
- package/dist/admin/sections/FeatureSettings.d.ts +0 -3
- package/dist/admin/sections/InvitesSection.d.ts +0 -3
- package/dist/admin/sections/MembersSection.d.ts +0 -3
- package/dist/admin/sections/ServerSettings.d.ts +0 -3
- package/dist/admin/sections/SettingsSections.d.ts +0 -7
- package/dist/admin/sections/TeamSection.d.ts +0 -3
- package/dist/admin/sections/UsersSection.d.ts +0 -3
- package/dist/admin/sections/WebhookSettings.d.ts +0 -3
- package/dist/admin/sections/WithdrawalsSection.d.ts +0 -3
- package/dist/components/LoginButton.d.ts +0 -23
- package/dist/components/LoginForm.d.ts +0 -9
- package/dist/components/LoginModal.d.ts +0 -9
- package/dist/components/admin/AdminUserDetail.d.ts +0 -23
- package/dist/components/admin/AdminUserList.d.ts +0 -21
- package/dist/components/admin/CedrosAdminDashboard.d.ts +0 -52
- package/dist/components/admin/PermissionsSection.d.ts +0 -7
- package/dist/components/admin/ProfileDropdown.d.ts +0 -34
- package/dist/components/admin/SetupWizard.d.ts +0 -30
- package/dist/components/admin/StatsBar.d.ts +0 -17
- package/dist/components/admin/SystemSettings.d.ts +0 -19
- package/dist/components/admin/settings/AuthenticationSettings.d.ts +0 -4
- package/dist/components/admin/settings/AutosaveStatus.d.ts +0 -6
- package/dist/components/admin/settings/CreditSystemSettings.d.ts +0 -6
- package/dist/components/admin/settings/EmailSettings.d.ts +0 -4
- package/dist/components/admin/settings/EmbeddedWalletSettings.d.ts +0 -4
- package/dist/components/admin/settings/FeatureSettings.d.ts +0 -4
- package/dist/components/admin/settings/MessagingSettings.d.ts +0 -4
- package/dist/components/admin/settings/SecuritySettings.d.ts +0 -4
- package/dist/components/admin/settings/ServerSettings.d.ts +0 -4
- package/dist/components/admin/settings/SettingsPageLayout.d.ts +0 -16
- package/dist/components/admin/settings/SsoProvidersSettings.d.ts +0 -4
- package/dist/components/admin/settings/WebhookSettings.d.ts +0 -4
- package/dist/components/admin/settings/index.d.ts +0 -31
- package/dist/components/admin/settings/settingsInputs.d.ts +0 -79
- package/dist/components/admin/settings/settingsMetadata.d.ts +0 -18
- package/dist/components/apple/AppleLoginButton.d.ts +0 -29
- package/dist/components/deposit/CreditBalance.d.ts +0 -19
- package/dist/components/deposit/DepositFlow.d.ts +0 -118
- package/dist/components/deposit/FeeConfigDisplay.d.ts +0 -15
- package/dist/components/deposit/History.d.ts +0 -21
- package/dist/components/deposit/TieredAmountSlider.d.ts +0 -19
- package/dist/components/deposit/TokenSelector.d.ts +0 -23
- package/dist/components/deposit/admin/AdminDepositList.d.ts +0 -21
- package/dist/components/deposit/admin/AdminDepositStats.d.ts +0 -15
- package/dist/components/deposit/admin/AdminPrivacyPeriodDeposits.d.ts +0 -19
- package/dist/components/deposit/admin/AdminWithdrawalHistory.d.ts +0 -19
- package/dist/components/deposit/admin/AdminWithdrawalQueue.d.ts +0 -23
- package/dist/components/deposit/admin/AdminWithdrawalStats.d.ts +0 -10
- package/dist/components/deposit/admin/FeatureDisabledMessage.d.ts +0 -15
- package/dist/components/deposit/admin/PrivacySystemStatus.d.ts +0 -15
- package/dist/components/deposit/admin/featureDisabled.d.ts +0 -14
- package/dist/components/deposit/admin/index.d.ts +0 -22
- package/dist/components/deposit/index.d.ts +0 -12
- package/dist/components/deposit/tierUtils.d.ts +0 -8
- package/dist/components/deposit/tokens.d.ts +0 -19
- package/dist/components/email/EmailLoginForm.d.ts +0 -11
- package/dist/components/email/EmailRegisterForm.d.ts +0 -14
- package/dist/components/email/ForgotPasswordForm.d.ts +0 -17
- package/dist/components/email/PasswordInput.d.ts +0 -14
- package/dist/components/email/ResetPasswordForm.d.ts +0 -22
- package/dist/components/google/GoogleLoginButton.d.ts +0 -12
- package/dist/components/invites/InviteForm.d.ts +0 -38
- package/dist/components/invites/InviteList.d.ts +0 -40
- package/dist/components/members/MemberList.d.ts +0 -47
- package/dist/components/org/CreateOrgForm.d.ts +0 -7
- package/dist/components/org/OrgAvatar.d.ts +0 -7
- package/dist/components/org/OrgListView.d.ts +0 -9
- package/dist/components/org/OrgSelector.d.ts +0 -52
- package/dist/components/org/OrgSwitcher.d.ts +0 -47
- package/dist/components/org/icons.d.ts +0 -8
- package/dist/components/profile/UserProfileSettings.d.ts +0 -35
- package/dist/components/profile/index.d.ts +0 -2
- package/dist/components/sessions/SessionList.d.ts +0 -33
- package/dist/components/shared/ErrorBoundary.d.ts +0 -38
- package/dist/components/shared/ErrorMessage.d.ts +0 -14
- package/dist/components/shared/LoadingSpinner.d.ts +0 -16
- package/dist/components/solana/SolanaLoginButton.d.ts +0 -49
- package/dist/components/templates/FullPageLayout.d.ts +0 -40
- package/dist/components/templates/SplitPageLayout.d.ts +0 -44
- package/dist/components/templates/index.d.ts +0 -4
- package/dist/components/totp/OtpInput.d.ts +0 -32
- package/dist/components/totp/QrCode.d.ts +0 -21
- package/dist/components/totp/TotpSettings.d.ts +0 -38
- package/dist/components/totp/TotpSetup.d.ts +0 -23
- package/dist/components/totp/TotpVerify.d.ts +0 -25
- package/dist/components/totp/index.d.ts +0 -10
- package/dist/components/wallet/CapabilityWarning.d.ts +0 -11
- package/dist/components/wallet/PasskeyPrompt.d.ts +0 -34
- package/dist/components/wallet/RecoveryPhraseDisplay.d.ts +0 -18
- package/dist/components/wallet/RecoveryPhraseInput.d.ts +0 -21
- package/dist/components/wallet/WalletAddressRow.d.ts +0 -10
- package/dist/components/wallet/WalletEnrollment.d.ts +0 -15
- package/dist/components/wallet/WalletManager.d.ts +0 -9
- package/dist/components/wallet/WalletRecovery.d.ts +0 -19
- package/dist/components/wallet/WalletStatus.d.ts +0 -28
- package/dist/components/wallet/WalletUnlock.d.ts +0 -23
- package/dist/components/wallet/index.d.ts +0 -23
- package/dist/components/webauthn/PasskeyLoginButton.d.ts +0 -8
- package/dist/context/CedrosLoginContext.d.ts +0 -24
- package/dist/context/CedrosLoginProvider.d.ts +0 -17
- package/dist/context/EmbeddedWalletExposure.d.ts +0 -19
- package/dist/context/useCedrosLogin.d.ts +0 -12
- package/dist/crypto/aesGcm.d.ts +0 -89
- package/dist/crypto/argon2.d.ts +0 -65
- package/dist/crypto/argon2Worker.d.ts +0 -1
- package/dist/crypto/argon2WorkerClient.d.ts +0 -28
- package/dist/crypto/bip39.d.ts +0 -106
- package/dist/crypto/capabilities.d.ts +0 -35
- package/dist/crypto/entropy.d.ts +0 -56
- package/dist/crypto/hkdf.d.ts +0 -38
- package/dist/crypto/index.d.ts +0 -30
- package/dist/crypto/secureWipe.d.ts +0 -71
- package/dist/crypto/shamir.d.ts +0 -52
- package/dist/crypto/solanaKeypair.d.ts +0 -63
- package/dist/crypto/types.d.ts +0 -134
- package/dist/crypto/webauthnPrf.d.ts +0 -108
- package/dist/hooks/useAdminDeposits.d.ts +0 -10
- package/dist/hooks/useAdminUsers.d.ts +0 -28
- package/dist/hooks/useAppleAuth.d.ts +0 -52
- package/dist/hooks/useAuth.d.ts +0 -34
- package/dist/hooks/useAuthSession.d.ts +0 -19
- package/dist/hooks/useAuthorize.d.ts +0 -62
- package/dist/hooks/useCredits.d.ts +0 -11
- package/dist/hooks/useDashboardPermissions.d.ts +0 -45
- package/dist/hooks/useDeposit.d.ts +0 -16
- package/dist/hooks/useEmailAuth.d.ts +0 -60
- package/dist/hooks/useGoogleAuth.d.ts +0 -67
- package/dist/hooks/useInstantLink.d.ts +0 -42
- package/dist/hooks/useInvites.d.ts +0 -57
- package/dist/hooks/useMembers.d.ts +0 -52
- package/dist/hooks/useOrgs.d.ts +0 -49
- package/dist/hooks/usePasswordReset.d.ts +0 -32
- package/dist/hooks/usePendingRecovery.d.ts +0 -34
- package/dist/hooks/useProfile.d.ts +0 -35
- package/dist/hooks/useRateLimiter.d.ts +0 -58
- package/dist/hooks/useServerFeatures.d.ts +0 -55
- package/dist/hooks/useSessions.d.ts +0 -45
- package/dist/hooks/useSettingsAutosave.d.ts +0 -29
- package/dist/hooks/useSetup.d.ts +0 -25
- package/dist/hooks/useSolanaAuth.d.ts +0 -30
- package/dist/hooks/useSsoProviders.d.ts +0 -52
- package/dist/hooks/useSystemSettings.d.ts +0 -47
- package/dist/hooks/useThemeManager.d.ts +0 -11
- package/dist/hooks/useTotp.d.ts +0 -52
- package/dist/hooks/useTotpVerify.d.ts +0 -38
- package/dist/hooks/useTransactionSigning.d.ts +0 -45
- package/dist/hooks/useWallet.d.ts +0 -10
- package/dist/hooks/useWalletDiscovery.d.ts +0 -24
- package/dist/hooks/useWalletEnrollment.d.ts +0 -9
- package/dist/hooks/useWalletMaterial.d.ts +0 -10
- package/dist/hooks/useWalletRecovery.d.ts +0 -9
- package/dist/hooks/useWalletSigning.d.ts +0 -31
- package/dist/hooks/useWebAuthn.d.ts +0 -25
- package/dist/i18n/I18nProvider.d.ts +0 -16
- package/dist/i18n/context.d.ts +0 -6
- package/dist/i18n/index.d.ts +0 -5
- package/dist/i18n/translations.d.ts +0 -66
- package/dist/i18n/useI18n.d.ts +0 -9
- package/dist/index-ZS9AwAal.cjs +0 -2061
- package/dist/index-ZS9AwAal.cjs.map +0 -1
- package/dist/index-dgg5tlO7.js +0 -19650
- package/dist/index-dgg5tlO7.js.map +0 -1
- package/dist/silentWalletEnroll-C3JRAD9_.js +0 -42
- package/dist/silentWalletEnroll-C3JRAD9_.js.map +0 -1
- package/dist/silentWalletEnroll-DRYQAQfg.cjs +0 -1
- package/dist/silentWalletEnroll-DRYQAQfg.cjs.map +0 -1
- package/dist/solanaKeypair-BlXol3nh.js.map +0 -1
- package/dist/solanaKeypair-C-lIR1JY.cjs +0 -1
- package/dist/solanaKeypair-C-lIR1JY.cjs.map +0 -1
- package/dist/types/adminUser.d.ts +0 -168
- package/dist/types/auth.d.ts +0 -122
- package/dist/types/config.d.ts +0 -266
- package/dist/types/deposit.d.ts +0 -490
- package/dist/types/index.d.ts +0 -13
- package/dist/types/invite.d.ts +0 -71
- package/dist/types/member.d.ts +0 -45
- package/dist/types/org.d.ts +0 -133
- package/dist/types/profile.d.ts +0 -56
- package/dist/types/session.d.ts +0 -28
- package/dist/types/setup.d.ts +0 -47
- package/dist/types/systemSettings.d.ts +0 -85
- package/dist/types/totp.d.ts +0 -52
- package/dist/types/wallet.d.ts +0 -309
- package/dist/utils/adminUserApi.d.ts +0 -60
- package/dist/utils/apiClient.d.ts +0 -78
- package/dist/utils/cryptoShim.d.ts +0 -17
- package/dist/utils/csrf.d.ts +0 -1
- package/dist/utils/deviceDetection.d.ts +0 -17
- package/dist/utils/embeddedWallet.d.ts +0 -75
- package/dist/utils/inviteApi.d.ts +0 -31
- package/dist/utils/memberApi.d.ts +0 -23
- package/dist/utils/orgApi.d.ts +0 -36
- package/dist/utils/profileApi.d.ts +0 -26
- package/dist/utils/sanitization.d.ts +0 -66
- package/dist/utils/sessionApi.d.ts +0 -16
- package/dist/utils/setupApi.d.ts +0 -21
- package/dist/utils/silentWalletEnroll.d.ts +0 -41
- package/dist/utils/systemSettingsApi.d.ts +0 -18
- package/dist/utils/tabSync.d.ts +0 -46
- package/dist/utils/tokenManager.d.ts +0 -107
- package/dist/utils/unlockCredential.d.ts +0 -5
- package/dist/utils/validation.d.ts +0 -48
- package/dist/utils/walletDetection.d.ts +0 -23
- package/dist/utils/webauthnJson.d.ts +0 -21
package/dist/crypto/types.d.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cryptographic type definitions for SSS wallet implementation
|
|
3
|
-
*
|
|
4
|
-
* Security: These types define the structure for client-side key material.
|
|
5
|
-
* The server never receives plaintext seeds or derived keys.
|
|
6
|
-
*/
|
|
7
|
-
/** 16-byte seed for wallet derivation (128 bits, standard Solana format) */
|
|
8
|
-
export type Seed = Uint8Array & {
|
|
9
|
-
readonly _brand: 'Seed';
|
|
10
|
-
};
|
|
11
|
-
/** 16-byte Shamir share (128 bits) */
|
|
12
|
-
export type ShamirShare = Uint8Array & {
|
|
13
|
-
readonly _brand: 'ShamirShare';
|
|
14
|
-
};
|
|
15
|
-
/** 32-byte encryption key */
|
|
16
|
-
export type EncryptionKey = Uint8Array & {
|
|
17
|
-
readonly _brand: 'EncryptionKey';
|
|
18
|
-
};
|
|
19
|
-
/** 12-byte AES-GCM nonce */
|
|
20
|
-
export type AesNonce = Uint8Array & {
|
|
21
|
-
readonly _brand: 'AesNonce';
|
|
22
|
-
};
|
|
23
|
-
/** 16+ byte Argon2 salt */
|
|
24
|
-
export type Argon2Salt = Uint8Array & {
|
|
25
|
-
readonly _brand: 'Argon2Salt';
|
|
26
|
-
};
|
|
27
|
-
/** 32-byte PRF salt */
|
|
28
|
-
export type PrfSalt = Uint8Array & {
|
|
29
|
-
readonly _brand: 'PrfSalt';
|
|
30
|
-
};
|
|
31
|
-
/** Argon2id KDF parameters (OWASP recommended) */
|
|
32
|
-
export interface KdfParams {
|
|
33
|
-
/** Memory cost in KiB (default: 19456 = 19 MiB) */
|
|
34
|
-
mCost: number;
|
|
35
|
-
/** Time cost / iterations (default: 2) */
|
|
36
|
-
tCost: number;
|
|
37
|
-
/** Parallelism (default: 1) */
|
|
38
|
-
pCost: number;
|
|
39
|
-
}
|
|
40
|
-
/** Default OWASP-recommended Argon2id parameters */
|
|
41
|
-
export declare const DEFAULT_KDF_PARAMS: KdfParams;
|
|
42
|
-
/** Encrypted data with nonce for AES-GCM */
|
|
43
|
-
export interface EncryptedData {
|
|
44
|
-
/** Base64-encoded ciphertext */
|
|
45
|
-
ciphertext: string;
|
|
46
|
-
/** Base64-encoded 12-byte nonce */
|
|
47
|
-
nonce: string;
|
|
48
|
-
}
|
|
49
|
-
/** Enrollment flow state */
|
|
50
|
-
export type EnrollmentStep = 'idle' | 'generating_seed' | 'splitting_shares' | 'encrypting_shares' | 'registering_passkey' | 'uploading' | 'showing_recovery' | 'complete' | 'error';
|
|
51
|
-
/** Enrollment flow state machine */
|
|
52
|
-
export interface EnrollmentState {
|
|
53
|
-
step: EnrollmentStep;
|
|
54
|
-
error?: string;
|
|
55
|
-
/** BIP-39 mnemonic words (only during showing_recovery step) */
|
|
56
|
-
recoveryPhrase?: string[];
|
|
57
|
-
/** Solana public key (after complete) */
|
|
58
|
-
solanaPubkey?: string;
|
|
59
|
-
}
|
|
60
|
-
/** Recovery flow state */
|
|
61
|
-
export type RecoveryStep = 'idle' | 'entering_phrase' | 'validating' | 'prompting_password' | 'registering_passkey' | 'encrypting' | 'uploading' | 'complete' | 'error';
|
|
62
|
-
/** Recovery flow state machine */
|
|
63
|
-
export interface RecoveryState {
|
|
64
|
-
step: RecoveryStep;
|
|
65
|
-
error?: string;
|
|
66
|
-
/**
|
|
67
|
-
* New recovery phrase (12 words) shown ONLY on successful completion.
|
|
68
|
-
* SECURITY: Must be displayed to user immediately and never logged.
|
|
69
|
-
* User should write down and securely store this phrase.
|
|
70
|
-
*/
|
|
71
|
-
recoveryPhrase?: string[];
|
|
72
|
-
}
|
|
73
|
-
/** Crypto capability detection results */
|
|
74
|
-
export interface CryptoCapabilities {
|
|
75
|
-
/** WebCrypto API available */
|
|
76
|
-
webCrypto: boolean;
|
|
77
|
-
/** AES-GCM supported */
|
|
78
|
-
aesGcm: boolean;
|
|
79
|
-
/** HKDF supported */
|
|
80
|
-
hkdf: boolean;
|
|
81
|
-
/** Ed25519 signing supported */
|
|
82
|
-
ed25519: boolean;
|
|
83
|
-
/** WebAuthn available */
|
|
84
|
-
webAuthn: boolean;
|
|
85
|
-
/** WebAuthn PRF extension supported */
|
|
86
|
-
webAuthnPrf: boolean;
|
|
87
|
-
/** Argon2 WASM can be loaded */
|
|
88
|
-
argon2: boolean;
|
|
89
|
-
/** All required capabilities available */
|
|
90
|
-
allSupported: boolean;
|
|
91
|
-
}
|
|
92
|
-
/** Wallet status */
|
|
93
|
-
export type WalletStatus = 'loading' | 'not_enrolled' | 'enrolled_locked' | 'enrolled_unlocked' | 'unlocked' | 'error';
|
|
94
|
-
/** Type guard: verify Seed length (16 bytes) */
|
|
95
|
-
export declare function isSeed(data: Uint8Array): data is Seed;
|
|
96
|
-
/** Type guard: verify ShamirShare is valid
|
|
97
|
-
* CRYPTO-4: Improved validation to check secrets.js format markers.
|
|
98
|
-
* secrets.js produces shares with format: {bits}{id}{data}
|
|
99
|
-
*
|
|
100
|
-
* Note: BIP-39 mnemonic system stores 16-byte entropy without secrets.js
|
|
101
|
-
* metadata, so we also accept exactly 16-byte arrays for compatibility.
|
|
102
|
-
*/
|
|
103
|
-
export declare function isShamirShare(data: Uint8Array): data is ShamirShare;
|
|
104
|
-
/** Type guard: verify EncryptionKey length */
|
|
105
|
-
export declare function isEncryptionKey(data: Uint8Array): data is EncryptionKey;
|
|
106
|
-
/** Type guard: verify AesNonce length */
|
|
107
|
-
export declare function isAesNonce(data: Uint8Array): data is AesNonce;
|
|
108
|
-
/** Type guard: verify Argon2Salt length (16+ bytes) */
|
|
109
|
-
export declare function isArgon2Salt(data: Uint8Array): data is Argon2Salt;
|
|
110
|
-
/** Type guard: verify PrfSalt length */
|
|
111
|
-
export declare function isPrfSalt(data: Uint8Array): data is PrfSalt;
|
|
112
|
-
/** Create branded Seed from Uint8Array (throws if invalid) */
|
|
113
|
-
export declare function toSeed(data: Uint8Array): Seed;
|
|
114
|
-
/** Create branded ShamirShare from Uint8Array (throws if invalid) */
|
|
115
|
-
export declare function toShamirShare(data: Uint8Array): ShamirShare;
|
|
116
|
-
/** Create branded EncryptionKey from Uint8Array (throws if invalid) */
|
|
117
|
-
export declare function toEncryptionKey(data: Uint8Array): EncryptionKey;
|
|
118
|
-
/** Create branded AesNonce from Uint8Array (throws if invalid) */
|
|
119
|
-
export declare function toAesNonce(data: Uint8Array): AesNonce;
|
|
120
|
-
/** Create branded Argon2Salt from Uint8Array (throws if invalid) */
|
|
121
|
-
export declare function toArgon2Salt(data: Uint8Array): Argon2Salt;
|
|
122
|
-
/** Create branded PrfSalt from Uint8Array (throws if invalid) */
|
|
123
|
-
export declare function toPrfSalt(data: Uint8Array): PrfSalt;
|
|
124
|
-
/**
|
|
125
|
-
* Cast branded Uint8Array types to BufferSource for Web Crypto API compatibility.
|
|
126
|
-
*
|
|
127
|
-
* Web Crypto APIs (importKey, encrypt, decrypt, etc.) expect BufferSource which only
|
|
128
|
-
* accepts plain Uint8Array with ArrayBuffer (not ArrayBufferLike), not our branded types.
|
|
129
|
-
* This function returns a new Uint8Array backed by a plain ArrayBuffer to satisfy the type.
|
|
130
|
-
*
|
|
131
|
-
* @param data - Any branded Uint8Array type (Seed, EncryptionKey, AesNonce, etc.)
|
|
132
|
-
* @returns BufferSource suitable for Web Crypto APIs
|
|
133
|
-
*/
|
|
134
|
-
export declare function toBufferSource<T extends Uint8Array>(data: T): BufferSource;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { PrfSalt } from './types';
|
|
2
|
-
/** Result of registering a new passkey with PRF */
|
|
3
|
-
export interface PasskeyRegistrationResult {
|
|
4
|
-
/** Base64-encoded credential ID */
|
|
5
|
-
credentialId: string;
|
|
6
|
-
/** Base64-encoded PRF salt */
|
|
7
|
-
prfSalt: string;
|
|
8
|
-
/** PRF output (32 bytes) for key derivation */
|
|
9
|
-
prfOutput: Uint8Array;
|
|
10
|
-
}
|
|
11
|
-
/** Result of authenticating with an existing passkey */
|
|
12
|
-
export interface PasskeyAuthResult {
|
|
13
|
-
/** PRF output (32 bytes) for key derivation */
|
|
14
|
-
prfOutput: Uint8Array;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Check if WebAuthn is available in this browser
|
|
18
|
-
*/
|
|
19
|
-
export declare function isWebAuthnAvailable(): boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Check if the PRF extension is supported
|
|
22
|
-
*
|
|
23
|
-
* Note: This only checks for API support, not actual authenticator support.
|
|
24
|
-
* The actual PRF availability depends on the user's authenticator.
|
|
25
|
-
*/
|
|
26
|
-
export declare function isPrfSupported(): Promise<boolean>;
|
|
27
|
-
/** Options for passkey operations */
|
|
28
|
-
export interface PasskeyOptions {
|
|
29
|
-
/** SEC-004: Allowed domains for RP ID validation */
|
|
30
|
-
allowedDomains?: string[];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Register a new passkey with PRF extension for wallet encryption
|
|
34
|
-
*
|
|
35
|
-
* @param userId - User ID bytes (from authenticated user)
|
|
36
|
-
* @param userName - Display name for the passkey
|
|
37
|
-
* @param displayName - User's display name
|
|
38
|
-
* @param prfSalt - Optional PRF salt (generated if not provided)
|
|
39
|
-
* @param options - Optional configuration including allowed domains
|
|
40
|
-
* @returns Registration result with credential ID and PRF output
|
|
41
|
-
* @throws Error if registration fails or PRF is not supported
|
|
42
|
-
*/
|
|
43
|
-
export declare function registerPasskeyWithPrf(userId: Uint8Array, userName: string, displayName: string, prfSalt?: PrfSalt, options?: PasskeyOptions): Promise<PasskeyRegistrationResult>;
|
|
44
|
-
/**
|
|
45
|
-
* Authenticate with an existing passkey and get PRF output
|
|
46
|
-
*
|
|
47
|
-
* @param credentialId - Base64-encoded credential ID
|
|
48
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
49
|
-
* @param options - Optional configuration including allowed domains
|
|
50
|
-
* @returns Authentication result with PRF output
|
|
51
|
-
* @throws Error if authentication fails
|
|
52
|
-
*/
|
|
53
|
-
export declare function authenticateWithPrf(credentialId: string, prfSalt: string, options?: PasskeyOptions): Promise<PasskeyAuthResult>;
|
|
54
|
-
/**
|
|
55
|
-
* Get encryption key from passkey via PRF extension
|
|
56
|
-
*
|
|
57
|
-
* This combines authentication and key derivation in a single operation.
|
|
58
|
-
*
|
|
59
|
-
* ## SEC-03: Key Lifecycle Management
|
|
60
|
-
*
|
|
61
|
-
* **IMPORTANT**: The returned encryption key is sensitive cryptographic material.
|
|
62
|
-
* Callers are responsible for:
|
|
63
|
-
*
|
|
64
|
-
* 1. Using the key only for its intended purpose (Share B decryption)
|
|
65
|
-
* 2. Wiping the key from memory after use by calling `key.fill(0)`
|
|
66
|
-
* 3. Not storing the key in persistent storage (localStorage, IndexedDB, etc.)
|
|
67
|
-
* 4. Not logging or transmitting the key
|
|
68
|
-
*
|
|
69
|
-
* The PRF output used to derive this key is automatically wiped in the finally
|
|
70
|
-
* block, but the derived key must be managed by the caller.
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```typescript
|
|
74
|
-
* const key = await getEncryptionKeyFromPasskey(credentialId, prfSalt);
|
|
75
|
-
* try {
|
|
76
|
-
* const plaintext = await decryptShareB(ciphertext, key);
|
|
77
|
-
* // ... use plaintext
|
|
78
|
-
* } finally {
|
|
79
|
-
* key.fill(0); // Wipe key after use
|
|
80
|
-
* }
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* @param credentialId - Base64-encoded credential ID
|
|
84
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
85
|
-
* @param options - Optional configuration including allowed domains
|
|
86
|
-
* @returns 32-byte encryption key derived from PRF output. **Caller must wipe after use.**
|
|
87
|
-
*/
|
|
88
|
-
export declare function getEncryptionKeyFromPasskey(credentialId: string, prfSalt: string, options?: PasskeyOptions): Promise<Uint8Array>;
|
|
89
|
-
/**
|
|
90
|
-
* Check if a credential ID is valid for this user
|
|
91
|
-
*
|
|
92
|
-
* @param credentialId - Base64-encoded credential ID to check
|
|
93
|
-
* @param options - Optional configuration including allowed domains
|
|
94
|
-
* @returns true if credential exists and can be used
|
|
95
|
-
*/
|
|
96
|
-
export declare function isCredentialAvailable(credentialId: string, options?: PasskeyOptions): Promise<boolean>;
|
|
97
|
-
/**
|
|
98
|
-
* Authenticate with any discoverable passkey and get PRF output
|
|
99
|
-
*
|
|
100
|
-
* This allows authentication without specifying a credential ID, letting
|
|
101
|
-
* the browser present all available passkeys for this domain.
|
|
102
|
-
*
|
|
103
|
-
* @param prfSalt - Base64-encoded PRF salt
|
|
104
|
-
* @param options - Optional configuration including allowed domains
|
|
105
|
-
* @returns Authentication result with PRF output
|
|
106
|
-
* @throws Error if authentication fails
|
|
107
|
-
*/
|
|
108
|
-
export declare function authenticateWithDiscoverablePrf(prfSalt: string, options?: PasskeyOptions): Promise<PasskeyAuthResult>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { UseAdminDepositsReturn } from '../types/deposit';
|
|
2
|
-
export type { UseAdminDepositsReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for admin Privacy Cash deposit operations
|
|
5
|
-
*
|
|
6
|
-
* Requires system admin privileges. All methods will fail with 403 if not admin.
|
|
7
|
-
*
|
|
8
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
9
|
-
*/
|
|
10
|
-
export declare function useAdminDeposits(): UseAdminDepositsReturn;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { UseAdminUsersReturn } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for admin user management operations
|
|
4
|
-
*
|
|
5
|
-
* Provides methods to list all users, get individual users,
|
|
6
|
-
* and manage system admin status. Requires system admin privileges.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```tsx
|
|
10
|
-
* function UserManagement() {
|
|
11
|
-
* const { users, total, isLoading, listUsers, setSystemAdmin } = useAdminUsers();
|
|
12
|
-
*
|
|
13
|
-
* useEffect(() => {
|
|
14
|
-
* listUsers({ limit: 20 });
|
|
15
|
-
* }, [listUsers]);
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <AdminUserList
|
|
19
|
-
* users={users}
|
|
20
|
-
* total={total}
|
|
21
|
-
* isLoading={isLoading}
|
|
22
|
-
* onToggleAdmin={(userId, isAdmin) => setSystemAdmin(userId, isAdmin)}
|
|
23
|
-
* />
|
|
24
|
-
* );
|
|
25
|
-
* }
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
export declare function useAdminUsers(): UseAdminUsersReturn;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
export interface UseAppleAuthReturn {
|
|
3
|
-
signIn: () => Promise<AuthResponse>;
|
|
4
|
-
isLoading: boolean;
|
|
5
|
-
isInitialized: boolean;
|
|
6
|
-
error: AuthError | null;
|
|
7
|
-
clearError: () => void;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Hook for Apple Sign In authentication.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function AppleButton() {
|
|
15
|
-
* const { signIn, isLoading, isInitialized, error } = useAppleAuth();
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <button onClick={signIn} disabled={!isInitialized || isLoading}>
|
|
19
|
-
* {isLoading ? 'Signing in...' : 'Sign in with Apple'}
|
|
20
|
-
* </button>
|
|
21
|
-
* );
|
|
22
|
-
* }
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export declare function useAppleAuth(): UseAppleAuthReturn;
|
|
26
|
-
declare global {
|
|
27
|
-
interface Window {
|
|
28
|
-
AppleID?: {
|
|
29
|
-
auth?: {
|
|
30
|
-
init: (config: {
|
|
31
|
-
clientId: string;
|
|
32
|
-
scope: string;
|
|
33
|
-
redirectURI: string;
|
|
34
|
-
usePopup?: boolean;
|
|
35
|
-
}) => void;
|
|
36
|
-
signIn: () => Promise<{
|
|
37
|
-
authorization?: {
|
|
38
|
-
id_token?: string;
|
|
39
|
-
code?: string;
|
|
40
|
-
};
|
|
41
|
-
user?: {
|
|
42
|
-
email?: string;
|
|
43
|
-
name?: {
|
|
44
|
-
firstName?: string;
|
|
45
|
-
lastName?: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
}>;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
package/dist/hooks/useAuth.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { AuthUser, AuthState, AuthError } from '../types';
|
|
2
|
-
export interface UseAuthReturn {
|
|
3
|
-
user: AuthUser | null;
|
|
4
|
-
authState: AuthState;
|
|
5
|
-
error: AuthError | null;
|
|
6
|
-
isAuthenticated: boolean;
|
|
7
|
-
isLoading: boolean;
|
|
8
|
-
logout: () => Promise<void>;
|
|
9
|
-
refreshUser: () => Promise<void>;
|
|
10
|
-
openLoginModal: () => void;
|
|
11
|
-
closeLoginModal: () => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Main authentication hook providing user state and actions.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* function MyComponent() {
|
|
19
|
-
* const { user, isAuthenticated, logout, openLoginModal } = useAuth();
|
|
20
|
-
*
|
|
21
|
-
* if (!isAuthenticated) {
|
|
22
|
-
* return <button onClick={openLoginModal}>Login</button>;
|
|
23
|
-
* }
|
|
24
|
-
*
|
|
25
|
-
* return (
|
|
26
|
-
* <div>
|
|
27
|
-
* <p>Welcome, {user?.name}</p>
|
|
28
|
-
* <button onClick={logout}>Logout</button>
|
|
29
|
-
* </div>
|
|
30
|
-
* );
|
|
31
|
-
* }
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function useAuth(): UseAuthReturn;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { AuthUser, AuthState, TokenPair, SessionConfig, AuthCallbacks } from '../types';
|
|
2
|
-
export interface UseAuthSessionOptions {
|
|
3
|
-
serverUrl: string;
|
|
4
|
-
session?: SessionConfig;
|
|
5
|
-
callbacks?: AuthCallbacks;
|
|
6
|
-
requestTimeoutMs?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface UseAuthSessionReturn {
|
|
9
|
-
user: AuthUser | null;
|
|
10
|
-
authState: AuthState;
|
|
11
|
-
handleLoginSuccess: (user: AuthUser, tokens?: TokenPair) => void;
|
|
12
|
-
logout: () => Promise<void>;
|
|
13
|
-
refreshUser: () => Promise<void>;
|
|
14
|
-
getAccessToken: () => string | null;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Hook that manages authentication session state, token refresh, and tab sync.
|
|
18
|
-
*/
|
|
19
|
-
export declare function useAuthSession({ serverUrl, session, callbacks, requestTimeoutMs, }: UseAuthSessionOptions): UseAuthSessionReturn;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { AuthorizeRequest, AuthError } from '../types';
|
|
2
|
-
export interface AuthorizationCheck {
|
|
3
|
-
allowed: boolean;
|
|
4
|
-
reason?: string;
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
error: AuthError | null;
|
|
7
|
-
}
|
|
8
|
-
export interface UseAuthorizeReturn {
|
|
9
|
-
/**
|
|
10
|
-
* Check if an action is authorized server-side.
|
|
11
|
-
* Use this for dynamic authorization checks.
|
|
12
|
-
*/
|
|
13
|
-
authorize: (request: AuthorizeRequest) => Promise<boolean>;
|
|
14
|
-
/**
|
|
15
|
-
* Authorization state for the last check
|
|
16
|
-
*/
|
|
17
|
-
lastCheck: AuthorizationCheck;
|
|
18
|
-
/**
|
|
19
|
-
* Clear the last authorization check
|
|
20
|
-
*/
|
|
21
|
-
clearCheck: () => void;
|
|
22
|
-
/**
|
|
23
|
-
* Check authorization and return detailed result
|
|
24
|
-
*/
|
|
25
|
-
checkAuthorization: (request: AuthorizeRequest) => Promise<AuthorizationCheck>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Hook for server-side authorization checks.
|
|
29
|
-
*
|
|
30
|
-
* This hook allows you to check if a specific action is authorized
|
|
31
|
-
* by making a request to the server's /authorize endpoint.
|
|
32
|
-
*
|
|
33
|
-
* For simple permission checks based on the user's role, use `useOrgs().hasPermission()` instead.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```tsx
|
|
37
|
-
* function DeleteButton({ resourceId }: { resourceId: string }) {
|
|
38
|
-
* const { authorize, lastCheck } = useAuthorize();
|
|
39
|
-
* const { activeOrg } = useOrgs();
|
|
40
|
-
*
|
|
41
|
-
* const handleDelete = async () => {
|
|
42
|
-
* const allowed = await authorize({
|
|
43
|
-
* orgId: activeOrg?.id!,
|
|
44
|
-
* action: 'delete',
|
|
45
|
-
* resource: 'document',
|
|
46
|
-
* resourceId,
|
|
47
|
-
* });
|
|
48
|
-
*
|
|
49
|
-
* if (allowed) {
|
|
50
|
-
* // Proceed with delete
|
|
51
|
-
* }
|
|
52
|
-
* };
|
|
53
|
-
*
|
|
54
|
-
* return (
|
|
55
|
-
* <button onClick={handleDelete} disabled={lastCheck.isLoading}>
|
|
56
|
-
* Delete
|
|
57
|
-
* </button>
|
|
58
|
-
* );
|
|
59
|
-
* }
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
export declare function useAuthorize(): UseAuthorizeReturn;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { UseCreditsReturn } from '../types/deposit';
|
|
2
|
-
export type { UseCreditsReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for credit balance and transaction history
|
|
5
|
-
*
|
|
6
|
-
* Credits represent the user's balance from Privacy Cash deposits.
|
|
7
|
-
* The balance can be used for services within the application.
|
|
8
|
-
*
|
|
9
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
10
|
-
*/
|
|
11
|
-
export declare function useCredits(): UseCreditsReturn;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { DashboardSection, DashboardPermissions, AuthError } from '../types';
|
|
2
|
-
export interface UseDashboardPermissionsReturn {
|
|
3
|
-
/** Current dashboard permissions config */
|
|
4
|
-
permissions: DashboardPermissions;
|
|
5
|
-
/** Whether the current user can access a specific section */
|
|
6
|
-
canAccess: (section: DashboardSection) => boolean;
|
|
7
|
-
/** Update permissions (owner only) */
|
|
8
|
-
updatePermissions: (permissions: DashboardPermissions) => Promise<void>;
|
|
9
|
-
/** Loading state */
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
/** Updating state */
|
|
12
|
-
isUpdating: boolean;
|
|
13
|
-
/** Error state */
|
|
14
|
-
error: AuthError | null;
|
|
15
|
-
/** Refresh permissions from server */
|
|
16
|
-
fetchPermissions: () => Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Hook for managing dashboard permissions per role.
|
|
20
|
-
*
|
|
21
|
-
* Allows org owners to configure which dashboard sections each role can access.
|
|
22
|
-
* - Owner always has full access (not configurable)
|
|
23
|
-
* - Admin and Member roles are configurable
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```tsx
|
|
27
|
-
* function AdminDashboard() {
|
|
28
|
-
* const { canAccess, permissions, updatePermissions } = useDashboardPermissions();
|
|
29
|
-
*
|
|
30
|
-
* // Check if current user can access a section
|
|
31
|
-
* if (!canAccess('deposits')) {
|
|
32
|
-
* return <div>You don't have access to deposits</div>;
|
|
33
|
-
* }
|
|
34
|
-
*
|
|
35
|
-
* // Update permissions (owner only)
|
|
36
|
-
* const toggleMemberDeposits = () => {
|
|
37
|
-
* updatePermissions({
|
|
38
|
-
* ...permissions,
|
|
39
|
-
* member: { ...permissions.member, deposits: !permissions.member.deposits },
|
|
40
|
-
* });
|
|
41
|
-
* };
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function useDashboardPermissions(): UseDashboardPermissionsReturn;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UseDepositReturn } from '../types/deposit';
|
|
2
|
-
export type { UseDepositReturn } from '../types/deposit';
|
|
3
|
-
/**
|
|
4
|
-
* Hook for Privacy Cash deposit operations
|
|
5
|
-
*
|
|
6
|
-
* Deposits go to the user's Privacy Cash account (user's pubkey is owner).
|
|
7
|
-
* Credits are issued immediately, withdrawal to company wallet happens later.
|
|
8
|
-
*
|
|
9
|
-
* Requirements:
|
|
10
|
-
* - User must have SSS wallet enrolled
|
|
11
|
-
* - Wallet must be unlocked (call POST /wallet/unlock first)
|
|
12
|
-
* - Wallet must be in "no recovery" mode
|
|
13
|
-
*
|
|
14
|
-
* Safe to call outside CedrosLoginProvider - returns no-op functions that throw.
|
|
15
|
-
*/
|
|
16
|
-
export declare function useDeposit(): UseDepositReturn;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
/** Result when MFA verification is required */
|
|
3
|
-
export interface MfaRequiredResult {
|
|
4
|
-
mfaRequired: true;
|
|
5
|
-
mfaToken: string;
|
|
6
|
-
email: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
}
|
|
9
|
-
/** Result of successful login (no TOTP required or after TOTP verification) */
|
|
10
|
-
export interface LoginSuccessResult {
|
|
11
|
-
mfaRequired: false;
|
|
12
|
-
response: AuthResponse;
|
|
13
|
-
}
|
|
14
|
-
/** Union type for login result */
|
|
15
|
-
export type LoginResult = MfaRequiredResult | LoginSuccessResult;
|
|
16
|
-
export interface UseEmailAuthReturn {
|
|
17
|
-
/** Login - may return mfaRequired if 2FA is enabled */
|
|
18
|
-
login: (email: string, password: string) => Promise<LoginResult>;
|
|
19
|
-
register: (email: string, password: string, name?: string) => Promise<AuthResponse>;
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
error: AuthError | null;
|
|
22
|
-
clearError: () => void;
|
|
23
|
-
/**
|
|
24
|
-
* Number of remaining login attempts before rate limiting.
|
|
25
|
-
*
|
|
26
|
-
* M-10: Snapshot Behavior
|
|
27
|
-
* This value is a point-in-time snapshot computed at render time.
|
|
28
|
-
* It may be briefly stale during rapid requests or concurrent renders.
|
|
29
|
-
* For UI display only - actual rate limiting is enforced inside login/register.
|
|
30
|
-
*/
|
|
31
|
-
remainingAttempts: number;
|
|
32
|
-
/**
|
|
33
|
-
* Time in ms until rate limit resets (0 if not rate limited).
|
|
34
|
-
*
|
|
35
|
-
* M-10: Snapshot Behavior
|
|
36
|
-
* This value is a point-in-time snapshot computed at render time.
|
|
37
|
-
* It may be briefly stale - use for UI display, not for logic decisions.
|
|
38
|
-
*/
|
|
39
|
-
timeUntilReset: number;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Hook for email/password authentication.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```tsx
|
|
46
|
-
* function LoginForm() {
|
|
47
|
-
* const { login, isLoading, error } = useEmailAuth();
|
|
48
|
-
*
|
|
49
|
-
* const handleSubmit = async (e) => {
|
|
50
|
-
* e.preventDefault();
|
|
51
|
-
* try {
|
|
52
|
-
* await login(email, password);
|
|
53
|
-
* } catch (err) {
|
|
54
|
-
* // Handle error
|
|
55
|
-
* }
|
|
56
|
-
* };
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
59
|
-
*/
|
|
60
|
-
export declare function useEmailAuth(): UseEmailAuthReturn;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { AuthResponse, AuthError } from '../types';
|
|
2
|
-
/** @internal */
|
|
3
|
-
export declare const _internalGoogleScriptLoader: {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
loaded: boolean;
|
|
6
|
-
error: Error | null;
|
|
7
|
-
callbacks: Array<{
|
|
8
|
-
resolve: () => void;
|
|
9
|
-
reject: (err: Error) => void;
|
|
10
|
-
}>;
|
|
11
|
-
load(): Promise<void>;
|
|
12
|
-
/**
|
|
13
|
-
* Reset singleton state for test isolation (F-08)
|
|
14
|
-
* @internal - Only use in test setup/teardown
|
|
15
|
-
*/
|
|
16
|
-
_reset(): void;
|
|
17
|
-
};
|
|
18
|
-
export interface UseGoogleAuthReturn {
|
|
19
|
-
signIn: () => Promise<AuthResponse>;
|
|
20
|
-
isLoading: boolean;
|
|
21
|
-
isInitialized: boolean;
|
|
22
|
-
error: AuthError | null;
|
|
23
|
-
clearError: () => void;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Hook for Google OAuth authentication.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```tsx
|
|
30
|
-
* function GoogleButton() {
|
|
31
|
-
* const { signIn, isLoading, isInitialized, error } = useGoogleAuth();
|
|
32
|
-
*
|
|
33
|
-
* return (
|
|
34
|
-
* <button onClick={signIn} disabled={!isInitialized || isLoading}>
|
|
35
|
-
* {isLoading ? 'Signing in...' : 'Sign in with Google'}
|
|
36
|
-
* </button>
|
|
37
|
-
* );
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
export declare function useGoogleAuth(): UseGoogleAuthReturn;
|
|
42
|
-
declare global {
|
|
43
|
-
interface Window {
|
|
44
|
-
google?: {
|
|
45
|
-
accounts?: {
|
|
46
|
-
id?: {
|
|
47
|
-
initialize: (config: {
|
|
48
|
-
client_id: string;
|
|
49
|
-
callback: (response: {
|
|
50
|
-
credential: string;
|
|
51
|
-
}) => void;
|
|
52
|
-
auto_select?: boolean;
|
|
53
|
-
cancel_on_tap_outside?: boolean;
|
|
54
|
-
}) => void;
|
|
55
|
-
prompt: (callback: (notification: {
|
|
56
|
-
isNotDisplayed: () => boolean;
|
|
57
|
-
isSkippedMoment: () => boolean;
|
|
58
|
-
isDismissedMoment: () => boolean;
|
|
59
|
-
getMomentType: () => string;
|
|
60
|
-
}) => void) => void;
|
|
61
|
-
renderButton: (element: HTMLElement, config: object) => void;
|
|
62
|
-
disableAutoSelect: () => void;
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|