@cedros/login-react 0.0.14 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/dist/{AuthenticationSettings-vowmQPXz.js → AuthenticationSettings-BipaLyGg.js} +20 -20
  2. package/dist/{AuthenticationSettings-vowmQPXz.js.map → AuthenticationSettings-BipaLyGg.js.map} +1 -1
  3. package/dist/{AuthenticationSettings-D739nNul.cjs → AuthenticationSettings-Cb80XWPm.cjs} +1 -1
  4. package/dist/{AuthenticationSettings-D739nNul.cjs.map → AuthenticationSettings-Cb80XWPm.cjs.map} +1 -1
  5. package/dist/{AuthenticationSettings-Dx3JCI3m.js → AuthenticationSettings-Cfn0No6U.js} +1 -1
  6. package/dist/{AuthenticationSettings-Dx3JCI3m.js.map → AuthenticationSettings-Cfn0No6U.js.map} +1 -1
  7. package/dist/{AuthenticationSettings-DtLoxQ2z.cjs → AuthenticationSettings-Cu0S0Z7s.cjs} +1 -1
  8. package/dist/{AuthenticationSettings-DtLoxQ2z.cjs.map → AuthenticationSettings-Cu0S0Z7s.cjs.map} +1 -1
  9. package/dist/{AutosaveStatus-Ciyt350A.js → AutosaveStatus-BKc7T2Tw.js} +323 -248
  10. package/dist/AutosaveStatus-BKc7T2Tw.js.map +1 -0
  11. package/dist/AutosaveStatus-BjLMt52a.cjs +1 -0
  12. package/dist/AutosaveStatus-BjLMt52a.cjs.map +1 -0
  13. package/dist/{CreditSystemSettings-BQ3h4CyM.js → CreditSystemSettings-CvcacgMM.js} +1 -1
  14. package/dist/{CreditSystemSettings-BQ3h4CyM.js.map → CreditSystemSettings-CvcacgMM.js.map} +1 -1
  15. package/dist/{CreditSystemSettings-bVuNLsqp.js → CreditSystemSettings-D13lZbIw.js} +1 -1
  16. package/dist/{CreditSystemSettings-bVuNLsqp.js.map → CreditSystemSettings-D13lZbIw.js.map} +1 -1
  17. package/dist/{CreditSystemSettings-CBot8EPW.cjs → CreditSystemSettings-DO-dUcxN.cjs} +1 -1
  18. package/dist/{CreditSystemSettings-CBot8EPW.cjs.map → CreditSystemSettings-DO-dUcxN.cjs.map} +1 -1
  19. package/dist/{CreditSystemSettings-C6dUsu72.cjs → CreditSystemSettings-DV0VkPIe.cjs} +1 -1
  20. package/dist/{CreditSystemSettings-C6dUsu72.cjs.map → CreditSystemSettings-DV0VkPIe.cjs.map} +1 -1
  21. package/dist/{EmailRegisterForm-Pvm3I8GP.cjs → EmailRegisterForm-DcpT5LU6.cjs} +1 -1
  22. package/dist/{EmailRegisterForm-Pvm3I8GP.cjs.map → EmailRegisterForm-DcpT5LU6.cjs.map} +1 -1
  23. package/dist/{EmailRegisterForm-nI0BOIxR.js → EmailRegisterForm-HMcnD3KA.js} +1 -1
  24. package/dist/{EmailRegisterForm-nI0BOIxR.js.map → EmailRegisterForm-HMcnD3KA.js.map} +1 -1
  25. package/dist/{EmailSettings-B9qwPSiM.cjs → EmailSettings-BkR7vlWL.cjs} +1 -1
  26. package/dist/{EmailSettings-B9qwPSiM.cjs.map → EmailSettings-BkR7vlWL.cjs.map} +1 -1
  27. package/dist/EmailSettings-CLMdw3rB.js +78 -0
  28. package/dist/EmailSettings-CLMdw3rB.js.map +1 -0
  29. package/dist/EmailSettings-Dq3mfUr2.cjs +1 -0
  30. package/dist/EmailSettings-Dq3mfUr2.cjs.map +1 -0
  31. package/dist/{EmailSettings-mxlKNcPl.js → EmailSettings-ulEHtH2y.js} +1 -1
  32. package/dist/{EmailSettings-mxlKNcPl.js.map → EmailSettings-ulEHtH2y.js.map} +1 -1
  33. package/dist/{EmbeddedWalletSettings-BInZvFZf.js → EmbeddedWalletSettings-BTTV8Nqi.js} +46 -31
  34. package/dist/EmbeddedWalletSettings-BTTV8Nqi.js.map +1 -0
  35. package/dist/EmbeddedWalletSettings-C7H0E8Uz.cjs +1 -0
  36. package/dist/EmbeddedWalletSettings-C7H0E8Uz.cjs.map +1 -0
  37. package/dist/{EmbeddedWalletSettings-CXlZFFDw.js → EmbeddedWalletSettings-CLWh2TbV.js} +1 -1
  38. package/dist/{EmbeddedWalletSettings-CXlZFFDw.js.map → EmbeddedWalletSettings-CLWh2TbV.js.map} +1 -1
  39. package/dist/{EmbeddedWalletSettings-D5JXae1L.cjs → EmbeddedWalletSettings-DGmCVyex.cjs} +1 -1
  40. package/dist/{EmbeddedWalletSettings-D5JXae1L.cjs.map → EmbeddedWalletSettings-DGmCVyex.cjs.map} +1 -1
  41. package/dist/PermissionsSection-BPbE-hNx.cjs.map +1 -1
  42. package/dist/PermissionsSection-CighC1p6.js.map +1 -1
  43. package/dist/{ServerSettings-CYTlQ2xy.cjs → ServerSettings-CPAoiDtn.cjs} +1 -1
  44. package/dist/{ServerSettings-CYTlQ2xy.cjs.map → ServerSettings-CPAoiDtn.cjs.map} +1 -1
  45. package/dist/ServerSettings-Ch8MCmAY.js +91 -0
  46. package/dist/ServerSettings-Ch8MCmAY.js.map +1 -0
  47. package/dist/ServerSettings-CqDd59iM.cjs +1 -0
  48. package/dist/ServerSettings-CqDd59iM.cjs.map +1 -0
  49. package/dist/{ServerSettings-pSmWDC1d.js → ServerSettings-DooVeOet.js} +1 -1
  50. package/dist/{ServerSettings-pSmWDC1d.js.map → ServerSettings-DooVeOet.js.map} +1 -1
  51. package/dist/{WebhookSettings-Bb70MbFj.js → WebhookSettings-B6mjH90_.js} +1 -1
  52. package/dist/{WebhookSettings-Bb70MbFj.js.map → WebhookSettings-B6mjH90_.js.map} +1 -1
  53. package/dist/WebhookSettings-BG77iqJC.js +63 -0
  54. package/dist/WebhookSettings-BG77iqJC.js.map +1 -0
  55. package/dist/{WebhookSettings-CGyDKjrm.cjs → WebhookSettings-BeiUAcKs.cjs} +1 -1
  56. package/dist/{WebhookSettings-CGyDKjrm.cjs.map → WebhookSettings-BeiUAcKs.cjs.map} +1 -1
  57. package/dist/WebhookSettings-WMJ5zPjY.cjs +1 -0
  58. package/dist/WebhookSettings-WMJ5zPjY.cjs.map +1 -0
  59. package/dist/admin-only.cjs +1 -1
  60. package/dist/admin-only.d.ts +109 -14
  61. package/dist/admin-only.js +4 -3
  62. package/dist/email-only.cjs +1 -1
  63. package/dist/email-only.d.ts +56 -6
  64. package/dist/email-only.js +2 -2
  65. package/dist/google-only.cjs +1 -1
  66. package/dist/google-only.d.ts +56 -6
  67. package/dist/google-only.js +1 -1
  68. package/dist/index.cjs +13 -13
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.d.ts +330 -34
  71. package/dist/index.js +2505 -3559
  72. package/dist/index.js.map +1 -1
  73. package/dist/login-react.css +1 -1
  74. package/dist/mobileWalletAdapter-Dp4yFxCm.cjs +1 -0
  75. package/dist/mobileWalletAdapter-Dp4yFxCm.cjs.map +1 -0
  76. package/dist/mobileWalletAdapter-coZRD4Yx.js +291 -0
  77. package/dist/mobileWalletAdapter-coZRD4Yx.js.map +1 -0
  78. package/dist/{plugin-8_dpq7tC.cjs → plugin-BgMAc6DA.cjs} +1 -1
  79. package/dist/{plugin-8_dpq7tC.cjs.map → plugin-BgMAc6DA.cjs.map} +1 -1
  80. package/dist/{plugin-D1NdppqC.js → plugin-Bhf9zaly.js} +82 -70
  81. package/dist/{plugin-D1NdppqC.js.map → plugin-Bhf9zaly.js.map} +1 -1
  82. package/dist/{shamir-L-s-Tp1Z.js → shamir-CDbZS8I1.js} +1 -1
  83. package/dist/{shamir-L-s-Tp1Z.js.map → shamir-CDbZS8I1.js.map} +1 -1
  84. package/dist/{shamir-4DyQMJCk.cjs → shamir-DAa54dMh.cjs} +1 -1
  85. package/dist/{shamir-4DyQMJCk.cjs.map → shamir-DAa54dMh.cjs.map} +1 -1
  86. package/dist/{silentWalletEnroll-DWt6Pr3B.js → silentWalletEnroll-CRHzr4Zy.js} +2 -2
  87. package/dist/{silentWalletEnroll-DWt6Pr3B.js.map → silentWalletEnroll-CRHzr4Zy.js.map} +1 -1
  88. package/dist/{silentWalletEnroll-BgTb4H5I.cjs → silentWalletEnroll-Dl_oFapH.cjs} +1 -1
  89. package/dist/{silentWalletEnroll-BgTb4H5I.cjs.map → silentWalletEnroll-Dl_oFapH.cjs.map} +1 -1
  90. package/dist/solana-only.cjs +1 -1
  91. package/dist/solana-only.d.ts +112 -6
  92. package/dist/solana-only.js +6 -5
  93. package/dist/{useAuth-C3dpk0po.js → useAuth-D1NSN6yY.js} +822 -777
  94. package/dist/useAuth-D1NSN6yY.js.map +1 -0
  95. package/dist/{useAuth-D3Pk_H3z.cjs → useAuth-dS_6wAMp.cjs} +1 -1
  96. package/dist/useAuth-dS_6wAMp.cjs.map +1 -0
  97. package/package.json +4 -1
  98. package/dist/AutosaveStatus-CCrZszKA.cjs +0 -1
  99. package/dist/AutosaveStatus-CCrZszKA.cjs.map +0 -1
  100. package/dist/AutosaveStatus-Ciyt350A.js.map +0 -1
  101. package/dist/EmailSettings-CCA8dNCi.js +0 -17
  102. package/dist/EmailSettings-CCA8dNCi.js.map +0 -1
  103. package/dist/EmailSettings-RbgAq9FB.cjs +0 -1
  104. package/dist/EmailSettings-RbgAq9FB.cjs.map +0 -1
  105. package/dist/EmbeddedWalletSettings-B4h-8rxB.cjs +0 -1
  106. package/dist/EmbeddedWalletSettings-B4h-8rxB.cjs.map +0 -1
  107. package/dist/EmbeddedWalletSettings-BInZvFZf.js.map +0 -1
  108. package/dist/ServerSettings-BE8fsE5k.js +0 -84
  109. package/dist/ServerSettings-BE8fsE5k.js.map +0 -1
  110. package/dist/ServerSettings-DFs9jQ3f.cjs +0 -1
  111. package/dist/ServerSettings-DFs9jQ3f.cjs.map +0 -1
  112. package/dist/SettingsPageLayout--GZ_iHLc.js +0 -50
  113. package/dist/SettingsPageLayout--GZ_iHLc.js.map +0 -1
  114. package/dist/SettingsPageLayout-j5lMjEID.cjs +0 -1
  115. package/dist/SettingsPageLayout-j5lMjEID.cjs.map +0 -1
  116. package/dist/SolanaLoginButton-BjOxpE1C.cjs +0 -1
  117. package/dist/SolanaLoginButton-BjOxpE1C.cjs.map +0 -1
  118. package/dist/SolanaLoginButton-P22QjBaO.js +0 -262
  119. package/dist/SolanaLoginButton-P22QjBaO.js.map +0 -1
  120. package/dist/WebhookSettings-C-gvNAW1.cjs +0 -1
  121. package/dist/WebhookSettings-C-gvNAW1.cjs.map +0 -1
  122. package/dist/WebhookSettings-kIstSjZi.js +0 -17
  123. package/dist/WebhookSettings-kIstSjZi.js.map +0 -1
  124. package/dist/useAuth-C3dpk0po.js.map +0 -1
  125. package/dist/useAuth-D3Pk_H3z.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -177,13 +177,22 @@ export declare interface AdminDepositStatsResponse {
177
177
 
178
178
  /**
179
179
  * Group configuration for sidebar organization.
180
+ *
181
+ * **Ordering rules:**
182
+ * - Groups are keyed by `label` (not `id`) when merging across plugins.
183
+ * - The first plugin to declare a given label wins the `order` number.
184
+ * - Later plugins adding sections with `group: 'Same Label'` merge into
185
+ * the existing group without overriding the order.
186
+ * - Groups without an explicit config default to `order: 99` (sink to bottom).
187
+ * - cedros-login declares `Users` at order 0 and `Configuration` at order 2,
188
+ * leaving order 1 available for other plugins to insert between them.
180
189
  */
181
190
  export declare interface AdminGroupConfig {
182
191
  /** Group identifier */
183
192
  id: string;
184
- /** Display label */
193
+ /** Display label — used as the merge key across plugins */
185
194
  label: string;
186
- /** Sort order (lower = higher in sidebar) */
195
+ /** Sort order (lower = higher in sidebar). First plugin to declare a label wins. */
187
196
  order: number;
188
197
  /** Icon for the group header */
189
198
  icon?: ReactNode;
@@ -194,7 +203,23 @@ export declare interface AdminGroupConfig {
194
203
  export declare const AdminIcons: Record<string, ReactNode>;
195
204
 
196
205
  /**
197
- * Plugin definition - the main export from each admin module.
206
+ * Plugin definition the main export from each admin module.
207
+ *
208
+ * **Plugin merge order:** Plugins are iterated in registration order (insertion
209
+ * order of the registry `Map`). Sections from later plugins are appended after
210
+ * sections from earlier plugins. There is no cross-plugin section dedup — each
211
+ * plugin's section IDs are namespaced via `qualifiedId` (`pluginId:sectionId`).
212
+ *
213
+ * **Section visibility:** Each section passes two filters:
214
+ * 1. `checkPermission(section.requiredPermission, hostContext)` — role-based.
215
+ * 2. `hostContext.dashboardPermissions?.canAccess(section.id)` — owner RBAC.
216
+ *
217
+ * Register at the composition root:
218
+ * ```tsx
219
+ * <AdminShell plugins={[cedrosLoginPlugin, cedrosPayPlugin]} hostContext={ctx}>
220
+ * {children}
221
+ * </AdminShell>
222
+ * ```
198
223
  */
199
224
  export declare interface AdminPlugin {
200
225
  /** Unique plugin identifier */
@@ -249,6 +274,10 @@ export declare interface AdminPrivacyPeriodDepositsProps {
249
274
 
250
275
  /**
251
276
  * Section configuration for sidebar navigation.
277
+ *
278
+ * **Ordering:** Sections within a group are sorted by `order` (ascending).
279
+ * Sections with the same order are shown in plugin registration order.
280
+ * Sections without a `group` fall into the implicit `'Menu'` group.
252
281
  */
253
282
  export declare interface AdminSectionConfig {
254
283
  /** Section ID unique within the plugin */
@@ -257,9 +286,9 @@ export declare interface AdminSectionConfig {
257
286
  label: string;
258
287
  /** React node for the icon (SVG or component) */
259
288
  icon: ReactNode;
260
- /** Sidebar group name for visual organization */
289
+ /** Sidebar group name must match an {@link AdminGroupConfig.label} to merge into that group */
261
290
  group?: string;
262
- /** Sort order within group (lower = higher) */
291
+ /** Sort order within group (lower = higher). Default: 0 */
263
292
  order?: number;
264
293
  /** Permission required to see this section */
265
294
  requiredPermission?: PluginPermission;
@@ -476,6 +505,11 @@ export declare interface AdminWithdrawalStatsProps {
476
505
  onLoad?: (stats: AdminDepositStatsResponse) => void;
477
506
  }
478
507
 
508
+ /** Response listing all wallets (default + derived) for a user */
509
+ export declare interface AllWalletsListResponse {
510
+ wallets: DerivedWalletSummary[];
511
+ }
512
+
479
513
  /**
480
514
  * Apple Sign In button
481
515
  *
@@ -649,6 +683,27 @@ export declare interface CapabilityWarningProps {
649
683
  className?: string;
650
684
  }
651
685
 
686
+ /**
687
+ * All section IDs registered by the cedros-login plugin.
688
+ *
689
+ * Use these to reference specific sections when configuring
690
+ * `dashboardPermissions.canAccess()` or navigating programmatically.
691
+ *
692
+ * Qualified IDs (for multi-plugin use) are prefixed: `cedros-login:{id}`.
693
+ */
694
+ export declare const CEDROS_LOGIN_SECTION_IDS: {
695
+ readonly users: "users";
696
+ readonly team: "team";
697
+ readonly deposits: "deposits";
698
+ readonly withdrawals: "withdrawals";
699
+ readonly settingsAuth: "settings-auth";
700
+ readonly settingsEmail: "settings-email";
701
+ readonly settingsWebhooks: "settings-webhooks";
702
+ readonly settingsWallet: "settings-wallet";
703
+ readonly settingsCredits: "settings-credits";
704
+ readonly settingsServer: "settings-server";
705
+ };
706
+
652
707
  /**
653
708
  * Unified Admin Dashboard
654
709
  *
@@ -679,16 +734,44 @@ export declare interface CedrosAdminDashboardProps {
679
734
  }
680
735
 
681
736
  /**
682
- * Full configuration for CedrosLoginProvider
737
+ * Full configuration for the authentication system.
738
+ *
739
+ * **Note:** When passing config to `<CedrosLoginProvider>`, use
740
+ * {@link CedrosLoginProviderConfig} instead — it extends this type
741
+ * with `features: 'auto'` support. This base type is used internally
742
+ * after the provider resolves auto-discovery.
743
+ *
744
+ * ```
745
+ * CedrosLoginProviderConfig (public prop type — accepts features: 'auto')
746
+ * └── CedrosLoginConfig (internal type — features is always FeatureFlags)
747
+ * ```
683
748
  */
684
749
  export declare interface CedrosLoginConfig {
685
750
  /** Auth server base URL */
686
751
  serverUrl: string;
687
752
  /** App name for Solana message: "Login to {appName}". Default: window.location.hostname */
688
753
  appName?: string;
689
- /** Google OAuth client ID. Required if Google auth enabled */
754
+ /**
755
+ * Google OAuth client ID. Required if Google auth enabled.
756
+ *
757
+ * **CSP requirements** (when using Google One Tap / credential popup):
758
+ * ```
759
+ * script-src https://accounts.google.com;
760
+ * connect-src https://accounts.google.com;
761
+ * frame-src https://accounts.google.com;
762
+ * ```
763
+ */
690
764
  googleClientId?: string;
691
- /** Apple Sign In client ID (Services ID). Required if Apple auth enabled */
765
+ /**
766
+ * Apple Sign In client ID (Services ID). Required if Apple auth enabled.
767
+ *
768
+ * **CSP requirements** (when using Apple Sign In popup):
769
+ * ```
770
+ * script-src https://appleid.cdn-apple.com;
771
+ * connect-src https://appleid.apple.com;
772
+ * frame-src https://appleid.apple.com;
773
+ * ```
774
+ */
692
775
  appleClientId?: string;
693
776
  /** Solana configuration options */
694
777
  solana?: SolanaConfig;
@@ -745,9 +828,31 @@ export { cedrosLoginPlugin as loginPlugin }
745
828
  export declare function CedrosLoginProvider({ config, children }: CedrosLoginProviderProps): JSX.Element | null;
746
829
 
747
830
  /**
748
- * Config accepted by CedrosLoginProvider.
749
- * Same as CedrosLoginConfig but `features` also accepts `'auto'`
750
- * to fetch enabled methods from the server at startup.
831
+ * Config prop type for `<CedrosLoginProvider>`.
832
+ *
833
+ * Extends {@link CedrosLoginConfig} with one additional feature:
834
+ * the `features` field also accepts `'auto'` to fetch enabled
835
+ * auth methods from the server at startup.
836
+ *
837
+ * **`features: 'auto'` discovery contract:**
838
+ * - Calls `GET {serverUrl}/features` (no auth required, credentials omitted).
839
+ * - Response shape: `{ email, google, apple, solana, webauthn, instantLink }` (all booleans).
840
+ * - Timeout: `requestTimeout` or 5 000 ms. 1 retry on failure.
841
+ * - Fallback: all methods enabled (so the login page is never blank).
842
+ * - Children are not rendered until discovery completes.
843
+ * - `walletEnrollment` flag is client-only and is not part of the server response.
844
+ *
845
+ * When `features` is omitted or set to a `FeatureFlags` object, no server
846
+ * call is made and the flags are used as-is.
847
+ *
848
+ * @example
849
+ * ```tsx
850
+ * // Auto-discover enabled methods from the server:
851
+ * <CedrosLoginProvider config={{ serverUrl: '...', features: 'auto' }}>
852
+ *
853
+ * // Or specify explicitly:
854
+ * <CedrosLoginProvider config={{ serverUrl: '...', features: { email: true, google: true } }}>
855
+ * ```
751
856
  */
752
857
  export declare type CedrosLoginProviderConfig = Omit<CedrosLoginConfig, 'features'> & {
753
858
  features?: FeatureFlags | 'auto';
@@ -789,6 +894,12 @@ export declare interface ChangePasswordResponse {
789
894
  */
790
895
  declare type ChatMessageRole = 'user' | 'assistant' | 'system';
791
896
 
897
+ /** Request to create a derived wallet */
898
+ export declare interface CreateDerivedWalletRequest {
899
+ /** Human-readable label for the wallet (1-100 chars) */
900
+ label: string;
901
+ }
902
+
792
903
  /** Request to create the first admin user */
793
904
  export declare interface CreateFirstAdminRequest {
794
905
  /** Admin email address */
@@ -1209,6 +1320,25 @@ export declare interface DepositStatusResponse {
1209
1320
  /** Deposit tier type for tiered deposits */
1210
1321
  export declare type DepositTier = 'private' | 'public' | 'sol_micro';
1211
1322
 
1323
+ /** Response from creating a derived wallet */
1324
+ export declare interface DerivedWalletResponse {
1325
+ id: string;
1326
+ derivationIndex: number;
1327
+ solanaPubkey: string;
1328
+ label: string;
1329
+ createdAt: string;
1330
+ }
1331
+
1332
+ /** Summary of a wallet in list responses (default + derived) */
1333
+ export declare interface DerivedWalletSummary {
1334
+ id: string;
1335
+ derivationIndex: number;
1336
+ solanaPubkey: string;
1337
+ label: string;
1338
+ isDefault: boolean;
1339
+ createdAt: string;
1340
+ }
1341
+
1212
1342
  /**
1213
1343
  * UI-08: Standardized error prop type for display components.
1214
1344
  *
@@ -1545,42 +1675,87 @@ export declare interface HistoryProps {
1545
1675
  }
1546
1676
 
1547
1677
  /**
1548
- * Host context provided by AdminShell to plugins.
1549
- * Aggregates auth/context from all available sources.
1678
+ * Host context provided by the application to `<AdminShell>`.
1679
+ *
1680
+ * Each field is optional — omit fields your app doesn't use.
1681
+ * Plugins read the fields they need and degrade gracefully when absent.
1682
+ *
1683
+ * **Which plugin reads what:**
1684
+ * - `cedros-login` plugin: requires `cedrosLogin` (throws if missing).
1685
+ * Uses `user`, `getAccessToken`, `serverUrl` for all API calls.
1686
+ * Reads `org` for role-based section filtering.
1687
+ * - `cedros-pay` plugin: requires `cedrosPay`. Uses `walletAddress`,
1688
+ * `jwtToken`, `serverUrl`.
1689
+ * - Both plugins: respect `dashboardPermissions` for section-level RBAC.
1690
+ *
1691
+ * **Missing field behavior:**
1692
+ * - `cedrosLogin` missing → cedros-login plugin throws at `createPluginContext()`.
1693
+ * - `cedrosPay` missing → cedros-pay plugin throws at `createPluginContext()`.
1694
+ * - `org` missing → all authenticated users are treated as global admins
1695
+ * (all permission checks pass).
1696
+ * - `dashboardPermissions` missing → all sections visible (no owner-level filtering).
1697
+ * - `custom` → pass-through bag, not read by built-in plugins.
1550
1698
  */
1551
1699
  export declare interface HostContext {
1552
- /** cedros-login context */
1700
+ /**
1701
+ * Cedros Login auth context.
1702
+ *
1703
+ * **Required by:** `cedros-login` plugin.
1704
+ * **Missing behavior:** plugin throws `'cedros-login plugin requires cedrosLogin in hostContext'`.
1705
+ */
1553
1706
  cedrosLogin?: {
1707
+ /** Authenticated user, or null if not signed in */
1554
1708
  user: {
1555
1709
  id: string;
1556
1710
  email?: string;
1557
1711
  name?: string;
1558
1712
  picture?: string;
1559
1713
  } | null;
1714
+ /** Returns current JWT access token, or null */
1560
1715
  getAccessToken: () => string | null;
1716
+ /** Base URL of the cedros-login server (e.g., `https://api.example.com`) */
1561
1717
  serverUrl: string;
1562
1718
  };
1563
- /** cedros-pay context */
1719
+ /**
1720
+ * Cedros Pay context.
1721
+ *
1722
+ * **Required by:** `cedros-pay` plugin.
1723
+ * **Missing behavior:** pay plugin throws at context creation.
1724
+ */
1564
1725
  cedrosPay?: {
1726
+ /** Connected wallet public key */
1565
1727
  walletAddress?: string;
1728
+ /** JWT for cedros-pay API */
1566
1729
  jwtToken?: string;
1730
+ /** Base URL of the cedros-pay server */
1567
1731
  serverUrl: string;
1568
1732
  };
1569
- /** Organization context */
1733
+ /**
1734
+ * Organization context for multi-tenant role-based access.
1735
+ *
1736
+ * **Missing behavior:** all permission checks pass (global admin assumed).
1737
+ */
1570
1738
  org?: {
1739
+ /** Current organization ID */
1571
1740
  orgId: string;
1741
+ /** User's role in this org (e.g., 'owner', 'admin', 'member') */
1572
1742
  role: string;
1743
+ /** Granular permission strings (e.g., 'member:read', 'invite:create') */
1573
1744
  permissions: string[];
1574
1745
  };
1575
1746
  /**
1576
- * Dashboard section permissions (configured by org owner).
1577
- * Provides role-based access control for individual dashboard sections.
1747
+ * Owner-configured section-level access control.
1748
+ *
1749
+ * Applied *after* plugin permission checks — a section must pass both
1750
+ * `plugin.checkPermission()` and `canAccess()` to be visible.
1751
+ *
1752
+ * **Missing behavior:** all sections visible (no owner-level filtering).
1578
1753
  */
1579
1754
  dashboardPermissions?: {
1580
- /** Check if current user can access a section by ID */
1755
+ /** Check if current user can access a section by its `SectionId` */
1581
1756
  canAccess: (sectionId: string) => boolean;
1582
1757
  };
1583
- /** Generic extension point */
1758
+ /** Generic extension point for custom plugins. Not read by built-in plugins. */
1584
1759
  custom?: Record<string, unknown>;
1585
1760
  }
1586
1761
 
@@ -1953,6 +2128,32 @@ export declare interface MicroDepositRequest {
1953
2128
  walletAddress: string;
1954
2129
  }
1955
2130
 
2131
+ /**
2132
+ * Mobile Wallet Adapter (MWA) registration for web.
2133
+ *
2134
+ * On Android Chrome, MWA lets users authenticate with their installed Solana
2135
+ * wallet app (e.g., Phantom, Solflare) via Android Intents — no browser
2136
+ * extension needed.
2137
+ *
2138
+ * Once registered, MWA appears as a wallet option in the wallet adapter's
2139
+ * wallet list (alongside browser extension wallets). Users see it as
2140
+ * "Use Installed Wallet" in the wallet selector.
2141
+ *
2142
+ * Requires the optional peer dependency: @solana-mobile/wallet-standard-mobile
2143
+ *
2144
+ * @see https://docs.solanamobile.com/get-started/web/installation
2145
+ */
2146
+ export declare interface MobileWalletConfig {
2147
+ /** App name shown in the wallet's authorization dialog */
2148
+ name?: string;
2149
+ /** App URI for identity verification */
2150
+ uri?: string;
2151
+ /** App icon path/URL shown in the wallet dialog */
2152
+ icon?: string;
2153
+ /** Solana cluster(s) to support. Default: ['solana:mainnet'] */
2154
+ chains?: string[];
2155
+ }
2156
+
1956
2157
  /**
1957
2158
  * Organization entity
1958
2159
  */
@@ -2419,6 +2620,36 @@ export declare interface RecoveryState {
2419
2620
  /** Recovery flow state */
2420
2621
  declare type RecoveryStep = 'idle' | 'entering_phrase' | 'validating' | 'prompting_password' | 'registering_passkey' | 'encrypting' | 'uploading' | 'complete' | 'error';
2421
2622
 
2623
+ /**
2624
+ * Register Mobile Wallet Adapter as a wallet-standard wallet.
2625
+ *
2626
+ * Call this once at your application root (before rendering). After registration,
2627
+ * MWA automatically appears as "Use Installed Wallet" for users browsing on
2628
+ * Android Chrome with a Solana wallet app installed.
2629
+ *
2630
+ * Must be called in a non-SSR context (browser only). For Next.js, call in a
2631
+ * Client Component with `'use client'`.
2632
+ *
2633
+ * @example
2634
+ * ```tsx
2635
+ * import { registerMobileWallet, CedrosLoginProvider } from '@cedros/login-react';
2636
+ *
2637
+ * // Register before provider mounts
2638
+ * registerMobileWallet({ name: 'My App', uri: 'https://myapp.com' });
2639
+ *
2640
+ * function App() {
2641
+ * return (
2642
+ * <CedrosLoginProvider config={{ serverUrl: '...' }}>
2643
+ * <LoginForm />
2644
+ * </CedrosLoginProvider>
2645
+ * );
2646
+ * }
2647
+ * ```
2648
+ *
2649
+ * @returns true if registration succeeded, false if package not installed or SSR
2650
+ */
2651
+ export declare function registerMobileWallet(config?: MobileWalletConfig): boolean;
2652
+
2422
2653
  /**
2423
2654
  * Form for resetting password using a reset token.
2424
2655
  *
@@ -2492,21 +2723,56 @@ export declare interface SecuritySettingsProps {
2492
2723
  * These control which features are available in the application.
2493
2724
  * Unlike client-side FeatureFlags (passed to CedrosLoginProvider),
2494
2725
  * these can be toggled at runtime via the admin dashboard.
2726
+ *
2727
+ * **Cosmetic vs enforced:**
2728
+ * Some flags only affect UI visibility (cosmetic) while others are
2729
+ * enforced server-side. See per-field docs below.
2730
+ *
2731
+ * Settings that are enforced per-request by the server (hard 403 if disabled):
2732
+ * `auth_email_enabled`, `auth_google_enabled`, `auth_apple_enabled`,
2733
+ * `auth_instantlink_enabled`, `feature_user_withdrawals`, `privacy_period_secs`,
2734
+ * withdrawal worker settings, and deposit fee settings.
2735
+ *
2736
+ * Settings applied at server startup (take effect after restart):
2737
+ * `security_cors_origins`, `rate_limit_*`, `auth_webauthn_*`, `webhook_*`.
2495
2738
  */
2496
2739
  export declare interface ServerFeatures {
2497
- /** Enable multi-tenant organizations. Controls: Team, Invites sections */
2740
+ /**
2741
+ * Enable multi-tenant organizations. Controls: Team, Invites sections.
2742
+ *
2743
+ * **Cosmetic** — org endpoints are always reachable server-side.
2744
+ * This flag only controls admin dashboard section visibility.
2745
+ */
2498
2746
  organizations: boolean;
2499
- /** Enable Enterprise SSO for organizations */
2747
+ /** Enable Enterprise SSO for organizations. Startup-config enforced. */
2500
2748
  sso: boolean;
2501
- /** Enable two-factor authentication (TOTP) */
2749
+ /**
2750
+ * Enable two-factor authentication (TOTP).
2751
+ *
2752
+ * **Cosmetic** — MFA is actually gated by whether the user has TOTP
2753
+ * enrolled (`has_mfa_enabled()`), not by this flag. This controls
2754
+ * admin dashboard visibility only.
2755
+ */
2502
2756
  mfa: boolean;
2503
- /** Enable embedded wallet for transaction signing */
2757
+ /** Enable embedded wallet for transaction signing. Startup-config enforced. */
2504
2758
  walletSigning: boolean;
2505
- /** Enable deposits and credits system. Controls: Deposits, Withdrawals, Credit System sections */
2759
+ /**
2760
+ * Enable deposits and credits system.
2761
+ * Controls: Deposits, Withdrawals, Credit System admin sections.
2762
+ * Deposit/withdrawal endpoints are enforced server-side.
2763
+ */
2506
2764
  credits: boolean;
2507
- /** Enable user withdrawals from embedded wallet to external addresses */
2765
+ /**
2766
+ * Enable user withdrawals from embedded wallet to external addresses.
2767
+ * **Enforced** — server returns 403 on withdrawal endpoints when disabled.
2768
+ */
2508
2769
  userWithdrawals: boolean;
2509
- /** Enable Cedros Pay integration. Controls: Products, Transactions, Refunds, etc. */
2770
+ /**
2771
+ * Enable Cedros Pay integration.
2772
+ * Controls: Products, Transactions, Refunds admin sections.
2773
+ *
2774
+ * **Cosmetic** — only controls admin dashboard tab visibility.
2775
+ */
2510
2776
  cedrosPay: boolean;
2511
2777
  }
2512
2778
 
@@ -2739,6 +3005,8 @@ export declare type SigningMethod = 'external' | 'sss' | 'none';
2739
3005
  export declare interface SignTransactionRequest {
2740
3006
  /** Transaction bytes (base64) */
2741
3007
  transaction: string;
3008
+ /** Derived wallet ID to sign with. If absent, uses default wallet. */
3009
+ walletId?: string;
2742
3010
  /** Unlock credential */
2743
3011
  credential?: UnlockCredentialRequest;
2744
3012
  }
@@ -2881,13 +3149,7 @@ export declare interface SystemSetting {
2881
3149
 
2882
3150
  /**
2883
3151
  * System settings management component for administrators.
2884
- *
2885
- * Features:
2886
- * - Duration inputs with human-readable display
2887
- * - Percentage sliders
2888
- * - Preset dropdown selectors
2889
- * - Warning indicators for extreme values
2890
- * - Rich descriptions for each setting
3152
+ * Uses manual save/reset flow (not autosave).
2891
3153
  */
2892
3154
  export declare function SystemSettings({ showDescriptions, className, onSave, }: SystemSettingsProps): JSX.Element;
2893
3155
 
@@ -4561,6 +4823,12 @@ export declare interface UseWalletMaterialReturn {
4561
4823
  lock: () => Promise<void>;
4562
4824
  /** Get Share B for Share C recovery mode (proves ownership via Share C) */
4563
4825
  getShareBForRecovery: (request: ShareCRecoveryRequest) => Promise<ShareCRecoveryResponse>;
4826
+ /** Create a derived wallet (requires wallet to be unlocked) */
4827
+ createDerivedWallet: (request: CreateDerivedWalletRequest) => Promise<DerivedWalletResponse>;
4828
+ /** List all wallets (default + derived) */
4829
+ listAllWallets: () => Promise<AllWalletsListResponse>;
4830
+ /** Delete a derived wallet */
4831
+ deleteDerivedWallet: (walletId: string) => Promise<void>;
4564
4832
  /** Whether request is in progress */
4565
4833
  isLoading: boolean;
4566
4834
  /** Error from last request */
@@ -4590,6 +4858,16 @@ export declare interface UseWalletRecoveryReturn {
4590
4858
  isRecovering: boolean;
4591
4859
  }
4592
4860
 
4861
+ /**
4862
+ * Hook for multi-wallet management (default + derived wallets).
4863
+ *
4864
+ * Usage:
4865
+ * ```tsx
4866
+ * const { wallets, createWallet, deleteWallet, refresh } = useWallets();
4867
+ * ```
4868
+ */
4869
+ export declare function useWallets(): UseWalletsReturn;
4870
+
4593
4871
  /**
4594
4872
  * Hook for wallet transaction signing
4595
4873
  *
@@ -4624,6 +4902,24 @@ export declare interface UseWalletSigningReturn {
4624
4902
  clearError: () => void;
4625
4903
  }
4626
4904
 
4905
+ /** Hook return value for multi-wallet management */
4906
+ export declare interface UseWalletsReturn {
4907
+ /** All wallets (default + derived) */
4908
+ wallets: DerivedWalletSummary[];
4909
+ /** Whether wallet list is loading */
4910
+ isLoading: boolean;
4911
+ /** Create a new derived wallet */
4912
+ createWallet: (label: string) => Promise<DerivedWalletResponse>;
4913
+ /** Delete a derived wallet by ID */
4914
+ deleteWallet: (walletId: string) => Promise<void>;
4915
+ /** Refresh the wallet list */
4916
+ refresh: () => Promise<void>;
4917
+ /** Error from last operation */
4918
+ error: string | null;
4919
+ /** Clear error */
4920
+ clearError: () => void;
4921
+ }
4922
+
4627
4923
  /**
4628
4924
  * Server-managed WebAuthn (passkey) authentication + registration.
4629
4925
  *