@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
|
@@ -0,0 +1,1497 @@
|
|
|
1
|
+
import { useState as k, useRef as T, useEffect as O, useCallback as d, useMemo as S } from "react";
|
|
2
|
+
import { u as E } from "./useSystemSettings-DBlAMjFi.js";
|
|
3
|
+
import { jsx as t, jsxs as u, Fragment as f } from "react/jsx-runtime";
|
|
4
|
+
const U = 800, I = 2e3;
|
|
5
|
+
function X() {
|
|
6
|
+
const { settings: e, isLoading: l, error: a, fetchSettings: n, updateSettings: s } = E(), [i, p] = k({}), [r, o] = k("idle"), [c, m] = k(null), h = T(null), y = T(null), w = T({});
|
|
7
|
+
O(() => () => {
|
|
8
|
+
h.current && clearTimeout(h.current), y.current && clearTimeout(y.current);
|
|
9
|
+
}, []);
|
|
10
|
+
const N = d(async () => {
|
|
11
|
+
const _ = { ...w.current };
|
|
12
|
+
if (Object.keys(_).length === 0) {
|
|
13
|
+
o("idle");
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
o("saving"), m(null);
|
|
17
|
+
const v = Object.entries(_).map(([b, g]) => ({
|
|
18
|
+
key: b,
|
|
19
|
+
value: g
|
|
20
|
+
}));
|
|
21
|
+
try {
|
|
22
|
+
await s(v), p((b) => {
|
|
23
|
+
const g = { ...b };
|
|
24
|
+
for (const C of Object.keys(_))
|
|
25
|
+
delete g[C];
|
|
26
|
+
return g;
|
|
27
|
+
});
|
|
28
|
+
for (const b of Object.keys(_))
|
|
29
|
+
delete w.current[b];
|
|
30
|
+
o("saved"), y.current && clearTimeout(y.current), y.current = setTimeout(() => {
|
|
31
|
+
o("idle");
|
|
32
|
+
}, I);
|
|
33
|
+
} catch (b) {
|
|
34
|
+
o("error"), m(b instanceof Error ? b.message : "Failed to save");
|
|
35
|
+
}
|
|
36
|
+
}, [s]), D = d(
|
|
37
|
+
(_, v) => {
|
|
38
|
+
p((b) => ({ ...b, [_]: v })), w.current[_] = v, m(null), o("pending"), h.current && clearTimeout(h.current), h.current = setTimeout(() => {
|
|
39
|
+
N();
|
|
40
|
+
}, U);
|
|
41
|
+
},
|
|
42
|
+
[N]
|
|
43
|
+
), A = d(
|
|
44
|
+
(_) => {
|
|
45
|
+
if (i[_] !== void 0) return i[_];
|
|
46
|
+
for (const v of Object.values(e)) {
|
|
47
|
+
const b = v.find((g) => g.key === _);
|
|
48
|
+
if (b) return b.value;
|
|
49
|
+
}
|
|
50
|
+
return "";
|
|
51
|
+
},
|
|
52
|
+
[i, e]
|
|
53
|
+
);
|
|
54
|
+
return {
|
|
55
|
+
settings: e,
|
|
56
|
+
edits: i,
|
|
57
|
+
isLoading: l,
|
|
58
|
+
autosaveStatus: r,
|
|
59
|
+
autosaveError: c,
|
|
60
|
+
error: a,
|
|
61
|
+
fetchSettings: n,
|
|
62
|
+
handleChange: D,
|
|
63
|
+
getEffectiveValue: A
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function M(e) {
|
|
67
|
+
const l = Math.floor(e / 86400), a = Math.floor(e % 86400 / 3600), n = Math.floor(e % 3600 / 60), s = e % 60;
|
|
68
|
+
return { days: l, hours: a, minutes: n, seconds: s };
|
|
69
|
+
}
|
|
70
|
+
function R(e) {
|
|
71
|
+
const { days: l, hours: a, minutes: n } = M(e), s = [];
|
|
72
|
+
return l > 0 && s.push(`${l}d`), a > 0 && s.push(`${a}h`), n > 0 && s.push(`${n}m`), s.length === 0 && s.push(`${e}s`), s.join(" ");
|
|
73
|
+
}
|
|
74
|
+
const q = {
|
|
75
|
+
// ============= Authentication Providers =============
|
|
76
|
+
// Email auth
|
|
77
|
+
auth_email_enabled: {
|
|
78
|
+
key: "auth_email_enabled",
|
|
79
|
+
label: "Enable Email Authentication",
|
|
80
|
+
description: "Allow users to sign up and log in with email/password.",
|
|
81
|
+
inputType: "boolean"
|
|
82
|
+
},
|
|
83
|
+
auth_email_require_verification: {
|
|
84
|
+
key: "auth_email_require_verification",
|
|
85
|
+
label: "Require Email Verification",
|
|
86
|
+
description: "Users must verify their email address before they can log in.",
|
|
87
|
+
inputType: "boolean"
|
|
88
|
+
},
|
|
89
|
+
auth_email_block_disposable: {
|
|
90
|
+
key: "auth_email_block_disposable",
|
|
91
|
+
label: "Block Disposable Emails",
|
|
92
|
+
description: "Reject registrations from known disposable email providers.",
|
|
93
|
+
inputType: "boolean"
|
|
94
|
+
},
|
|
95
|
+
// Google OAuth
|
|
96
|
+
auth_google_enabled: {
|
|
97
|
+
key: "auth_google_enabled",
|
|
98
|
+
label: "Enable Google Sign-In",
|
|
99
|
+
description: "Allow users to authenticate with their Google account.",
|
|
100
|
+
inputType: "boolean"
|
|
101
|
+
},
|
|
102
|
+
auth_google_client_id: {
|
|
103
|
+
key: "auth_google_client_id",
|
|
104
|
+
label: "Google Client ID",
|
|
105
|
+
description: "OAuth 2.0 client ID from Google Cloud Console.",
|
|
106
|
+
inputType: "text"
|
|
107
|
+
},
|
|
108
|
+
auth_google_client_secret: {
|
|
109
|
+
key: "auth_google_client_secret",
|
|
110
|
+
label: "Google Client Secret",
|
|
111
|
+
description: "OAuth 2.0 client secret from Google Cloud Console.",
|
|
112
|
+
inputType: "secret"
|
|
113
|
+
},
|
|
114
|
+
// Apple OAuth
|
|
115
|
+
auth_apple_enabled: {
|
|
116
|
+
key: "auth_apple_enabled",
|
|
117
|
+
label: "Enable Sign in with Apple",
|
|
118
|
+
description: "Allow users to authenticate with their Apple ID.",
|
|
119
|
+
inputType: "boolean"
|
|
120
|
+
},
|
|
121
|
+
auth_apple_client_id: {
|
|
122
|
+
key: "auth_apple_client_id",
|
|
123
|
+
label: "Apple Services ID",
|
|
124
|
+
description: "The Services ID configured in your Apple Developer account.",
|
|
125
|
+
inputType: "text"
|
|
126
|
+
},
|
|
127
|
+
auth_apple_team_id: {
|
|
128
|
+
key: "auth_apple_team_id",
|
|
129
|
+
label: "Apple Team ID",
|
|
130
|
+
description: "Your Apple Developer Team ID.",
|
|
131
|
+
inputType: "text"
|
|
132
|
+
},
|
|
133
|
+
auth_apple_key_id: {
|
|
134
|
+
key: "auth_apple_key_id",
|
|
135
|
+
label: "Apple Key ID",
|
|
136
|
+
description: "The Key ID for your Sign in with Apple private key.",
|
|
137
|
+
inputType: "text"
|
|
138
|
+
},
|
|
139
|
+
auth_apple_private_key: {
|
|
140
|
+
key: "auth_apple_private_key",
|
|
141
|
+
label: "Apple Private Key",
|
|
142
|
+
description: "The private key file contents (PEM format) for Sign in with Apple.",
|
|
143
|
+
inputType: "secret",
|
|
144
|
+
multiline: !0
|
|
145
|
+
},
|
|
146
|
+
// Solana auth
|
|
147
|
+
auth_solana_enabled: {
|
|
148
|
+
key: "auth_solana_enabled",
|
|
149
|
+
label: "Enable Solana Wallet Auth",
|
|
150
|
+
description: "Allow users to authenticate by signing with their Solana wallet.",
|
|
151
|
+
inputType: "boolean"
|
|
152
|
+
},
|
|
153
|
+
auth_solana_challenge_expiry: {
|
|
154
|
+
key: "auth_solana_challenge_expiry",
|
|
155
|
+
label: "Challenge Expiry",
|
|
156
|
+
description: "How long a wallet signature challenge is valid.",
|
|
157
|
+
inputType: "duration",
|
|
158
|
+
min: 60,
|
|
159
|
+
presets: [
|
|
160
|
+
{ label: "1 minute", value: "60" },
|
|
161
|
+
{ label: "5 minutes", value: "300" },
|
|
162
|
+
{ label: "10 minutes", value: "600" }
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
// WebAuthn/Passkeys
|
|
166
|
+
auth_webauthn_enabled: {
|
|
167
|
+
key: "auth_webauthn_enabled",
|
|
168
|
+
label: "Enable WebAuthn/Passkeys",
|
|
169
|
+
description: "Allow passwordless authentication with FIDO2/WebAuthn credentials.",
|
|
170
|
+
inputType: "boolean"
|
|
171
|
+
},
|
|
172
|
+
auth_webauthn_rp_id: {
|
|
173
|
+
key: "auth_webauthn_rp_id",
|
|
174
|
+
label: "Relying Party ID",
|
|
175
|
+
description: "Usually your domain (e.g., example.com). Passkeys are bound to this.",
|
|
176
|
+
inputType: "text"
|
|
177
|
+
},
|
|
178
|
+
auth_webauthn_rp_name: {
|
|
179
|
+
key: "auth_webauthn_rp_name",
|
|
180
|
+
label: "Relying Party Name",
|
|
181
|
+
description: "Display name shown to users during passkey registration.",
|
|
182
|
+
inputType: "text"
|
|
183
|
+
},
|
|
184
|
+
auth_webauthn_rp_origin: {
|
|
185
|
+
key: "auth_webauthn_rp_origin",
|
|
186
|
+
label: "Allowed Origins",
|
|
187
|
+
description: "Comma-separated origins allowed for WebAuthn (e.g., https://example.com).",
|
|
188
|
+
inputType: "text"
|
|
189
|
+
},
|
|
190
|
+
// Instant Link (Magic Link)
|
|
191
|
+
auth_instantlink_enabled: {
|
|
192
|
+
key: "auth_instantlink_enabled",
|
|
193
|
+
label: "Enable Instant Link",
|
|
194
|
+
description: "Allow passwordless login via magic link sent to email.",
|
|
195
|
+
inputType: "boolean"
|
|
196
|
+
},
|
|
197
|
+
auth_instantlink_expiry: {
|
|
198
|
+
key: "auth_instantlink_expiry",
|
|
199
|
+
label: "Link Expiry",
|
|
200
|
+
description: "How long the magic link remains valid.",
|
|
201
|
+
inputType: "duration",
|
|
202
|
+
min: 60,
|
|
203
|
+
presets: [
|
|
204
|
+
{ label: "5 minutes", value: "300" },
|
|
205
|
+
{ label: "15 minutes", value: "900" },
|
|
206
|
+
{ label: "30 minutes", value: "1800" },
|
|
207
|
+
{ label: "1 hour", value: "3600" }
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
auth_instantlink_rate_limit: {
|
|
211
|
+
key: "auth_instantlink_rate_limit",
|
|
212
|
+
label: "Rate Limit",
|
|
213
|
+
description: "Maximum instant link requests per email per hour.",
|
|
214
|
+
inputType: "select",
|
|
215
|
+
presets: [
|
|
216
|
+
{ label: "3 per hour", value: "3" },
|
|
217
|
+
{ label: "5 per hour", value: "5" },
|
|
218
|
+
{ label: "10 per hour", value: "10" }
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
// ============= Feature Flags =============
|
|
222
|
+
// Order: organizations, enterprise SSO, 2fa, embedded wallets, credit system
|
|
223
|
+
feature_organizations: {
|
|
224
|
+
key: "feature_organizations",
|
|
225
|
+
label: "Organizations",
|
|
226
|
+
description: "Enable multi-user organizations with role-based access.",
|
|
227
|
+
inputType: "boolean"
|
|
228
|
+
},
|
|
229
|
+
feature_sso: {
|
|
230
|
+
key: "feature_sso",
|
|
231
|
+
label: "Enterprise SSO",
|
|
232
|
+
description: "Enable SAML/OIDC single sign-on for enterprise customers.",
|
|
233
|
+
inputType: "boolean"
|
|
234
|
+
},
|
|
235
|
+
feature_mfa: {
|
|
236
|
+
key: "feature_mfa",
|
|
237
|
+
label: "Two-Factor Authentication",
|
|
238
|
+
description: "Allow users to enable TOTP-based two-factor authentication.",
|
|
239
|
+
inputType: "boolean"
|
|
240
|
+
},
|
|
241
|
+
feature_wallet_signing: {
|
|
242
|
+
key: "feature_wallet_signing",
|
|
243
|
+
label: "Enable Embedded Wallet",
|
|
244
|
+
description: "Enable the embedded wallet for transaction signing.",
|
|
245
|
+
inputType: "boolean"
|
|
246
|
+
},
|
|
247
|
+
wallet_recovery_mode: {
|
|
248
|
+
key: "wallet_recovery_mode",
|
|
249
|
+
label: "Recovery Mode",
|
|
250
|
+
description: "How users can recover their wallet if they lose access.",
|
|
251
|
+
inputType: "select",
|
|
252
|
+
presets: [
|
|
253
|
+
{ label: "Share C Only (Recommended)", value: "share_c_only" },
|
|
254
|
+
{ label: "Full Seed Phrase", value: "full_seed" },
|
|
255
|
+
{ label: "No Recovery", value: "none" }
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
feature_credits: {
|
|
259
|
+
key: "feature_credits",
|
|
260
|
+
label: "Credit System",
|
|
261
|
+
description: "Enable the deposits and credits system. Users can deposit tokens to receive platform credits.",
|
|
262
|
+
inputType: "boolean"
|
|
263
|
+
},
|
|
264
|
+
feature_user_withdrawals: {
|
|
265
|
+
key: "feature_user_withdrawals",
|
|
266
|
+
label: "User Withdrawals",
|
|
267
|
+
description: "Allow users to withdraw SOL/SPL tokens from their embedded wallet to external addresses.",
|
|
268
|
+
inputType: "boolean"
|
|
269
|
+
},
|
|
270
|
+
// ============= Security Settings =============
|
|
271
|
+
security_cors_origins: {
|
|
272
|
+
key: "security_cors_origins",
|
|
273
|
+
label: "CORS Origins",
|
|
274
|
+
description: "Allowed origins for cross-origin requests (comma-separated). Empty = same origin only.",
|
|
275
|
+
inputType: "text"
|
|
276
|
+
},
|
|
277
|
+
security_cookie_domain: {
|
|
278
|
+
key: "security_cookie_domain",
|
|
279
|
+
label: "Cookie Domain",
|
|
280
|
+
description: "Domain for auth cookies. Empty uses the request origin.",
|
|
281
|
+
inputType: "text"
|
|
282
|
+
},
|
|
283
|
+
security_cookie_secure: {
|
|
284
|
+
key: "security_cookie_secure",
|
|
285
|
+
label: "Secure Cookies",
|
|
286
|
+
description: "Require HTTPS for cookies. Disable only for local development.",
|
|
287
|
+
inputType: "boolean"
|
|
288
|
+
},
|
|
289
|
+
security_cookie_same_site: {
|
|
290
|
+
key: "security_cookie_same_site",
|
|
291
|
+
label: "Cookie SameSite",
|
|
292
|
+
description: 'SameSite policy for cookies. Use "none" only if needed for cross-site embeds.',
|
|
293
|
+
inputType: "select",
|
|
294
|
+
presets: [
|
|
295
|
+
{ label: "Strict", value: "strict" },
|
|
296
|
+
{ label: "Lax (Recommended)", value: "lax" },
|
|
297
|
+
{ label: "None (cross-site)", value: "none" }
|
|
298
|
+
]
|
|
299
|
+
},
|
|
300
|
+
security_session_timeout: {
|
|
301
|
+
key: "security_session_timeout",
|
|
302
|
+
label: "Session Timeout",
|
|
303
|
+
description: "How long sessions remain valid before requiring re-authentication.",
|
|
304
|
+
inputType: "duration",
|
|
305
|
+
min: 300,
|
|
306
|
+
presets: [
|
|
307
|
+
{ label: "1 hour", value: "3600" },
|
|
308
|
+
{ label: "24 hours", value: "86400" },
|
|
309
|
+
{ label: "7 days", value: "604800" },
|
|
310
|
+
{ label: "30 days", value: "2592000" }
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
security_jwt_issuer: {
|
|
314
|
+
key: "security_jwt_issuer",
|
|
315
|
+
label: "JWT Issuer",
|
|
316
|
+
description: "Issuer claim for JWTs. Empty uses the server URL.",
|
|
317
|
+
inputType: "text"
|
|
318
|
+
},
|
|
319
|
+
security_jwt_audience: {
|
|
320
|
+
key: "security_jwt_audience",
|
|
321
|
+
label: "JWT Audience",
|
|
322
|
+
description: "Audience claim for JWTs. Empty uses default.",
|
|
323
|
+
inputType: "text"
|
|
324
|
+
},
|
|
325
|
+
// ============= Email/SMTP Settings =============
|
|
326
|
+
email_provider: {
|
|
327
|
+
key: "email_provider",
|
|
328
|
+
label: "Email Provider",
|
|
329
|
+
description: "Select your email service provider for automatic configuration.",
|
|
330
|
+
inputType: "select",
|
|
331
|
+
presets: [
|
|
332
|
+
{ label: "Mailgun", value: "mailgun" },
|
|
333
|
+
{ label: "SendGrid", value: "sendgrid" },
|
|
334
|
+
{ label: "Postmark", value: "postmark" },
|
|
335
|
+
{ label: "AWS SES", value: "ses" },
|
|
336
|
+
{ label: "Resend", value: "resend" },
|
|
337
|
+
{ label: "Custom SMTP", value: "custom" }
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
email_smtp_host: {
|
|
341
|
+
key: "email_smtp_host",
|
|
342
|
+
label: "SMTP Host",
|
|
343
|
+
description: "SMTP server hostname (e.g., smtp.sendgrid.net).",
|
|
344
|
+
inputType: "text"
|
|
345
|
+
},
|
|
346
|
+
email_smtp_port: {
|
|
347
|
+
key: "email_smtp_port",
|
|
348
|
+
label: "SMTP Port",
|
|
349
|
+
description: "SMTP server port. Common: 587 (TLS), 465 (SSL), 25 (unencrypted).",
|
|
350
|
+
inputType: "select",
|
|
351
|
+
presets: [
|
|
352
|
+
{ label: "587 (TLS)", value: "587" },
|
|
353
|
+
{ label: "465 (SSL)", value: "465" },
|
|
354
|
+
{ label: "25 (Plain)", value: "25" }
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
email_smtp_user: {
|
|
358
|
+
key: "email_smtp_user",
|
|
359
|
+
label: "SMTP Username",
|
|
360
|
+
description: "Username for SMTP authentication.",
|
|
361
|
+
inputType: "text"
|
|
362
|
+
},
|
|
363
|
+
email_smtp_password: {
|
|
364
|
+
key: "email_smtp_password",
|
|
365
|
+
label: "API Key",
|
|
366
|
+
description: "API key or password for your email provider.",
|
|
367
|
+
inputType: "secret"
|
|
368
|
+
},
|
|
369
|
+
email_smtp_tls: {
|
|
370
|
+
key: "email_smtp_tls",
|
|
371
|
+
label: "Use TLS",
|
|
372
|
+
description: "Enable TLS encryption for SMTP connections.",
|
|
373
|
+
inputType: "boolean"
|
|
374
|
+
},
|
|
375
|
+
email_from_address: {
|
|
376
|
+
key: "email_from_address",
|
|
377
|
+
label: "From Address",
|
|
378
|
+
description: "Default sender email address (e.g., noreply@example.com).",
|
|
379
|
+
inputType: "text"
|
|
380
|
+
},
|
|
381
|
+
email_from_name: {
|
|
382
|
+
key: "email_from_name",
|
|
383
|
+
label: "From Name",
|
|
384
|
+
description: 'Default sender display name (e.g., "My App").',
|
|
385
|
+
inputType: "text"
|
|
386
|
+
},
|
|
387
|
+
// ============= Webhook Settings =============
|
|
388
|
+
webhook_enabled: {
|
|
389
|
+
key: "webhook_enabled",
|
|
390
|
+
label: "Enable Webhooks",
|
|
391
|
+
description: "Send notifications to a Discord or Slack webhook URL.",
|
|
392
|
+
inputType: "boolean"
|
|
393
|
+
},
|
|
394
|
+
webhook_url: {
|
|
395
|
+
key: "webhook_url",
|
|
396
|
+
label: "Webhook URL",
|
|
397
|
+
description: "Discord or Slack webhook URL to receive notifications.",
|
|
398
|
+
inputType: "text",
|
|
399
|
+
placeholder: "https://discord.com/api/webhooks/..."
|
|
400
|
+
},
|
|
401
|
+
webhook_notify_registrations: {
|
|
402
|
+
key: "webhook_notify_registrations",
|
|
403
|
+
label: "New Registrations",
|
|
404
|
+
description: "Notify when a new user registers.",
|
|
405
|
+
inputType: "boolean"
|
|
406
|
+
},
|
|
407
|
+
webhook_notify_signins: {
|
|
408
|
+
key: "webhook_notify_signins",
|
|
409
|
+
label: "Sign-Ins",
|
|
410
|
+
description: "Notify when a user signs in.",
|
|
411
|
+
inputType: "boolean"
|
|
412
|
+
},
|
|
413
|
+
webhook_notify_deposits: {
|
|
414
|
+
key: "webhook_notify_deposits",
|
|
415
|
+
label: "Deposits",
|
|
416
|
+
description: "Notify when a user makes a deposit.",
|
|
417
|
+
inputType: "boolean"
|
|
418
|
+
},
|
|
419
|
+
// ============= Server Settings =============
|
|
420
|
+
server_frontend_url: {
|
|
421
|
+
key: "server_frontend_url",
|
|
422
|
+
label: "Frontend URL",
|
|
423
|
+
description: "URL of your frontend app (for redirects and email links).",
|
|
424
|
+
inputType: "text"
|
|
425
|
+
},
|
|
426
|
+
server_base_path: {
|
|
427
|
+
key: "server_base_path",
|
|
428
|
+
label: "Base Path",
|
|
429
|
+
description: "Base path for auth endpoints (e.g., /auth).",
|
|
430
|
+
inputType: "text"
|
|
431
|
+
},
|
|
432
|
+
server_trust_proxy: {
|
|
433
|
+
key: "server_trust_proxy",
|
|
434
|
+
label: "Trust Proxy",
|
|
435
|
+
description: "Trust X-Forwarded-For headers. Enable if behind a reverse proxy.",
|
|
436
|
+
inputType: "boolean"
|
|
437
|
+
},
|
|
438
|
+
server_cedros_pay_api_key: {
|
|
439
|
+
key: "server_cedros_pay_api_key",
|
|
440
|
+
label: "Cedros Pay API Key",
|
|
441
|
+
description: "API key for Cedros Pay to authenticate with this server. Copy this into your Cedros Pay settings.",
|
|
442
|
+
inputType: "secret"
|
|
443
|
+
},
|
|
444
|
+
jupiter_api_key: {
|
|
445
|
+
key: "jupiter_api_key",
|
|
446
|
+
label: "Jupiter API Key",
|
|
447
|
+
description: 'API key for Jupiter Ultra API (gasless swaps). Get a free key at <a href="https://portal.jup.ag" target="_blank" rel="noopener">portal.jup.ag</a>.',
|
|
448
|
+
inputType: "secret"
|
|
449
|
+
},
|
|
450
|
+
server_metrics_api_key: {
|
|
451
|
+
key: "server_metrics_api_key",
|
|
452
|
+
label: "Metrics API Key",
|
|
453
|
+
description: "API key for Prometheus/Grafana to scrape the /metrics endpoint. Use with Authorization: Bearer header.",
|
|
454
|
+
inputType: "secret"
|
|
455
|
+
},
|
|
456
|
+
server_log_level: {
|
|
457
|
+
key: "server_log_level",
|
|
458
|
+
label: "Log Level",
|
|
459
|
+
description: "Minimum severity level for log output. Lower levels are more verbose.",
|
|
460
|
+
inputType: "select",
|
|
461
|
+
presets: [
|
|
462
|
+
{ label: "Trace (most verbose)", value: "trace" },
|
|
463
|
+
{ label: "Debug", value: "debug" },
|
|
464
|
+
{ label: "Info", value: "info" },
|
|
465
|
+
{ label: "Warn", value: "warn" },
|
|
466
|
+
{ label: "Error (least verbose)", value: "error" }
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
server_log_format: {
|
|
470
|
+
key: "server_log_format",
|
|
471
|
+
label: "Log Format",
|
|
472
|
+
description: "Output format for log messages.",
|
|
473
|
+
inputType: "select",
|
|
474
|
+
presets: [
|
|
475
|
+
{ label: "JSON (structured)", value: "json" },
|
|
476
|
+
{ label: "Pretty (human-readable)", value: "pretty" }
|
|
477
|
+
]
|
|
478
|
+
},
|
|
479
|
+
server_environment: {
|
|
480
|
+
key: "server_environment",
|
|
481
|
+
label: "Environment",
|
|
482
|
+
description: "Deployment environment. Affects default behaviors and log verbosity.",
|
|
483
|
+
inputType: "select",
|
|
484
|
+
presets: [
|
|
485
|
+
{ label: "Development", value: "development" },
|
|
486
|
+
{ label: "Staging", value: "staging" },
|
|
487
|
+
{ label: "Production", value: "production" }
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
// ============= Privacy Settings (existing) =============
|
|
491
|
+
privacy_period_secs: {
|
|
492
|
+
key: "privacy_period_secs",
|
|
493
|
+
label: "Privacy Period",
|
|
494
|
+
description: "How long deposits are held before withdrawal to provide timing privacy. Longer periods provide better privacy but delay user access to funds.",
|
|
495
|
+
inputType: "duration",
|
|
496
|
+
min: 0,
|
|
497
|
+
presets: [
|
|
498
|
+
{ label: "Disabled", value: "0" },
|
|
499
|
+
{ label: "1 hour", value: "3600" },
|
|
500
|
+
{ label: "6 hours", value: "21600" },
|
|
501
|
+
{ label: "24 hours", value: "86400" },
|
|
502
|
+
{ label: "7 days", value: "604800" },
|
|
503
|
+
{ label: "14 days", value: "1209600" },
|
|
504
|
+
{ label: "30 days", value: "2592000" }
|
|
505
|
+
],
|
|
506
|
+
warningThreshold: {
|
|
507
|
+
below: 3600,
|
|
508
|
+
message: "Very short privacy periods may not provide adequate timing protection."
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
// Treasury settings
|
|
512
|
+
treasury_wallet_address: {
|
|
513
|
+
key: "treasury_wallet_address",
|
|
514
|
+
label: "Treasury Wallet Address",
|
|
515
|
+
description: "Solana wallet address where funds are sent. Used for privacy cash withdrawals, micro payment batches, and direct payments.",
|
|
516
|
+
inputType: "text",
|
|
517
|
+
placeholder: "e.g., 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"
|
|
518
|
+
},
|
|
519
|
+
// Withdrawal worker settings
|
|
520
|
+
withdrawal_poll_interval_secs: {
|
|
521
|
+
key: "withdrawal_poll_interval_secs",
|
|
522
|
+
label: "Worker Poll Interval",
|
|
523
|
+
description: "How often the withdrawal worker checks for deposits ready to process. Lower values process faster but increase server load.",
|
|
524
|
+
inputType: "duration",
|
|
525
|
+
min: 60,
|
|
526
|
+
presets: [
|
|
527
|
+
{ label: "1 minute", value: "60" },
|
|
528
|
+
{ label: "5 minutes", value: "300" },
|
|
529
|
+
{ label: "15 minutes", value: "900" },
|
|
530
|
+
{ label: "1 hour", value: "3600" },
|
|
531
|
+
{ label: "6 hours", value: "21600" }
|
|
532
|
+
],
|
|
533
|
+
warningThreshold: {
|
|
534
|
+
below: 60,
|
|
535
|
+
message: "Polling more than once per minute may cause excessive load."
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
withdrawal_batch_size: {
|
|
539
|
+
key: "withdrawal_batch_size",
|
|
540
|
+
label: "Batch Size",
|
|
541
|
+
description: "Maximum number of withdrawals to process in a single batch. Higher values improve throughput but may cause timeouts.",
|
|
542
|
+
inputType: "select",
|
|
543
|
+
min: 1,
|
|
544
|
+
max: 100,
|
|
545
|
+
presets: [
|
|
546
|
+
{ label: "1 (Sequential)", value: "1" },
|
|
547
|
+
{ label: "5", value: "5" },
|
|
548
|
+
{ label: "10 (Recommended)", value: "10" },
|
|
549
|
+
{ label: "25", value: "25" },
|
|
550
|
+
{ label: "50", value: "50" },
|
|
551
|
+
{ label: "100 (Max)", value: "100" }
|
|
552
|
+
]
|
|
553
|
+
},
|
|
554
|
+
withdrawal_timeout_secs: {
|
|
555
|
+
key: "withdrawal_timeout_secs",
|
|
556
|
+
label: "Transaction Timeout",
|
|
557
|
+
description: "How long to wait for a withdrawal transaction to confirm before considering it failed.",
|
|
558
|
+
inputType: "duration",
|
|
559
|
+
min: 30,
|
|
560
|
+
presets: [
|
|
561
|
+
{ label: "30 seconds", value: "30" },
|
|
562
|
+
{ label: "1 minute", value: "60" },
|
|
563
|
+
{ label: "2 minutes", value: "120" },
|
|
564
|
+
{ label: "5 minutes", value: "300" }
|
|
565
|
+
],
|
|
566
|
+
warningThreshold: {
|
|
567
|
+
below: 30,
|
|
568
|
+
message: "Very short timeouts may cause premature failure on slow networks."
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
withdrawal_max_retries: {
|
|
572
|
+
key: "withdrawal_max_retries",
|
|
573
|
+
label: "Max Retries",
|
|
574
|
+
description: "Number of times to retry a failed withdrawal before marking it as permanently failed.",
|
|
575
|
+
inputType: "select",
|
|
576
|
+
min: 0,
|
|
577
|
+
max: 10,
|
|
578
|
+
presets: [
|
|
579
|
+
{ label: "0 (No retries)", value: "0" },
|
|
580
|
+
{ label: "1", value: "1" },
|
|
581
|
+
{ label: "3 (Recommended)", value: "3" },
|
|
582
|
+
{ label: "5", value: "5" },
|
|
583
|
+
{ label: "10", value: "10" }
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
withdrawal_percentage: {
|
|
587
|
+
key: "withdrawal_percentage",
|
|
588
|
+
label: "Withdrawal Percentage",
|
|
589
|
+
description: "Percentage of ready funds to withdraw each cycle. Lower values spread withdrawals over time for better privacy.",
|
|
590
|
+
inputType: "percentage",
|
|
591
|
+
min: 1,
|
|
592
|
+
max: 100,
|
|
593
|
+
step: 5,
|
|
594
|
+
presets: [
|
|
595
|
+
{ label: "25%", value: "25" },
|
|
596
|
+
{ label: "50%", value: "50" },
|
|
597
|
+
{ label: "75%", value: "75" },
|
|
598
|
+
{ label: "100% (All at once)", value: "100" }
|
|
599
|
+
],
|
|
600
|
+
warningThreshold: {
|
|
601
|
+
above: 75,
|
|
602
|
+
message: "High percentages may reduce timing privacy by processing most withdrawals together."
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
partial_withdrawal_count: {
|
|
606
|
+
key: "partial_withdrawal_count",
|
|
607
|
+
label: "Partial Withdrawals",
|
|
608
|
+
description: "Maximum partial withdrawals per batch. Partial withdrawals add noise to timing analysis. Set to 0 to disable.",
|
|
609
|
+
inputType: "select",
|
|
610
|
+
min: 0,
|
|
611
|
+
presets: [
|
|
612
|
+
{ label: "Disabled", value: "0" },
|
|
613
|
+
{ label: "1", value: "1" },
|
|
614
|
+
{ label: "3", value: "3" },
|
|
615
|
+
{ label: "5", value: "5" },
|
|
616
|
+
{ label: "10", value: "10" }
|
|
617
|
+
]
|
|
618
|
+
},
|
|
619
|
+
partial_withdrawal_min_lamports: {
|
|
620
|
+
key: "partial_withdrawal_min_lamports",
|
|
621
|
+
label: "Min Balance for Partial",
|
|
622
|
+
description: "Minimum account balance (in lamports) required before partial withdrawals are considered. 1 SOL = 1,000,000,000 lamports.",
|
|
623
|
+
inputType: "select",
|
|
624
|
+
min: 0,
|
|
625
|
+
presets: [
|
|
626
|
+
{ label: "0.1 SOL", value: "100000000" },
|
|
627
|
+
{ label: "0.5 SOL", value: "500000000" },
|
|
628
|
+
{ label: "1 SOL", value: "1000000000" },
|
|
629
|
+
{ label: "5 SOL", value: "5000000000" },
|
|
630
|
+
{ label: "10 SOL", value: "10000000000" }
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
// Rate limit settings
|
|
634
|
+
rate_limit_auth: {
|
|
635
|
+
key: "rate_limit_auth",
|
|
636
|
+
label: "Auth Request Limit",
|
|
637
|
+
description: "Maximum authentication attempts (login, register, password reset) per IP per window. Protects against brute force attacks.",
|
|
638
|
+
inputType: "select",
|
|
639
|
+
min: 1,
|
|
640
|
+
unit: "requests",
|
|
641
|
+
presets: [
|
|
642
|
+
{ label: "5 (Strict)", value: "5" },
|
|
643
|
+
{ label: "10 (Recommended)", value: "10" },
|
|
644
|
+
{ label: "20", value: "20" },
|
|
645
|
+
{ label: "50 (Permissive)", value: "50" }
|
|
646
|
+
],
|
|
647
|
+
warningThreshold: {
|
|
648
|
+
above: 20,
|
|
649
|
+
message: "High auth limits may allow brute force attempts."
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
rate_limit_general: {
|
|
653
|
+
key: "rate_limit_general",
|
|
654
|
+
label: "General Request Limit",
|
|
655
|
+
description: "Maximum general API requests per IP per window. Affects all non-auth endpoints.",
|
|
656
|
+
inputType: "select",
|
|
657
|
+
min: 1,
|
|
658
|
+
unit: "requests",
|
|
659
|
+
presets: [
|
|
660
|
+
{ label: "30", value: "30" },
|
|
661
|
+
{ label: "60 (Recommended)", value: "60" },
|
|
662
|
+
{ label: "120", value: "120" },
|
|
663
|
+
{ label: "300", value: "300" }
|
|
664
|
+
]
|
|
665
|
+
},
|
|
666
|
+
rate_limit_credit: {
|
|
667
|
+
key: "rate_limit_credit",
|
|
668
|
+
label: "Credit Request Limit",
|
|
669
|
+
description: "Maximum credit/balance check requests per IP per window. Higher for apps that poll balance frequently.",
|
|
670
|
+
inputType: "select",
|
|
671
|
+
min: 1,
|
|
672
|
+
unit: "requests",
|
|
673
|
+
presets: [
|
|
674
|
+
{ label: "10", value: "10" },
|
|
675
|
+
{ label: "30 (Recommended)", value: "30" },
|
|
676
|
+
{ label: "60", value: "60" },
|
|
677
|
+
{ label: "120", value: "120" }
|
|
678
|
+
]
|
|
679
|
+
},
|
|
680
|
+
rate_limit_window: {
|
|
681
|
+
key: "rate_limit_window",
|
|
682
|
+
label: "Rate Limit Window",
|
|
683
|
+
description: 'Time window for rate limiting. All limits above are "per window". Shorter windows are stricter.',
|
|
684
|
+
inputType: "duration",
|
|
685
|
+
min: 1,
|
|
686
|
+
presets: [
|
|
687
|
+
{ label: "30 seconds", value: "30" },
|
|
688
|
+
{ label: "1 minute", value: "60" },
|
|
689
|
+
{ label: "5 minutes", value: "300" },
|
|
690
|
+
{ label: "15 minutes", value: "900" }
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
// ============= Deposit General Settings =============
|
|
694
|
+
solana_rpc_url: {
|
|
695
|
+
key: "solana_rpc_url",
|
|
696
|
+
label: "Solana RPC URL",
|
|
697
|
+
description: 'Get a fast RPC endpoint from <a href="https://helius.dev" target="_blank" rel="noopener">Helius</a> or <a href="https://quicknode.com" target="_blank" rel="noopener">QuickNode</a>.',
|
|
698
|
+
inputType: "text",
|
|
699
|
+
placeholder: "https://api.mainnet-beta.solana.com"
|
|
700
|
+
},
|
|
701
|
+
solana_network: {
|
|
702
|
+
key: "solana_network",
|
|
703
|
+
label: "Solana Network",
|
|
704
|
+
description: "The Solana network to use for deposits and withdrawals.",
|
|
705
|
+
inputType: "select",
|
|
706
|
+
presets: [
|
|
707
|
+
{ label: "Mainnet", value: "mainnet-beta" },
|
|
708
|
+
{ label: "Devnet", value: "devnet" }
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
deposit_privacy_enabled: {
|
|
712
|
+
key: "deposit_privacy_enabled",
|
|
713
|
+
label: "Enable Private Deposits",
|
|
714
|
+
description: "When enabled, deposits are held for a privacy period before withdrawal. Provides timing privacy but delays fund availability.",
|
|
715
|
+
inputType: "boolean"
|
|
716
|
+
},
|
|
717
|
+
deposit_company_token: {
|
|
718
|
+
key: "deposit_company_token",
|
|
719
|
+
label: "Platform Token",
|
|
720
|
+
description: "The token that represents platform credits. Deposits are converted to this token. Common choices: USDC, SOL.",
|
|
721
|
+
inputType: "select",
|
|
722
|
+
presets: [
|
|
723
|
+
{ label: "USDC", value: "USDC" },
|
|
724
|
+
{ label: "USDT", value: "USDT" },
|
|
725
|
+
{ label: "SOL", value: "SOL" },
|
|
726
|
+
{ label: "EURC", value: "EURC" }
|
|
727
|
+
]
|
|
728
|
+
},
|
|
729
|
+
deposit_micro_enabled: {
|
|
730
|
+
key: "deposit_micro_enabled",
|
|
731
|
+
label: "SOL Micro Payments",
|
|
732
|
+
description: "Allow small SOL deposits (under $10) that are batched together for efficiency.",
|
|
733
|
+
inputType: "boolean"
|
|
734
|
+
},
|
|
735
|
+
deposit_gasless_swap_enabled: {
|
|
736
|
+
key: "deposit_gasless_swap_enabled",
|
|
737
|
+
label: "Gasless Swap Payments",
|
|
738
|
+
description: "Allow deposits via Jupiter swaps.",
|
|
739
|
+
inputType: "boolean"
|
|
740
|
+
},
|
|
741
|
+
deposit_min_usd: {
|
|
742
|
+
key: "deposit_min_usd",
|
|
743
|
+
label: "Minimum Deposit",
|
|
744
|
+
description: "Minimum deposit amount in USD equivalent.",
|
|
745
|
+
inputType: "select",
|
|
746
|
+
unit: "USD",
|
|
747
|
+
presets: [
|
|
748
|
+
{ label: "$1", value: "1" },
|
|
749
|
+
{ label: "$5", value: "5" },
|
|
750
|
+
{ label: "$10", value: "10" },
|
|
751
|
+
{ label: "$25", value: "25" }
|
|
752
|
+
]
|
|
753
|
+
},
|
|
754
|
+
deposit_max_usd: {
|
|
755
|
+
key: "deposit_max_usd",
|
|
756
|
+
label: "Maximum Deposit",
|
|
757
|
+
description: "Maximum deposit amount per transaction in USD equivalent. Set to 0 for unlimited.",
|
|
758
|
+
inputType: "select",
|
|
759
|
+
unit: "USD",
|
|
760
|
+
presets: [
|
|
761
|
+
{ label: "Unlimited", value: "0" },
|
|
762
|
+
{ label: "$1,000", value: "1000" },
|
|
763
|
+
{ label: "$10,000", value: "10000" },
|
|
764
|
+
{ label: "$100,000", value: "100000" }
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
// Deposit component settings
|
|
768
|
+
deposit_show_explainer: {
|
|
769
|
+
key: "deposit_show_explainer",
|
|
770
|
+
label: "Show Explainer Screen",
|
|
771
|
+
description: "Show the introductory explainer screen at the start of the deposit flow.",
|
|
772
|
+
inputType: "boolean"
|
|
773
|
+
},
|
|
774
|
+
// Deposit token settings
|
|
775
|
+
deposit_quick_action_tokens: {
|
|
776
|
+
key: "deposit_quick_action_tokens",
|
|
777
|
+
label: "Quick Action Tokens",
|
|
778
|
+
description: "Comma-separated token symbols shown as quick action buttons. First token is the default.",
|
|
779
|
+
inputType: "tokenSymbolList"
|
|
780
|
+
},
|
|
781
|
+
deposit_custom_tokens: {
|
|
782
|
+
key: "deposit_custom_tokens",
|
|
783
|
+
label: "Custom Dropdown Tokens",
|
|
784
|
+
description: 'Comma-separated token symbols shown in the "Custom" dropdown. Leave empty to show all.',
|
|
785
|
+
inputType: "tokenSymbolList"
|
|
786
|
+
},
|
|
787
|
+
deposit_custom_tokens_json: {
|
|
788
|
+
key: "deposit_custom_tokens_json",
|
|
789
|
+
label: "Custom Token Definitions",
|
|
790
|
+
description: "Add tokens beyond the built-in list. Define symbol, mint address, decimals, and logo URL.",
|
|
791
|
+
inputType: "tokenList"
|
|
792
|
+
},
|
|
793
|
+
// Deposit fee settings
|
|
794
|
+
deposit_fee_policy: {
|
|
795
|
+
key: "deposit_fee_policy",
|
|
796
|
+
label: "Fee Policy",
|
|
797
|
+
description: "Who pays deposit fees: company absorbs all, or user pays swap/privacy/all fees.",
|
|
798
|
+
inputType: "select",
|
|
799
|
+
presets: [
|
|
800
|
+
{ label: "Company Pays All", value: "company_pays_all" },
|
|
801
|
+
{ label: "User Pays Swap Fees", value: "user_pays_swap" },
|
|
802
|
+
{ label: "User Pays Privacy Fees", value: "user_pays_privacy" },
|
|
803
|
+
{ label: "User Pays All Fees", value: "user_pays_all" }
|
|
804
|
+
]
|
|
805
|
+
},
|
|
806
|
+
privacy_fee_fixed_lamports: {
|
|
807
|
+
key: "privacy_fee_fixed_lamports",
|
|
808
|
+
label: "Privacy Fixed Fee",
|
|
809
|
+
description: "Fixed fee for Privacy Cash deposits in lamports. 1 SOL = 1,000,000,000 lamports.",
|
|
810
|
+
inputType: "select",
|
|
811
|
+
unit: "lamports",
|
|
812
|
+
presets: [
|
|
813
|
+
{ label: "0 SOL", value: "0" },
|
|
814
|
+
{ label: "0.001 SOL", value: "1000000" },
|
|
815
|
+
{ label: "0.005 SOL", value: "5000000" },
|
|
816
|
+
{ label: "0.006 SOL (Default)", value: "6000000" },
|
|
817
|
+
{ label: "0.01 SOL", value: "10000000" }
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
privacy_fee_percent_bps: {
|
|
821
|
+
key: "privacy_fee_percent_bps",
|
|
822
|
+
label: "Privacy Percentage Fee",
|
|
823
|
+
description: "Percentage fee for Privacy Cash deposits in basis points. 100 bps = 1%.",
|
|
824
|
+
inputType: "select",
|
|
825
|
+
unit: "bps",
|
|
826
|
+
presets: [
|
|
827
|
+
{ label: "0%", value: "0" },
|
|
828
|
+
{ label: "0.25%", value: "25" },
|
|
829
|
+
{ label: "0.35% (Default)", value: "35" },
|
|
830
|
+
{ label: "0.5%", value: "50" },
|
|
831
|
+
{ label: "1%", value: "100" }
|
|
832
|
+
]
|
|
833
|
+
},
|
|
834
|
+
swap_fee_fixed_lamports: {
|
|
835
|
+
key: "swap_fee_fixed_lamports",
|
|
836
|
+
label: "Swap Fixed Fee",
|
|
837
|
+
description: "Fixed fee for Jupiter swaps in lamports. Covers transaction costs.",
|
|
838
|
+
inputType: "select",
|
|
839
|
+
unit: "lamports",
|
|
840
|
+
presets: [
|
|
841
|
+
{ label: "0 SOL", value: "0" },
|
|
842
|
+
{ label: "0.001 SOL (Default)", value: "1000000" },
|
|
843
|
+
{ label: "0.002 SOL", value: "2000000" },
|
|
844
|
+
{ label: "0.005 SOL", value: "5000000" }
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
swap_fee_percent_bps: {
|
|
848
|
+
key: "swap_fee_percent_bps",
|
|
849
|
+
label: "Swap Percentage Fee",
|
|
850
|
+
description: "Percentage fee for Jupiter swaps in basis points. 100 bps = 1%.",
|
|
851
|
+
inputType: "select",
|
|
852
|
+
unit: "bps",
|
|
853
|
+
presets: [
|
|
854
|
+
{ label: "0%", value: "0" },
|
|
855
|
+
{ label: "0.1% (Default)", value: "10" },
|
|
856
|
+
{ label: "0.25%", value: "25" },
|
|
857
|
+
{ label: "0.5%", value: "50" }
|
|
858
|
+
]
|
|
859
|
+
},
|
|
860
|
+
company_fee_fixed_lamports: {
|
|
861
|
+
key: "company_fee_fixed_lamports",
|
|
862
|
+
label: "Company Fixed Fee",
|
|
863
|
+
description: "Additional fixed processing fee in lamports. Set to 0 to disable.",
|
|
864
|
+
inputType: "select",
|
|
865
|
+
unit: "lamports",
|
|
866
|
+
presets: [
|
|
867
|
+
{ label: "Disabled", value: "0" },
|
|
868
|
+
{ label: "0.001 SOL", value: "1000000" },
|
|
869
|
+
{ label: "0.005 SOL", value: "5000000" },
|
|
870
|
+
{ label: "0.01 SOL", value: "10000000" }
|
|
871
|
+
]
|
|
872
|
+
},
|
|
873
|
+
company_fee_percent_bps: {
|
|
874
|
+
key: "company_fee_percent_bps",
|
|
875
|
+
label: "Company Percentage Fee",
|
|
876
|
+
description: "Additional percentage processing fee in basis points. 100 bps = 1%.",
|
|
877
|
+
inputType: "select",
|
|
878
|
+
unit: "bps",
|
|
879
|
+
presets: [
|
|
880
|
+
{ label: "Disabled", value: "0" },
|
|
881
|
+
{ label: "0.1%", value: "10" },
|
|
882
|
+
{ label: "0.25%", value: "25" },
|
|
883
|
+
{ label: "0.5%", value: "50" },
|
|
884
|
+
{ label: "1%", value: "100" }
|
|
885
|
+
]
|
|
886
|
+
},
|
|
887
|
+
micro_batch_threshold_usd: {
|
|
888
|
+
key: "micro_batch_threshold_usd",
|
|
889
|
+
label: "Batch Threshold",
|
|
890
|
+
description: "Minimum accumulated USD value before triggering a batch swap. Jupiter requires ~$10 minimum.",
|
|
891
|
+
inputType: "select",
|
|
892
|
+
unit: "USD",
|
|
893
|
+
presets: [
|
|
894
|
+
{ label: "$10 (Minimum)", value: "10" },
|
|
895
|
+
{ label: "$25", value: "25" },
|
|
896
|
+
{ label: "$50", value: "50" },
|
|
897
|
+
{ label: "$100", value: "100" }
|
|
898
|
+
]
|
|
899
|
+
},
|
|
900
|
+
micro_batch_poll_secs: {
|
|
901
|
+
key: "micro_batch_poll_secs",
|
|
902
|
+
label: "Batch Poll Interval",
|
|
903
|
+
description: "How often to check for batchable micro deposits. Lower values process faster but increase load.",
|
|
904
|
+
inputType: "duration",
|
|
905
|
+
min: 60,
|
|
906
|
+
presets: [
|
|
907
|
+
{ label: "1 minute", value: "60" },
|
|
908
|
+
{ label: "5 minutes (Default)", value: "300" },
|
|
909
|
+
{ label: "15 minutes", value: "900" },
|
|
910
|
+
{ label: "1 hour", value: "3600" }
|
|
911
|
+
]
|
|
912
|
+
},
|
|
913
|
+
private_deposit_min_lamports: {
|
|
914
|
+
key: "private_deposit_min_lamports",
|
|
915
|
+
label: "Min Private Deposit",
|
|
916
|
+
description: "Minimum amount for Privacy Cash deposits in lamports. Smaller deposits use micro batching.",
|
|
917
|
+
inputType: "select",
|
|
918
|
+
unit: "lamports",
|
|
919
|
+
presets: [
|
|
920
|
+
{ label: "0.1 SOL", value: "100000000" },
|
|
921
|
+
{ label: "0.25 SOL (Default)", value: "250000000" },
|
|
922
|
+
{ label: "0.5 SOL", value: "500000000" },
|
|
923
|
+
{ label: "1 SOL", value: "1000000000" }
|
|
924
|
+
]
|
|
925
|
+
},
|
|
926
|
+
withdrawal_min_lamports: {
|
|
927
|
+
key: "withdrawal_min_lamports",
|
|
928
|
+
label: "Min Withdrawal Amount",
|
|
929
|
+
description: "Minimum amount to withdraw in lamports. Deposits below this remain pending. Fees are ~0.006 SOL + 0.35% + Jupiter.",
|
|
930
|
+
inputType: "select",
|
|
931
|
+
unit: "lamports",
|
|
932
|
+
presets: [
|
|
933
|
+
{ label: "0.5 SOL", value: "500000000" },
|
|
934
|
+
{ label: "1 SOL (Default)", value: "1000000000" },
|
|
935
|
+
{ label: "2 SOL", value: "2000000000" },
|
|
936
|
+
{ label: "5 SOL", value: "5000000000" }
|
|
937
|
+
],
|
|
938
|
+
warningThreshold: {
|
|
939
|
+
below: 5e8,
|
|
940
|
+
message: "Very small withdrawals may lose significant value to fees."
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}, L = [
|
|
944
|
+
"SOL",
|
|
945
|
+
"USDC",
|
|
946
|
+
"USDT",
|
|
947
|
+
"EURC",
|
|
948
|
+
"USD1",
|
|
949
|
+
"PYUSD",
|
|
950
|
+
"USDH",
|
|
951
|
+
"CASH",
|
|
952
|
+
"BONK",
|
|
953
|
+
"ORE"
|
|
954
|
+
];
|
|
955
|
+
function x(e) {
|
|
956
|
+
const l = e.split(/(<a\s[^>]*>.*?<\/a>)/g);
|
|
957
|
+
return l.length === 1 ? e : l.map((a, n) => {
|
|
958
|
+
const s = a.match(/^<a\s+href="([^"]+)"[^>]*>([^<]+)<\/a>$/);
|
|
959
|
+
return s ? /* @__PURE__ */ t("a", { href: s[1], target: "_blank", rel: "noopener noreferrer", children: s[2] }, n) : a;
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function Q({
|
|
963
|
+
settings: e,
|
|
964
|
+
edits: l,
|
|
965
|
+
onChange: a,
|
|
966
|
+
externalWarnings: n
|
|
967
|
+
}) {
|
|
968
|
+
return /* @__PURE__ */ t("div", { className: "cedros-settings-grid", children: e.map((s) => /* @__PURE__ */ t(
|
|
969
|
+
F,
|
|
970
|
+
{
|
|
971
|
+
setting: s,
|
|
972
|
+
editValue: l[s.key],
|
|
973
|
+
onChange: a,
|
|
974
|
+
externalWarning: n?.[s.key]
|
|
975
|
+
},
|
|
976
|
+
s.key
|
|
977
|
+
)) });
|
|
978
|
+
}
|
|
979
|
+
function F({ setting: e, editValue: l, onChange: a, externalWarning: n }) {
|
|
980
|
+
const s = q[e.key], i = l ?? e.value, p = l !== void 0 && l !== e.value, r = s?.inputType === "boolean", o = S(() => {
|
|
981
|
+
if (n) return n;
|
|
982
|
+
if (!s?.warningThreshold) return null;
|
|
983
|
+
const c = parseInt(i, 10);
|
|
984
|
+
if (isNaN(c)) return null;
|
|
985
|
+
const { above: m, below: h, message: y } = s.warningThreshold;
|
|
986
|
+
return m !== void 0 && c > m || h !== void 0 && c < h ? y : null;
|
|
987
|
+
}, [i, s?.warningThreshold, n]);
|
|
988
|
+
return s ? /* @__PURE__ */ t(
|
|
989
|
+
"div",
|
|
990
|
+
{
|
|
991
|
+
className: `cedros-setting-row ${p ? "cedros-setting-row-changed" : ""} ${o ? "cedros-setting-row-warning" : ""} ${r ? "cedros-setting-row-toggle" : ""}`,
|
|
992
|
+
children: r ? /* @__PURE__ */ u(f, { children: [
|
|
993
|
+
/* @__PURE__ */ u("div", { className: "cedros-setting-control cedros-setting-control-toggle", children: [
|
|
994
|
+
/* @__PURE__ */ t(
|
|
995
|
+
P,
|
|
996
|
+
{
|
|
997
|
+
meta: s,
|
|
998
|
+
value: i,
|
|
999
|
+
onChange: (c) => a(e.key, c)
|
|
1000
|
+
}
|
|
1001
|
+
),
|
|
1002
|
+
o && /* @__PURE__ */ t("div", { className: "cedros-setting-warning", children: o })
|
|
1003
|
+
] }),
|
|
1004
|
+
/* @__PURE__ */ u("div", { className: "cedros-setting-label", children: [
|
|
1005
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-name", children: s.label }),
|
|
1006
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-description", children: x(s.description) })
|
|
1007
|
+
] })
|
|
1008
|
+
] }) : /* @__PURE__ */ u(f, { children: [
|
|
1009
|
+
/* @__PURE__ */ u("div", { className: "cedros-setting-label", children: [
|
|
1010
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-name", children: s.label }),
|
|
1011
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-description", children: x(s.description) })
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ u("div", { className: "cedros-setting-control", children: [
|
|
1014
|
+
/* @__PURE__ */ t(
|
|
1015
|
+
P,
|
|
1016
|
+
{
|
|
1017
|
+
meta: s,
|
|
1018
|
+
value: i,
|
|
1019
|
+
onChange: (c) => a(e.key, c)
|
|
1020
|
+
}
|
|
1021
|
+
),
|
|
1022
|
+
o && /* @__PURE__ */ t("div", { className: "cedros-setting-warning", children: o })
|
|
1023
|
+
] })
|
|
1024
|
+
] })
|
|
1025
|
+
}
|
|
1026
|
+
) : /* @__PURE__ */ u("div", { className: `cedros-setting-row ${p ? "cedros-setting-row-changed" : ""}`, children: [
|
|
1027
|
+
/* @__PURE__ */ u("div", { className: "cedros-setting-label", children: [
|
|
1028
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-name", children: e.key }),
|
|
1029
|
+
e.description && /* @__PURE__ */ t("span", { className: "cedros-setting-description", children: e.description })
|
|
1030
|
+
] }),
|
|
1031
|
+
/* @__PURE__ */ t("div", { className: "cedros-setting-input-wrapper", children: /* @__PURE__ */ t(
|
|
1032
|
+
"input",
|
|
1033
|
+
{
|
|
1034
|
+
type: "text",
|
|
1035
|
+
value: i,
|
|
1036
|
+
onChange: (c) => a(e.key, c.target.value),
|
|
1037
|
+
className: "cedros-setting-input"
|
|
1038
|
+
}
|
|
1039
|
+
) })
|
|
1040
|
+
] });
|
|
1041
|
+
}
|
|
1042
|
+
function P({ meta: e, value: l, onChange: a }) {
|
|
1043
|
+
switch (e.inputType) {
|
|
1044
|
+
case "duration":
|
|
1045
|
+
return /* @__PURE__ */ t($, { value: l, onChange: a, presets: e.presets, min: e.min });
|
|
1046
|
+
case "percentage":
|
|
1047
|
+
return /* @__PURE__ */ t(
|
|
1048
|
+
j,
|
|
1049
|
+
{
|
|
1050
|
+
value: l,
|
|
1051
|
+
onChange: a,
|
|
1052
|
+
min: e.min ?? 1,
|
|
1053
|
+
max: e.max ?? 100,
|
|
1054
|
+
step: e.step ?? 5,
|
|
1055
|
+
presets: e.presets
|
|
1056
|
+
}
|
|
1057
|
+
);
|
|
1058
|
+
case "select":
|
|
1059
|
+
return /* @__PURE__ */ t(
|
|
1060
|
+
W,
|
|
1061
|
+
{
|
|
1062
|
+
value: l,
|
|
1063
|
+
onChange: a,
|
|
1064
|
+
presets: e.presets ?? [],
|
|
1065
|
+
unit: e.unit
|
|
1066
|
+
}
|
|
1067
|
+
);
|
|
1068
|
+
case "number":
|
|
1069
|
+
return /* @__PURE__ */ t(
|
|
1070
|
+
H,
|
|
1071
|
+
{
|
|
1072
|
+
value: l,
|
|
1073
|
+
onChange: a,
|
|
1074
|
+
min: e.min,
|
|
1075
|
+
max: e.max,
|
|
1076
|
+
unit: e.unit
|
|
1077
|
+
}
|
|
1078
|
+
);
|
|
1079
|
+
case "tokenList":
|
|
1080
|
+
return /* @__PURE__ */ t(V, { value: l, onChange: a });
|
|
1081
|
+
case "text":
|
|
1082
|
+
return /* @__PURE__ */ t(
|
|
1083
|
+
"input",
|
|
1084
|
+
{
|
|
1085
|
+
type: "text",
|
|
1086
|
+
value: l,
|
|
1087
|
+
onChange: (n) => a(n.target.value),
|
|
1088
|
+
className: "cedros-setting-input",
|
|
1089
|
+
placeholder: e.label
|
|
1090
|
+
}
|
|
1091
|
+
);
|
|
1092
|
+
case "boolean":
|
|
1093
|
+
return /* @__PURE__ */ t(B, { value: l, onChange: a });
|
|
1094
|
+
case "secret":
|
|
1095
|
+
return /* @__PURE__ */ t(J, { value: l, onChange: a, multiline: e.multiline });
|
|
1096
|
+
case "tokenSymbolList":
|
|
1097
|
+
return /* @__PURE__ */ t(G, { value: l, onChange: a });
|
|
1098
|
+
default:
|
|
1099
|
+
return /* @__PURE__ */ t(
|
|
1100
|
+
"input",
|
|
1101
|
+
{
|
|
1102
|
+
type: "text",
|
|
1103
|
+
value: l,
|
|
1104
|
+
onChange: (n) => a(n.target.value),
|
|
1105
|
+
className: "cedros-setting-input"
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
function $({ value: e, onChange: l, presets: a, min: n = 0 }) {
|
|
1111
|
+
const s = parseInt(e, 10) || 0, i = R(s), p = d(
|
|
1112
|
+
(o) => {
|
|
1113
|
+
o.target.value && l(o.target.value);
|
|
1114
|
+
},
|
|
1115
|
+
[l]
|
|
1116
|
+
), r = d(
|
|
1117
|
+
(o) => {
|
|
1118
|
+
const c = Math.max(n, parseInt(o.target.value, 10) || 0);
|
|
1119
|
+
l(String(c));
|
|
1120
|
+
},
|
|
1121
|
+
[l, n]
|
|
1122
|
+
);
|
|
1123
|
+
return /* @__PURE__ */ u("div", { className: "cedros-duration-input", children: [
|
|
1124
|
+
a && a.length > 0 && /* @__PURE__ */ u(
|
|
1125
|
+
"select",
|
|
1126
|
+
{
|
|
1127
|
+
value: a.find((o) => o.value === e)?.value ?? "",
|
|
1128
|
+
onChange: p,
|
|
1129
|
+
className: "cedros-setting-select",
|
|
1130
|
+
children: [
|
|
1131
|
+
/* @__PURE__ */ t("option", { value: "", children: "Custom..." }),
|
|
1132
|
+
a.map((o) => /* @__PURE__ */ t("option", { value: o.value, children: o.label }, o.value))
|
|
1133
|
+
]
|
|
1134
|
+
}
|
|
1135
|
+
),
|
|
1136
|
+
/* @__PURE__ */ u("div", { className: "cedros-duration-custom", children: [
|
|
1137
|
+
/* @__PURE__ */ t(
|
|
1138
|
+
"input",
|
|
1139
|
+
{
|
|
1140
|
+
type: "number",
|
|
1141
|
+
value: s,
|
|
1142
|
+
onChange: r,
|
|
1143
|
+
min: n,
|
|
1144
|
+
className: "cedros-setting-input cedros-setting-input-sm"
|
|
1145
|
+
}
|
|
1146
|
+
),
|
|
1147
|
+
/* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: "seconds" }),
|
|
1148
|
+
/* @__PURE__ */ u("span", { className: "cedros-duration-display", children: [
|
|
1149
|
+
"= ",
|
|
1150
|
+
i
|
|
1151
|
+
] })
|
|
1152
|
+
] })
|
|
1153
|
+
] });
|
|
1154
|
+
}
|
|
1155
|
+
function j({
|
|
1156
|
+
value: e,
|
|
1157
|
+
onChange: l,
|
|
1158
|
+
min: a,
|
|
1159
|
+
max: n,
|
|
1160
|
+
step: s,
|
|
1161
|
+
presets: i
|
|
1162
|
+
}) {
|
|
1163
|
+
const p = parseInt(e, 10) || a, r = d(
|
|
1164
|
+
(c) => {
|
|
1165
|
+
l(c.target.value);
|
|
1166
|
+
},
|
|
1167
|
+
[l]
|
|
1168
|
+
), o = d(
|
|
1169
|
+
(c) => {
|
|
1170
|
+
l(c);
|
|
1171
|
+
},
|
|
1172
|
+
[l]
|
|
1173
|
+
);
|
|
1174
|
+
return /* @__PURE__ */ u("div", { className: "cedros-percentage-input", children: [
|
|
1175
|
+
/* @__PURE__ */ u("div", { className: "cedros-percentage-slider-row", children: [
|
|
1176
|
+
/* @__PURE__ */ t(
|
|
1177
|
+
"input",
|
|
1178
|
+
{
|
|
1179
|
+
type: "range",
|
|
1180
|
+
value: p,
|
|
1181
|
+
onChange: r,
|
|
1182
|
+
min: a,
|
|
1183
|
+
max: n,
|
|
1184
|
+
step: s,
|
|
1185
|
+
className: "cedros-percentage-slider"
|
|
1186
|
+
}
|
|
1187
|
+
),
|
|
1188
|
+
/* @__PURE__ */ u("span", { className: "cedros-percentage-value", children: [
|
|
1189
|
+
p,
|
|
1190
|
+
"%"
|
|
1191
|
+
] })
|
|
1192
|
+
] }),
|
|
1193
|
+
i && i.length > 0 && /* @__PURE__ */ t("div", { className: "cedros-preset-buttons", children: i.map((c) => /* @__PURE__ */ t(
|
|
1194
|
+
"button",
|
|
1195
|
+
{
|
|
1196
|
+
type: "button",
|
|
1197
|
+
className: `cedros-preset-button ${c.value === e ? "cedros-preset-button-active" : ""}`,
|
|
1198
|
+
onClick: () => o(c.value),
|
|
1199
|
+
children: c.label
|
|
1200
|
+
},
|
|
1201
|
+
c.value
|
|
1202
|
+
)) })
|
|
1203
|
+
] });
|
|
1204
|
+
}
|
|
1205
|
+
function W({ value: e, onChange: l, presets: a, unit: n }) {
|
|
1206
|
+
const s = !a.some((r) => r.value === e), i = d(
|
|
1207
|
+
(r) => {
|
|
1208
|
+
r.target.value !== "__custom__" && l(r.target.value);
|
|
1209
|
+
},
|
|
1210
|
+
[l]
|
|
1211
|
+
), p = d(
|
|
1212
|
+
(r) => {
|
|
1213
|
+
l(r.target.value);
|
|
1214
|
+
},
|
|
1215
|
+
[l]
|
|
1216
|
+
);
|
|
1217
|
+
return /* @__PURE__ */ u("div", { className: "cedros-select-input", children: [
|
|
1218
|
+
/* @__PURE__ */ u(
|
|
1219
|
+
"select",
|
|
1220
|
+
{
|
|
1221
|
+
value: s ? "__custom__" : e,
|
|
1222
|
+
onChange: i,
|
|
1223
|
+
className: "cedros-setting-select",
|
|
1224
|
+
children: [
|
|
1225
|
+
a.map((r) => /* @__PURE__ */ t("option", { value: r.value, children: r.label }, r.value)),
|
|
1226
|
+
/* @__PURE__ */ t("option", { value: "__custom__", children: "Custom..." })
|
|
1227
|
+
]
|
|
1228
|
+
}
|
|
1229
|
+
),
|
|
1230
|
+
s && /* @__PURE__ */ u("div", { className: "cedros-select-custom", children: [
|
|
1231
|
+
/* @__PURE__ */ t(
|
|
1232
|
+
"input",
|
|
1233
|
+
{
|
|
1234
|
+
type: "number",
|
|
1235
|
+
value: e,
|
|
1236
|
+
onChange: p,
|
|
1237
|
+
className: "cedros-setting-input cedros-setting-input-sm"
|
|
1238
|
+
}
|
|
1239
|
+
),
|
|
1240
|
+
n && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: n })
|
|
1241
|
+
] })
|
|
1242
|
+
] });
|
|
1243
|
+
}
|
|
1244
|
+
function H({ value: e, onChange: l, min: a, max: n, unit: s }) {
|
|
1245
|
+
const i = d(
|
|
1246
|
+
(p) => {
|
|
1247
|
+
l(p.target.value);
|
|
1248
|
+
},
|
|
1249
|
+
[l]
|
|
1250
|
+
);
|
|
1251
|
+
return /* @__PURE__ */ u("div", { className: "cedros-number-input", children: [
|
|
1252
|
+
/* @__PURE__ */ t(
|
|
1253
|
+
"input",
|
|
1254
|
+
{
|
|
1255
|
+
type: "number",
|
|
1256
|
+
value: e,
|
|
1257
|
+
onChange: i,
|
|
1258
|
+
min: a,
|
|
1259
|
+
max: n,
|
|
1260
|
+
className: "cedros-setting-input"
|
|
1261
|
+
}
|
|
1262
|
+
),
|
|
1263
|
+
s && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: s })
|
|
1264
|
+
] });
|
|
1265
|
+
}
|
|
1266
|
+
function B({ value: e, onChange: l }) {
|
|
1267
|
+
const a = e === "true", n = d(() => {
|
|
1268
|
+
l(a ? "false" : "true");
|
|
1269
|
+
}, [a, l]);
|
|
1270
|
+
return /* @__PURE__ */ u(
|
|
1271
|
+
"button",
|
|
1272
|
+
{
|
|
1273
|
+
type: "button",
|
|
1274
|
+
role: "switch",
|
|
1275
|
+
"aria-checked": a,
|
|
1276
|
+
className: `cedros-toggle ${a ? "cedros-toggle-on" : "cedros-toggle-off"}`,
|
|
1277
|
+
onClick: n,
|
|
1278
|
+
children: [
|
|
1279
|
+
/* @__PURE__ */ t("span", { className: "cedros-toggle-track", children: /* @__PURE__ */ t("span", { className: "cedros-toggle-thumb" }) }),
|
|
1280
|
+
/* @__PURE__ */ t("span", { className: "cedros-toggle-label", children: a ? "Enabled" : "Disabled" })
|
|
1281
|
+
]
|
|
1282
|
+
}
|
|
1283
|
+
);
|
|
1284
|
+
}
|
|
1285
|
+
function J({ value: e, onChange: l, multiline: a }) {
|
|
1286
|
+
const [n, s] = k(!1), [i, p] = k(!1), r = e && e.length > 0, o = d(() => {
|
|
1287
|
+
s(!0), p(!0);
|
|
1288
|
+
}, []), c = d(() => {
|
|
1289
|
+
s(!1), p(!1);
|
|
1290
|
+
}, []), m = d(
|
|
1291
|
+
(h) => {
|
|
1292
|
+
l(h.target.value);
|
|
1293
|
+
},
|
|
1294
|
+
[l]
|
|
1295
|
+
);
|
|
1296
|
+
return !n && r ? /* @__PURE__ */ u("div", { className: "cedros-secret-input cedros-secret-input-masked", children: [
|
|
1297
|
+
/* @__PURE__ */ t("span", { className: "cedros-secret-masked", children: "•".repeat(Math.min(e.length, 20)) }),
|
|
1298
|
+
/* @__PURE__ */ t("button", { type: "button", className: "cedros-secret-edit-btn", onClick: o, children: "Edit" })
|
|
1299
|
+
] }) : /* @__PURE__ */ u("div", { className: "cedros-secret-input", children: [
|
|
1300
|
+
a ? /* @__PURE__ */ t(
|
|
1301
|
+
"textarea",
|
|
1302
|
+
{
|
|
1303
|
+
value: e,
|
|
1304
|
+
onChange: m,
|
|
1305
|
+
className: "cedros-setting-input cedros-setting-textarea",
|
|
1306
|
+
placeholder: "Enter secret value...",
|
|
1307
|
+
rows: 4
|
|
1308
|
+
}
|
|
1309
|
+
) : /* @__PURE__ */ t(
|
|
1310
|
+
"input",
|
|
1311
|
+
{
|
|
1312
|
+
type: i ? "text" : "password",
|
|
1313
|
+
value: e,
|
|
1314
|
+
onChange: m,
|
|
1315
|
+
className: "cedros-setting-input",
|
|
1316
|
+
placeholder: "Enter secret value..."
|
|
1317
|
+
}
|
|
1318
|
+
),
|
|
1319
|
+
/* @__PURE__ */ u("div", { className: "cedros-secret-actions", children: [
|
|
1320
|
+
!a && /* @__PURE__ */ t(
|
|
1321
|
+
"button",
|
|
1322
|
+
{
|
|
1323
|
+
type: "button",
|
|
1324
|
+
className: "cedros-secret-toggle-btn",
|
|
1325
|
+
onClick: () => p(!i),
|
|
1326
|
+
children: i ? "Hide" : "Show"
|
|
1327
|
+
}
|
|
1328
|
+
),
|
|
1329
|
+
n && /* @__PURE__ */ t("button", { type: "button", className: "cedros-secret-done-btn", onClick: c, children: "Done" })
|
|
1330
|
+
] })
|
|
1331
|
+
] });
|
|
1332
|
+
}
|
|
1333
|
+
function V({ value: e, onChange: l }) {
|
|
1334
|
+
const a = S(() => {
|
|
1335
|
+
try {
|
|
1336
|
+
return JSON.parse(e || "[]");
|
|
1337
|
+
} catch {
|
|
1338
|
+
return [];
|
|
1339
|
+
}
|
|
1340
|
+
}, [e]), n = d(
|
|
1341
|
+
(r) => {
|
|
1342
|
+
l(JSON.stringify(r));
|
|
1343
|
+
},
|
|
1344
|
+
[l]
|
|
1345
|
+
), s = d(() => {
|
|
1346
|
+
n([...a, { symbol: "", mint: "", decimals: 6 }]);
|
|
1347
|
+
}, [a, n]), i = d(
|
|
1348
|
+
(r, o, c) => {
|
|
1349
|
+
const m = [...a];
|
|
1350
|
+
m[r] = { ...m[r], [o]: c }, n(m);
|
|
1351
|
+
},
|
|
1352
|
+
[a, n]
|
|
1353
|
+
), p = d(
|
|
1354
|
+
(r) => {
|
|
1355
|
+
n(a.filter((o, c) => c !== r));
|
|
1356
|
+
},
|
|
1357
|
+
[a, n]
|
|
1358
|
+
);
|
|
1359
|
+
return /* @__PURE__ */ u("div", { className: "cedros-token-list-input", children: [
|
|
1360
|
+
/* @__PURE__ */ u("div", { className: "cedros-token-presets", children: [
|
|
1361
|
+
/* @__PURE__ */ t("span", { className: "cedros-token-presets-label", children: "Built-in tokens:" }),
|
|
1362
|
+
/* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: L.map((r) => /* @__PURE__ */ t("span", { className: "cedros-token-preset-chip", children: r }, r)) })
|
|
1363
|
+
] }),
|
|
1364
|
+
a.length === 0 && /* @__PURE__ */ t("p", { className: "cedros-token-list-empty", children: "No custom tokens added. Use the built-in tokens above or add your own." }),
|
|
1365
|
+
a.map((r, o) => /* @__PURE__ */ u("div", { className: "cedros-token-row", children: [
|
|
1366
|
+
/* @__PURE__ */ u("div", { className: "cedros-token-row-fields", children: [
|
|
1367
|
+
/* @__PURE__ */ t(
|
|
1368
|
+
"input",
|
|
1369
|
+
{
|
|
1370
|
+
type: "text",
|
|
1371
|
+
placeholder: "Symbol",
|
|
1372
|
+
value: r.symbol,
|
|
1373
|
+
onChange: (c) => i(o, "symbol", c.target.value.toUpperCase()),
|
|
1374
|
+
className: "cedros-setting-input cedros-token-input-symbol",
|
|
1375
|
+
maxLength: 10
|
|
1376
|
+
}
|
|
1377
|
+
),
|
|
1378
|
+
/* @__PURE__ */ t(
|
|
1379
|
+
"input",
|
|
1380
|
+
{
|
|
1381
|
+
type: "text",
|
|
1382
|
+
placeholder: "Mint address",
|
|
1383
|
+
value: r.mint,
|
|
1384
|
+
onChange: (c) => i(o, "mint", c.target.value),
|
|
1385
|
+
className: "cedros-setting-input cedros-token-input-mint"
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
/* @__PURE__ */ t(
|
|
1389
|
+
"input",
|
|
1390
|
+
{
|
|
1391
|
+
type: "number",
|
|
1392
|
+
placeholder: "Decimals",
|
|
1393
|
+
value: r.decimals,
|
|
1394
|
+
onChange: (c) => i(o, "decimals", parseInt(c.target.value, 10) || 0),
|
|
1395
|
+
className: "cedros-setting-input cedros-token-input-decimals",
|
|
1396
|
+
min: 0,
|
|
1397
|
+
max: 18
|
|
1398
|
+
}
|
|
1399
|
+
),
|
|
1400
|
+
/* @__PURE__ */ t(
|
|
1401
|
+
"input",
|
|
1402
|
+
{
|
|
1403
|
+
type: "text",
|
|
1404
|
+
placeholder: "Logo URL (optional)",
|
|
1405
|
+
value: r.logoUrl || "",
|
|
1406
|
+
onChange: (c) => i(o, "logoUrl", c.target.value || void 0),
|
|
1407
|
+
className: "cedros-setting-input cedros-token-input-logo"
|
|
1408
|
+
}
|
|
1409
|
+
)
|
|
1410
|
+
] }),
|
|
1411
|
+
/* @__PURE__ */ t(
|
|
1412
|
+
"button",
|
|
1413
|
+
{
|
|
1414
|
+
type: "button",
|
|
1415
|
+
className: "cedros-token-remove-btn",
|
|
1416
|
+
onClick: () => p(o),
|
|
1417
|
+
title: "Remove token",
|
|
1418
|
+
children: "×"
|
|
1419
|
+
}
|
|
1420
|
+
)
|
|
1421
|
+
] }, o)),
|
|
1422
|
+
/* @__PURE__ */ t("button", { type: "button", className: "cedros-token-add-btn", onClick: s, children: "+ Add Token" })
|
|
1423
|
+
] });
|
|
1424
|
+
}
|
|
1425
|
+
function G({ value: e, onChange: l }) {
|
|
1426
|
+
const a = S(() => e.split(",").map((i) => i.trim()).filter(Boolean), [e]), n = d(
|
|
1427
|
+
(i) => {
|
|
1428
|
+
if (!i || a.includes(i)) return;
|
|
1429
|
+
const p = [...a, i].join(", ");
|
|
1430
|
+
l(p);
|
|
1431
|
+
},
|
|
1432
|
+
[a, l]
|
|
1433
|
+
), s = d(
|
|
1434
|
+
(i) => {
|
|
1435
|
+
const p = a.filter((r) => r !== i).join(", ");
|
|
1436
|
+
l(p);
|
|
1437
|
+
},
|
|
1438
|
+
[a, l]
|
|
1439
|
+
);
|
|
1440
|
+
return /* @__PURE__ */ u("div", { className: "cedros-token-symbol-list-input", children: [
|
|
1441
|
+
/* @__PURE__ */ u("div", { className: "cedros-token-presets", children: [
|
|
1442
|
+
/* @__PURE__ */ t("span", { className: "cedros-token-presets-label", children: "Click to add:" }),
|
|
1443
|
+
/* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: L.map((i) => {
|
|
1444
|
+
const p = a.includes(i);
|
|
1445
|
+
return /* @__PURE__ */ u(
|
|
1446
|
+
"button",
|
|
1447
|
+
{
|
|
1448
|
+
type: "button",
|
|
1449
|
+
className: `cedros-token-preset-chip ${p ? "cedros-token-preset-chip-selected" : ""}`,
|
|
1450
|
+
onClick: () => p ? s(i) : n(i),
|
|
1451
|
+
title: p ? `Remove ${i}` : `Add ${i}`,
|
|
1452
|
+
children: [
|
|
1453
|
+
i,
|
|
1454
|
+
p && /* @__PURE__ */ t("span", { className: "cedros-token-chip-check", children: "✓" })
|
|
1455
|
+
]
|
|
1456
|
+
},
|
|
1457
|
+
i
|
|
1458
|
+
);
|
|
1459
|
+
}) })
|
|
1460
|
+
] }),
|
|
1461
|
+
/* @__PURE__ */ t(
|
|
1462
|
+
"input",
|
|
1463
|
+
{
|
|
1464
|
+
type: "text",
|
|
1465
|
+
value: e,
|
|
1466
|
+
onChange: (i) => l(i.target.value),
|
|
1467
|
+
className: "cedros-setting-input",
|
|
1468
|
+
placeholder: "USDC, SOL, BONK..."
|
|
1469
|
+
}
|
|
1470
|
+
)
|
|
1471
|
+
] });
|
|
1472
|
+
}
|
|
1473
|
+
function Z({ status: e, error: l }) {
|
|
1474
|
+
return e === "idle" ? null : /* @__PURE__ */ u("div", { className: `cedros-autosave-status cedros-autosave-status--${e}`, children: [
|
|
1475
|
+
e === "pending" && /* @__PURE__ */ u(f, { children: [
|
|
1476
|
+
/* @__PURE__ */ t("span", { className: "cedros-autosave-dot" }),
|
|
1477
|
+
/* @__PURE__ */ t("span", { children: "Unsaved changes" })
|
|
1478
|
+
] }),
|
|
1479
|
+
e === "saving" && /* @__PURE__ */ u(f, { children: [
|
|
1480
|
+
/* @__PURE__ */ t("span", { className: "cedros-autosave-spinner" }),
|
|
1481
|
+
/* @__PURE__ */ t("span", { children: "Saving..." })
|
|
1482
|
+
] }),
|
|
1483
|
+
e === "saved" && /* @__PURE__ */ u(f, { children: [
|
|
1484
|
+
/* @__PURE__ */ t("span", { className: "cedros-autosave-check", children: "✓" }),
|
|
1485
|
+
/* @__PURE__ */ t("span", { children: "Saved" })
|
|
1486
|
+
] }),
|
|
1487
|
+
e === "error" && /* @__PURE__ */ u(f, { children: [
|
|
1488
|
+
/* @__PURE__ */ t("span", { className: "cedros-autosave-error-icon", children: "!" }),
|
|
1489
|
+
/* @__PURE__ */ t("span", { children: l || "Save failed" })
|
|
1490
|
+
] })
|
|
1491
|
+
] });
|
|
1492
|
+
}
|
|
1493
|
+
export {
|
|
1494
|
+
Z as A,
|
|
1495
|
+
Q as S,
|
|
1496
|
+
X as u
|
|
1497
|
+
};
|