@cedros/login-react 0.0.40 → 0.0.42

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 (137) hide show
  1. package/dist/{AuthenticationSettings-BF_7Ea6Z.js → AuthenticationSettings-CheE3j7w.js} +1 -1
  2. package/dist/{AuthenticationSettings-BF_7Ea6Z.js.map → AuthenticationSettings-CheE3j7w.js.map} +1 -1
  3. package/dist/{AuthenticationSettings-Dk1LX0CK.cjs → AuthenticationSettings-Dl41GbJL.cjs} +1 -1
  4. package/dist/{AuthenticationSettings-Dk1LX0CK.cjs.map → AuthenticationSettings-Dl41GbJL.cjs.map} +1 -1
  5. package/dist/{AuthenticationSettings-DUXpyiJ5.js → AuthenticationSettings-DwSxgjbH.js} +1 -1
  6. package/dist/{AuthenticationSettings-DUXpyiJ5.js.map → AuthenticationSettings-DwSxgjbH.js.map} +1 -1
  7. package/dist/{AuthenticationSettings-BMDrCVSf.cjs → AuthenticationSettings-JxHsBst9.cjs} +1 -1
  8. package/dist/{AuthenticationSettings-BMDrCVSf.cjs.map → AuthenticationSettings-JxHsBst9.cjs.map} +1 -1
  9. package/dist/AutosaveStatus-BMXjH1XN.cjs +1 -0
  10. package/dist/AutosaveStatus-BMXjH1XN.cjs.map +1 -0
  11. package/dist/{AutosaveStatus-CSZsp6w7.js → AutosaveStatus-DNuCl59W.js} +798 -319
  12. package/dist/AutosaveStatus-DNuCl59W.js.map +1 -0
  13. package/dist/{CreditSystemSettings-CLImarX-.cjs → CreditSystemSettings-BVgl6uUg.cjs} +1 -1
  14. package/dist/{CreditSystemSettings-CLImarX-.cjs.map → CreditSystemSettings-BVgl6uUg.cjs.map} +1 -1
  15. package/dist/{CreditSystemSettings-Buu7Y-7I.js → CreditSystemSettings-C-ksysSx.js} +12 -7
  16. package/dist/CreditSystemSettings-C-ksysSx.js.map +1 -0
  17. package/dist/{CreditSystemSettings-Cj21_Ug8.js → CreditSystemSettings-HSdF2_CY.js} +1 -1
  18. package/dist/{CreditSystemSettings-Cj21_Ug8.js.map → CreditSystemSettings-HSdF2_CY.js.map} +1 -1
  19. package/dist/CreditSystemSettings-LvA8rb17.cjs +1 -0
  20. package/dist/CreditSystemSettings-LvA8rb17.cjs.map +1 -0
  21. package/dist/EmailRegisterForm-p2X5QP58.js +750 -0
  22. package/dist/EmailRegisterForm-p2X5QP58.js.map +1 -0
  23. package/dist/EmailRegisterForm-xFb6MaVA.cjs +1 -0
  24. package/dist/EmailRegisterForm-xFb6MaVA.cjs.map +1 -0
  25. package/dist/{EmailSettings-CmxxnrA9.js → EmailSettings-Cy1cuVUq.js} +1 -1
  26. package/dist/{EmailSettings-CmxxnrA9.js.map → EmailSettings-Cy1cuVUq.js.map} +1 -1
  27. package/dist/EmailSettings-DC_zT4nI.cjs +1 -0
  28. package/dist/EmailSettings-DC_zT4nI.cjs.map +1 -0
  29. package/dist/{EmailSettings-9sdEAONl.cjs → EmailSettings-QBMzpbxv.cjs} +1 -1
  30. package/dist/{EmailSettings-9sdEAONl.cjs.map → EmailSettings-QBMzpbxv.cjs.map} +1 -1
  31. package/dist/EmailSettings-hIhJzux0.js +86 -0
  32. package/dist/EmailSettings-hIhJzux0.js.map +1 -0
  33. package/dist/{EmbeddedWalletSettings-DGq-kXbw.cjs → EmbeddedWalletSettings-4qC9KBwh.cjs} +1 -1
  34. package/dist/{EmbeddedWalletSettings-DGq-kXbw.cjs.map → EmbeddedWalletSettings-4qC9KBwh.cjs.map} +1 -1
  35. package/dist/{EmbeddedWalletSettings-BuLN_Uqc.cjs → EmbeddedWalletSettings-C81QQMWz.cjs} +1 -1
  36. package/dist/{EmbeddedWalletSettings-BuLN_Uqc.cjs.map → EmbeddedWalletSettings-C81QQMWz.cjs.map} +1 -1
  37. package/dist/{EmbeddedWalletSettings-CHkkCjyR.js → EmbeddedWalletSettings-CvvTnRvt.js} +1 -1
  38. package/dist/{EmbeddedWalletSettings-CHkkCjyR.js.map → EmbeddedWalletSettings-CvvTnRvt.js.map} +1 -1
  39. package/dist/{EmbeddedWalletSettings-M-D5N0eY.js → EmbeddedWalletSettings-Cwiug0vR.js} +1 -1
  40. package/dist/{EmbeddedWalletSettings-M-D5N0eY.js.map → EmbeddedWalletSettings-Cwiug0vR.js.map} +1 -1
  41. package/dist/GoogleLoginButton-2zNTIKMm.cjs +1 -0
  42. package/dist/GoogleLoginButton-2zNTIKMm.cjs.map +1 -0
  43. package/dist/{GoogleLoginButton-qf4A_A3G.js → GoogleLoginButton-C1WNu7W3.js} +41 -40
  44. package/dist/GoogleLoginButton-C1WNu7W3.js.map +1 -0
  45. package/dist/LoadingSpinner-6vml-zwr.js.map +1 -1
  46. package/dist/LoadingSpinner-d6sSxgQN.cjs.map +1 -1
  47. package/dist/{PermissionsSection-DNzOL1xW.js → PermissionsSection-BDDiEfho.js} +69 -61
  48. package/dist/{PermissionsSection-DNzOL1xW.js.map → PermissionsSection-BDDiEfho.js.map} +1 -1
  49. package/dist/PermissionsSection-CSB_Ikj9.cjs +1 -0
  50. package/dist/{PermissionsSection-DEMVp7X3.cjs.map → PermissionsSection-CSB_Ikj9.cjs.map} +1 -1
  51. package/dist/{ServerSettings-CMmH5pZv.cjs → ServerSettings-BV0SipW1.cjs} +1 -1
  52. package/dist/{ServerSettings-CMmH5pZv.cjs.map → ServerSettings-BV0SipW1.cjs.map} +1 -1
  53. package/dist/{ServerSettings-DfimU7ay.cjs → ServerSettings-Bf7gFE8r.cjs} +1 -1
  54. package/dist/{ServerSettings-DfimU7ay.cjs.map → ServerSettings-Bf7gFE8r.cjs.map} +1 -1
  55. package/dist/{ServerSettings-qxi8aZO7.js → ServerSettings-DPqHtsgV.js} +1 -1
  56. package/dist/{ServerSettings-qxi8aZO7.js.map → ServerSettings-DPqHtsgV.js.map} +1 -1
  57. package/dist/{ServerSettings-DQemMrNv.js → ServerSettings-Sfr0CG6K.js} +1 -1
  58. package/dist/{ServerSettings-DQemMrNv.js.map → ServerSettings-Sfr0CG6K.js.map} +1 -1
  59. package/dist/SolanaLoginButton-CqdzSSeJ.cjs +1 -0
  60. package/dist/SolanaLoginButton-CqdzSSeJ.cjs.map +1 -0
  61. package/dist/{SolanaLoginButton-B04dib6X.js → SolanaLoginButton-CyeX35eU.js} +41 -40
  62. package/dist/SolanaLoginButton-CyeX35eU.js.map +1 -0
  63. package/dist/{TeamSection-CoMXyFtz.js → TeamSection-BhsBEckR.js} +1 -1
  64. package/dist/{TeamSection-CoMXyFtz.js.map → TeamSection-BhsBEckR.js.map} +1 -1
  65. package/dist/{TeamSection-DopbZClq.cjs → TeamSection-DLxtRmta.cjs} +1 -1
  66. package/dist/{TeamSection-DopbZClq.cjs.map → TeamSection-DLxtRmta.cjs.map} +1 -1
  67. package/dist/{UsersSection-C7aRNkK2.cjs → UsersSection-BEKfbhQ4.cjs} +1 -1
  68. package/dist/{UsersSection-C7aRNkK2.cjs.map → UsersSection-BEKfbhQ4.cjs.map} +1 -1
  69. package/dist/{UsersSection--PAE1XRh.js → UsersSection-DbGkmxty.js} +1 -1
  70. package/dist/{UsersSection--PAE1XRh.js.map → UsersSection-DbGkmxty.js.map} +1 -1
  71. package/dist/{WebhookSettings-B6Y3Tnjv.cjs → WebhookSettings-BPCKv5Or.cjs} +1 -1
  72. package/dist/{WebhookSettings-B6Y3Tnjv.cjs.map → WebhookSettings-BPCKv5Or.cjs.map} +1 -1
  73. package/dist/{WebhookSettings-8QAqvkkO.js → WebhookSettings-CMROMCFT.js} +1 -1
  74. package/dist/{WebhookSettings-8QAqvkkO.js.map → WebhookSettings-CMROMCFT.js.map} +1 -1
  75. package/dist/{WebhookSettings-0sgWRI3U.cjs → WebhookSettings-Cj-iELGa.cjs} +1 -1
  76. package/dist/{WebhookSettings-0sgWRI3U.cjs.map → WebhookSettings-Cj-iELGa.cjs.map} +1 -1
  77. package/dist/{WebhookSettings-B8hAwhZ2.js → WebhookSettings-D4mKAWAg.js} +1 -1
  78. package/dist/{WebhookSettings-B8hAwhZ2.js.map → WebhookSettings-D4mKAWAg.js.map} +1 -1
  79. package/dist/admin-only.cjs +1 -1
  80. package/dist/admin-only.js +1 -1
  81. package/dist/email-only.cjs +1 -1
  82. package/dist/email-only.d.ts +7 -1
  83. package/dist/email-only.js +2 -2
  84. package/dist/google-only.cjs +1 -1
  85. package/dist/google-only.d.ts +6 -0
  86. package/dist/google-only.js +2 -2
  87. package/dist/index.cjs +13 -13
  88. package/dist/index.cjs.map +1 -1
  89. package/dist/index.d.ts +414 -4
  90. package/dist/index.js +6070 -4807
  91. package/dist/index.js.map +1 -1
  92. package/dist/login-react.css +1 -1
  93. package/dist/plugin-BHGg7ius.cjs +1 -0
  94. package/dist/plugin-BHGg7ius.cjs.map +1 -0
  95. package/dist/{plugin-C_NDZ2-D.js → plugin-CK2d7aP5.js} +3 -2
  96. package/dist/plugin-CK2d7aP5.js.map +1 -0
  97. package/dist/solana-only.cjs +1 -1
  98. package/dist/solana-only.d.ts +6 -0
  99. package/dist/solana-only.js +2 -2
  100. package/dist/useAuth-B1yS_YiD.cjs +1 -0
  101. package/dist/{useAuth-U5CYsHEU.cjs.map → useAuth-B1yS_YiD.cjs.map} +1 -1
  102. package/dist/{useAuth-C-Vw-ggy.js → useAuth-l-itM5am.js} +440 -433
  103. package/dist/{useAuth-C-Vw-ggy.js.map → useAuth-l-itM5am.js.map} +1 -1
  104. package/dist/useUsersStatsSummary-9HQDKBU5.js +1879 -0
  105. package/dist/useUsersStatsSummary-9HQDKBU5.js.map +1 -0
  106. package/dist/useUsersStatsSummary-DiRC8sGs.cjs +1 -0
  107. package/dist/useUsersStatsSummary-DiRC8sGs.cjs.map +1 -0
  108. package/package.json +1 -1
  109. package/dist/AutosaveStatus-BKsCIvPj.cjs +0 -1
  110. package/dist/AutosaveStatus-BKsCIvPj.cjs.map +0 -1
  111. package/dist/AutosaveStatus-CSZsp6w7.js.map +0 -1
  112. package/dist/CreditSystemSettings-Buu7Y-7I.js.map +0 -1
  113. package/dist/CreditSystemSettings-C2HkyMXy.cjs +0 -1
  114. package/dist/CreditSystemSettings-C2HkyMXy.cjs.map +0 -1
  115. package/dist/EmailRegisterForm-CNjYrqU6.cjs +0 -1
  116. package/dist/EmailRegisterForm-CNjYrqU6.cjs.map +0 -1
  117. package/dist/EmailRegisterForm-D2VaJouj.js +0 -750
  118. package/dist/EmailRegisterForm-D2VaJouj.js.map +0 -1
  119. package/dist/EmailSettings-DRfOF0Sf.js +0 -78
  120. package/dist/EmailSettings-DRfOF0Sf.js.map +0 -1
  121. package/dist/EmailSettings-eLlzzI5D.cjs +0 -1
  122. package/dist/EmailSettings-eLlzzI5D.cjs.map +0 -1
  123. package/dist/GoogleLoginButton-JtRViYWS.cjs +0 -1
  124. package/dist/GoogleLoginButton-JtRViYWS.cjs.map +0 -1
  125. package/dist/GoogleLoginButton-qf4A_A3G.js.map +0 -1
  126. package/dist/PermissionsSection-DEMVp7X3.cjs +0 -1
  127. package/dist/SolanaLoginButton-B04dib6X.js.map +0 -1
  128. package/dist/SolanaLoginButton-nSJHVFpZ.cjs +0 -1
  129. package/dist/SolanaLoginButton-nSJHVFpZ.cjs.map +0 -1
  130. package/dist/plugin-CUxpAjL-.cjs +0 -1
  131. package/dist/plugin-CUxpAjL-.cjs.map +0 -1
  132. package/dist/plugin-C_NDZ2-D.js.map +0 -1
  133. package/dist/useAuth-U5CYsHEU.cjs +0 -1
  134. package/dist/useUsersStatsSummary-5DJwzntC.js +0 -1246
  135. package/dist/useUsersStatsSummary-5DJwzntC.js.map +0 -1
  136. package/dist/useUsersStatsSummary-DgKaUIfs.cjs +0 -1
  137. package/dist/useUsersStatsSummary-DgKaUIfs.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -37,12 +37,127 @@ export declare interface AccountSettingsProps extends ProfileTabProps, LinkedAcc
37
37
 
38
38
  declare type AccountTab = 'profile' | 'security' | 'linked';
39
39
 
40
+ /**
41
+ * Banner prompting users to complete accredited investor verification.
42
+ *
43
+ * Returns null when status is "approved". All other statuses render a banner
44
+ * with an optional action button that calls `onStartVerification`.
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * const [showWizard, setShowWizard] = useState(false);
49
+ * const { status } = useAccreditation();
50
+ * <AccreditationBanner status={status ?? 'none'} onStartVerification={() => setShowWizard(true)} />
51
+ * ```
52
+ */
53
+ export declare function AccreditationBanner({ status, onStartVerification, className, }: AccreditationBannerProps): JSX.Element | null;
54
+
55
+ export declare interface AccreditationBannerProps {
56
+ /** Current accreditation status */
57
+ status: string;
58
+ /** Called when the user clicks the verification action button */
59
+ onStartVerification?: () => void;
60
+ /** Additional CSS class */
61
+ className?: string;
62
+ }
63
+
64
+ /**
65
+ * A document uploaded for an accreditation submission.
66
+ */
67
+ export declare interface AccreditationDocumentItem {
68
+ id: string;
69
+ documentType: string;
70
+ originalFilename?: string;
71
+ contentType?: string;
72
+ fileSizeBytes?: number;
73
+ uploadedAt: string;
74
+ }
75
+
76
+ /**
77
+ * Accredited investor verification types.
78
+ *
79
+ * These mirror the server-side accreditation module types.
80
+ */
81
+ /** Verification method used by the user to prove accredited investor status. */
82
+ export declare type AccreditationMethod = 'income' | 'net_worth' | 'credential' | 'third_party_letter' | 'insider' | 'investment_threshold';
83
+
84
+ /**
85
+ * Response for GET /admin/accreditation/pending
86
+ */
87
+ export declare interface AccreditationPendingListResponse {
88
+ items: AccreditationSubmissionItem[];
89
+ total: number;
90
+ }
91
+
92
+ /** Overall accreditation status for a user. */
93
+ export declare type AccreditationStatus = 'none' | 'pending' | 'approved' | 'rejected' | 'expired';
94
+
95
+ /**
96
+ * Response for GET /accreditation/status
97
+ *
98
+ * @returns status - current accreditation status
99
+ * @returns enforcementMode - server enforcement setting
100
+ */
101
+ export declare interface AccreditationStatusResponse {
102
+ status: AccreditationStatus;
103
+ verifiedAt?: string;
104
+ expiresAt?: string;
105
+ enforcementMode: string;
106
+ }
107
+
108
+ /**
109
+ * A single accreditation submission (user or admin view).
110
+ */
111
+ export declare interface AccreditationSubmissionItem {
112
+ id: string;
113
+ method: AccreditationMethod;
114
+ status: string;
115
+ incomeType?: string;
116
+ statedAmountUsd?: number;
117
+ crdNumber?: string;
118
+ licenseType?: string;
119
+ investmentCommitmentUsd?: number;
120
+ entityType?: string;
121
+ userStatement?: string;
122
+ reviewerNotes?: string;
123
+ rejectionReason?: string;
124
+ expiresAt?: string;
125
+ createdAt: string;
126
+ reviewedAt?: string;
127
+ }
128
+
129
+ /**
130
+ * Multi-step accredited investor verification wizard.
131
+ *
132
+ * Step 1 — choose method, Step 2 — fill details + upload documents,
133
+ * Step 3 — review and submit. On submit, calls `submitVerification` then
134
+ * uploads all staged files, then calls `onComplete(submissionId)`.
135
+ */
136
+ export declare function AccreditationWizard({ onComplete, onCancel, className }: AccreditationWizardProps): JSX.Element;
137
+
138
+ export declare interface AccreditationWizardProps {
139
+ /** Called after successful submission with the new submissionId */
140
+ onComplete?: (submissionId: string) => void;
141
+ /** Called when user cancels or navigates back from step 1 */
142
+ onCancel?: () => void;
143
+ /** Additional CSS class */
144
+ className?: string;
145
+ }
146
+
40
147
  /** Request to acknowledge receipt of recovery phrase */
41
148
  export declare interface AcknowledgeRecoveryRequest {
42
149
  /** Confirmation that user has saved the recovery phrase */
43
150
  confirmed: boolean;
44
151
  }
45
152
 
153
+ /**
154
+ * Admin-level detail view of a single submission, including documents.
155
+ */
156
+ export declare interface AdminAccreditationSubmissionDetail extends AccreditationSubmissionItem {
157
+ userId: string;
158
+ documents: AccreditationDocumentItem[];
159
+ }
160
+
46
161
  /**
47
162
  * Individual chat message from cedros-pay
48
163
  */
@@ -285,6 +400,37 @@ export declare interface AdminPrivacyPeriodDepositsProps {
285
400
  onItemClick?: (item: AdminDepositItem) => void;
286
401
  }
287
402
 
403
+ /**
404
+ * Admin UI for managing direct referral payouts.
405
+ *
406
+ * Inputs: none beyond className.
407
+ * Outputs: renders tabbed payout management UI.
408
+ * Errors: displayed inline with retry options.
409
+ */
410
+ export declare function AdminReferralPayouts({ className }: AdminReferralPayoutsProps): JSX.Element;
411
+
412
+ /**
413
+ * Admin referral payouts management component
414
+ *
415
+ * Tab 1: Summary — grouped-by-referrer view with Process All / Retry Failed
416
+ * Tab 2: All Payouts — paginated individual list with per-row actions
417
+ *
418
+ * Requires system admin privileges.
419
+ */
420
+ export declare interface AdminReferralPayoutsProps {
421
+ className?: string;
422
+ }
423
+
424
+ /**
425
+ * Response for GET /admin/users/:user_id/referrals
426
+ */
427
+ declare interface AdminReferredUsersResponse {
428
+ users: ReferredUserItem[];
429
+ total: number;
430
+ limit: number;
431
+ offset: number;
432
+ }
433
+
288
434
  /**
289
435
  * Section configuration for sidebar navigation.
290
436
  *
@@ -377,6 +523,38 @@ export declare interface AdminUser {
377
523
  lastLoginAt?: string;
378
524
  /** Credit balance in lamports (if credit system is enabled) */
379
525
  balanceLamports?: number;
526
+ /** User's referral code */
527
+ referralCode?: string;
528
+ /** ID of the user who referred this user */
529
+ referredBy?: string;
530
+ /** Number of users this user has referred */
531
+ referralCount?: number;
532
+ /** Wallet address configured for direct referral payouts */
533
+ payoutWalletAddress?: string;
534
+ /** KYC verification status: none, pending, verified, failed, expired, canceled */
535
+ kycStatus?: string;
536
+ /** When KYC was verified (ISO 8601) */
537
+ kycVerifiedAt?: string;
538
+ /** When KYC verification expires (ISO 8601) */
539
+ kycExpiresAt?: string;
540
+ /** Accredited investor verification status: none, pending, approved, rejected, expired */
541
+ accreditationStatus?: string;
542
+ /** When accreditation was verified (ISO 8601) */
543
+ accreditationVerifiedAt?: string;
544
+ /** When accreditation expires (ISO 8601) */
545
+ accreditationExpiresAt?: string;
546
+ }
547
+
548
+ /**
549
+ * Response for GET /admin/users/:userId/accreditation
550
+ */
551
+ export declare interface AdminUserAccreditationResponse {
552
+ userId: string;
553
+ status: string;
554
+ verifiedAt?: string;
555
+ expiresAt?: string;
556
+ submissions: AccreditationSubmissionItem[];
557
+ totalSubmissions: number;
380
558
  }
381
559
 
382
560
  /**
@@ -417,6 +595,33 @@ declare interface AdminUserCreditStats {
417
595
  spendCount: number;
418
596
  }
419
597
 
598
+ /**
599
+ * Response for GET /admin/users/:user_id/kyc
600
+ */
601
+ export declare interface AdminUserKycResponse {
602
+ userId: string;
603
+ status: string;
604
+ verifiedAt?: string;
605
+ expiresAt?: string;
606
+ sessions: AdminUserKycSession[];
607
+ totalSessions: number;
608
+ }
609
+
610
+ /**
611
+ * A single KYC verification session for a user (admin view)
612
+ */
613
+ export declare interface AdminUserKycSession {
614
+ id: string;
615
+ provider: string;
616
+ providerSessionId: string;
617
+ status: string;
618
+ errorCode?: string;
619
+ errorReason?: string;
620
+ createdAt: string;
621
+ updatedAt: string;
622
+ completedAt?: string;
623
+ }
624
+
420
625
  /**
421
626
  * Admin user list display
422
627
  *
@@ -684,6 +889,10 @@ export declare interface AuthUser {
684
889
  updatedAt: string;
685
890
  /** When the user completed the one-time welcome flow */
686
891
  welcomeCompletedAt?: string;
892
+ /** User's unique referral code */
893
+ referralCode?: string;
894
+ /** Wallet address to receive direct referral payouts */
895
+ payoutWalletAddress?: string;
687
896
  }
688
897
 
689
898
  /** Multiple balances response */
@@ -829,6 +1038,8 @@ declare interface CedrosLoginContextValue extends AuthStateContextValue, AuthUIC
829
1038
  declare interface CedrosLoginInternalAPI {
830
1039
  handleLoginSuccess: (user: AuthUser, tokens?: TokenPair) => void;
831
1040
  getAccessToken: () => string | null;
1041
+ /** Get the referral code captured from the ?ref= URL parameter (if any) */
1042
+ getReferralCode: () => string | null;
832
1043
  }
833
1044
 
834
1045
  declare const cedrosLoginPlugin: AdminPlugin;
@@ -1150,7 +1361,7 @@ declare interface CustomTokenDefinition {
1150
1361
  * ```
1151
1362
  */
1152
1363
  /** Available dashboard sections */
1153
- export declare type DashboardSection = 'users' | 'team' | 'deposits' | 'withdrawals' | 'settings-wallet' | 'settings-auth' | 'settings-messaging' | 'settings-credits' | 'settings-server';
1364
+ export declare type DashboardSection = 'users' | 'team' | 'referrals' | 'deposits' | 'withdrawals' | 'settings-wallet' | 'settings-auth' | 'settings-messaging' | 'settings-credits' | 'settings-server' | 'settings-images';
1154
1365
 
1155
1366
  declare type DeepPartial<T> = {
1156
1367
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
@@ -1975,6 +2186,56 @@ export declare interface KdfParams {
1975
2186
  pCost: number;
1976
2187
  }
1977
2188
 
2189
+ /**
2190
+ * Banner prompting users to complete KYC identity verification.
2191
+ *
2192
+ * Shown when KYC enforcement is active and the user is not yet verified.
2193
+ * Clicking the button starts a Stripe Identity session and redirects the user.
2194
+ */
2195
+ export declare function KycBanner({ status, startVerification, className, }: KycBannerProps): JSX.Element | null;
2196
+
2197
+ export declare interface KycBannerProps {
2198
+ /** Current KYC status */
2199
+ status: string;
2200
+ /** Function that starts verification and returns redirect URL */
2201
+ startVerification: () => Promise<string>;
2202
+ /** Optional CSS class name */
2203
+ className?: string;
2204
+ }
2205
+
2206
+ /**
2207
+ * Post-KYC redirect landing component.
2208
+ *
2209
+ * Polls the KYC status every 3 seconds after Stripe redirects the user back.
2210
+ * Stops polling when status changes from "pending" to a final state, or after
2211
+ * 60 seconds.
2212
+ *
2213
+ * @example
2214
+ * ```tsx
2215
+ * const { fetchStatus } = useKyc();
2216
+ * <KycCallback fetchStatus={fetchStatus} onComplete={(status) => navigate('/dashboard')} />
2217
+ * ```
2218
+ */
2219
+ export declare function KycCallback({ fetchStatus, onComplete, className }: KycCallbackProps): JSX.Element;
2220
+
2221
+ export declare interface KycCallbackProps {
2222
+ /** Function that fetches KYC status — obtain from useKyc().fetchStatus */
2223
+ fetchStatus: () => Promise<{
2224
+ status: string;
2225
+ }>;
2226
+ /** Called when polling resolves to a non-pending status */
2227
+ onComplete?: (status: string) => void;
2228
+ /** Additional CSS classes */
2229
+ className?: string;
2230
+ }
2231
+
2232
+ declare interface KycStatusResponse {
2233
+ status: string;
2234
+ verifiedAt?: string;
2235
+ expiresAt?: string;
2236
+ enforcementMode: string;
2237
+ }
2238
+
1978
2239
  export declare function LinkedAccounts({ onLinkGoogle, onLinkApple, onAddPasskey, onLinkSolana, className, }: LinkedAccountsProps): JSX.Element;
1979
2240
 
1980
2241
  /**
@@ -2769,6 +3030,23 @@ export declare interface RecoveryState {
2769
3030
  /** Recovery flow state */
2770
3031
  declare type RecoveryStep = 'idle' | 'entering_phrase' | 'validating' | 'prompting_password' | 'registering_passkey' | 'encrypting' | 'uploading' | 'complete' | 'error';
2771
3032
 
3033
+ declare interface ReferralInfo {
3034
+ referralCode: string;
3035
+ referralCount: number;
3036
+ directPayoutEnabled: boolean;
3037
+ }
3038
+
3039
+ /**
3040
+ * A single user entry in the referral network response
3041
+ */
3042
+ declare interface ReferredUserItem {
3043
+ id: string;
3044
+ email?: string;
3045
+ name?: string;
3046
+ createdAt: string;
3047
+ lastLoginAt?: string;
3048
+ }
3049
+
2772
3050
  /**
2773
3051
  * Register Mobile Wallet Adapter as a wallet-standard wallet.
2774
3052
  *
@@ -3048,7 +3326,7 @@ export declare interface SettingMeta {
3048
3326
  /** Maximum allowed value */
3049
3327
  max?: number;
3050
3328
  /** Input type determines how the setting is rendered */
3051
- inputType: 'number' | 'duration' | 'percentage' | 'select' | 'text' | 'boolean' | 'secret' | 'tokenSymbolList' | 'tokenList';
3329
+ inputType: 'number' | 'duration' | 'percentage' | 'select' | 'text' | 'boolean' | 'secret' | 'readonlySecret' | 'tokenSymbolList' | 'tokenList';
3052
3330
  /** Preset values for quick selection (used with 'select' or as suggestions) */
3053
3331
  presets?: SettingPreset[];
3054
3332
  /** Value threshold that triggers a warning */
@@ -3743,6 +4021,8 @@ export declare interface UpdateProfileRequest {
3743
4021
  username?: string;
3744
4022
  /** User's profile picture URL */
3745
4023
  picture?: string;
4024
+ /** Solana wallet address to receive direct referral payouts (32–44 chars) */
4025
+ payoutWalletAddress?: string;
3746
4026
  }
3747
4027
 
3748
4028
  /**
@@ -3784,6 +4064,65 @@ declare interface UpdateUserRequest {
3784
4064
  emailVerified?: boolean;
3785
4065
  }
3786
4066
 
4067
+ /**
4068
+ * Hook for accredited investor verification.
4069
+ *
4070
+ * Follows the same pattern as useKyc.
4071
+ */
4072
+ export declare function useAccreditation(): UseAccreditationReturn;
4073
+
4074
+ /**
4075
+ * Return type for the useAccreditation hook.
4076
+ *
4077
+ * @example
4078
+ * ```tsx
4079
+ * const { status, isRequired, fetchStatus, submitVerification } = useAccreditation();
4080
+ *
4081
+ * useEffect(() => { fetchStatus(); }, [fetchStatus]);
4082
+ * ```
4083
+ */
4084
+ export declare interface UseAccreditationReturn {
4085
+ /** Current accreditation status: none, pending, approved, rejected, expired */
4086
+ status: AccreditationStatus | null;
4087
+ /** When accreditation was verified (ISO 8601) */
4088
+ verifiedAt: string | null;
4089
+ /** When accreditation expires (ISO 8601) */
4090
+ expiresAt: string | null;
4091
+ /** Whether accreditation enforcement is active (mode is not "none") */
4092
+ isRequired: boolean;
4093
+ /** Current enforcement mode from server */
4094
+ enforcementMode: string | null;
4095
+ /** Fetch the current user's accreditation status */
4096
+ fetchStatus: () => Promise<AccreditationStatusResponse>;
4097
+ /**
4098
+ * Submit a new accreditation verification request.
4099
+ *
4100
+ * @param method - verification method
4101
+ * @param data - method-specific data (income amount, CRD number, etc.)
4102
+ * @returns submissionId of the created submission
4103
+ */
4104
+ submitVerification: (method: AccreditationMethod, data: Record<string, unknown>) => Promise<{
4105
+ submissionId: string;
4106
+ }>;
4107
+ /**
4108
+ * Upload a supporting document for a submission.
4109
+ *
4110
+ * @param submissionId - ID of the submission to attach the document to
4111
+ * @param file - File object to upload
4112
+ * @param documentType - document category (e.g. "tax_return", "letter")
4113
+ * @returns documentId of the created document record
4114
+ */
4115
+ uploadDocument: (submissionId: string, file: File, documentType: string) => Promise<{
4116
+ documentId: string;
4117
+ }>;
4118
+ /** List this user's accreditation submissions */
4119
+ listSubmissions: () => Promise<AccreditationSubmissionItem[]>;
4120
+ /** Whether a request is in progress */
4121
+ isLoading: boolean;
4122
+ /** Error from the last operation */
4123
+ error: Error | null;
4124
+ }
4125
+
3787
4126
  /**
3788
4127
  * Hook for admin Privacy Cash deposit operations
3789
4128
  *
@@ -3878,6 +4217,7 @@ export declare interface UseAdminUsersReturn {
3878
4217
  getUserCredits: (userId: string, params?: ListUsersParams) => Promise<AdminUserCreditsResponse>;
3879
4218
  getUserWithdrawalHistory: (userId: string, params?: ListUsersParams) => Promise<AdminUserWithdrawalHistoryResponse>;
3880
4219
  getUserChats: (userId: string, params?: ListUsersParams) => Promise<AdminUserChatsResponse>;
4220
+ getUserReferrals: (userId: string, params?: ListUsersParams) => Promise<AdminReferredUsersResponse>;
3881
4221
  getStats: () => Promise<AdminUserStatsResponse>;
3882
4222
  refresh: () => Promise<void>;
3883
4223
  clearError: () => void;
@@ -4171,7 +4511,7 @@ export declare function useEmailAuth(): UseEmailAuthReturn;
4171
4511
  export declare interface UseEmailAuthReturn {
4172
4512
  /** Login - may return mfaRequired if 2FA is enabled */
4173
4513
  login: (email: string, password: string) => Promise<LoginResult>;
4174
- register: (email: string, password: string, name?: string) => Promise<AuthResponse>;
4514
+ register: (email: string, password: string, name?: string, referral?: string) => Promise<AuthResponse>;
4175
4515
  isLoading: boolean;
4176
4516
  error: AuthError | null;
4177
4517
  clearError: () => void;
@@ -4325,6 +4665,47 @@ export declare interface UseInvitesReturn {
4325
4665
  acceptInvite: (token: string) => Promise<AcceptInviteResponse>;
4326
4666
  }
4327
4667
 
4668
+ /**
4669
+ * Hook for KYC identity verification.
4670
+ *
4671
+ * @example
4672
+ * ```tsx
4673
+ * const { status, isRequired, startVerification, fetchStatus, isLoading } = useKyc();
4674
+ *
4675
+ * useEffect(() => { fetchStatus(); }, [fetchStatus]);
4676
+ *
4677
+ * if (isRequired && status !== 'verified') {
4678
+ * const url = await startVerification();
4679
+ * window.location.href = url;
4680
+ * }
4681
+ * ```
4682
+ */
4683
+ export declare function useKyc(): UseKycReturn;
4684
+
4685
+ /**
4686
+ * Return type for the useKyc hook
4687
+ */
4688
+ export declare interface UseKycReturn {
4689
+ /** Current KYC status: none, pending, verified, failed, expired, canceled */
4690
+ status: string | null;
4691
+ /** When verification was completed (ISO 8601) */
4692
+ verifiedAt: string | null;
4693
+ /** When verification expires (ISO 8601) */
4694
+ expiresAt: string | null;
4695
+ /** Whether KYC enforcement is active (mode is not "none") */
4696
+ isRequired: boolean;
4697
+ /** Current enforcement mode from server */
4698
+ enforcementMode: string | null;
4699
+ /** Fetch the current user's KYC status */
4700
+ fetchStatus: () => Promise<KycStatusResponse>;
4701
+ /** Start a new verification session (returns redirect URL) */
4702
+ startVerification: () => Promise<string>;
4703
+ /** Whether a request is in progress */
4704
+ isLoading: boolean;
4705
+ /** Error from the last operation */
4706
+ error: Error | null;
4707
+ }
4708
+
4328
4709
  /**
4329
4710
  * Hook to access current locale
4330
4711
  */
@@ -4640,6 +5021,35 @@ export declare interface UseProfileReturn {
4640
5021
  clearError: () => void;
4641
5022
  }
4642
5023
 
5024
+ /**
5025
+ * Hook for referral code management.
5026
+ *
5027
+ * @example
5028
+ * ```tsx
5029
+ * const { getReferral, regenerateCode, isLoading } = useReferral();
5030
+ *
5031
+ * const info = await getReferral();
5032
+ * console.log(info.referralCode, info.referralCount);
5033
+ *
5034
+ * const newCode = await regenerateCode();
5035
+ * ```
5036
+ */
5037
+ export declare function useReferral(): UseReferralReturn;
5038
+
5039
+ /**
5040
+ * Return type for the useReferral hook
5041
+ */
5042
+ export declare interface UseReferralReturn {
5043
+ /** Fetch the current user's referral code and count */
5044
+ getReferral: () => Promise<ReferralInfo>;
5045
+ /** Regenerate the current user's referral code */
5046
+ regenerateCode: () => Promise<string>;
5047
+ /** Whether a request is in progress */
5048
+ isLoading: boolean;
5049
+ /** Error from the last operation */
5050
+ error: Error | null;
5051
+ }
5052
+
4643
5053
  /**
4644
5054
  * User profile settings panel.
4645
5055
  *
@@ -4666,7 +5076,7 @@ export declare function UserProfileSettings({ onPasswordChange, onClose, classNa
4666
5076
  * Allows users to:
4667
5077
  * - View their profile information
4668
5078
  * - Change their password
4669
- * - (Future) Update name and picture when backend supports it
5079
+ * - Upload a profile picture (avatar)
4670
5080
  */
4671
5081
  export declare interface UserProfileSettingsProps {
4672
5082
  /** Called when password is changed successfully */