@cedros/login-react 0.0.11 → 0.0.13

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 (428) hide show
  1. package/README.md +68 -0
  2. package/dist/AdminDepositList-Cx0xRwES.js +305 -0
  3. package/dist/AdminDepositList-Cx0xRwES.js.map +1 -0
  4. package/dist/AdminDepositList-UEcyRZkA.cjs +1 -0
  5. package/dist/AdminDepositList-UEcyRZkA.cjs.map +1 -0
  6. package/dist/AdminUserDetail-BzEIdNJh.cjs +1 -0
  7. package/dist/AdminUserDetail-BzEIdNJh.cjs.map +1 -0
  8. package/dist/AdminUserDetail-DHFDzY8B.js +1195 -0
  9. package/dist/AdminUserDetail-DHFDzY8B.js.map +1 -0
  10. package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs +1 -0
  11. package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs.map +1 -0
  12. package/dist/AdminWithdrawalHistory-BGjfrIe3.js +904 -0
  13. package/dist/AdminWithdrawalHistory-BGjfrIe3.js.map +1 -0
  14. package/dist/AuthenticationSettings-5Vi7Ib_A.cjs +1 -0
  15. package/dist/AuthenticationSettings-5Vi7Ib_A.cjs.map +1 -0
  16. package/dist/AuthenticationSettings-BPAh1my6.cjs +1 -0
  17. package/dist/AuthenticationSettings-BPAh1my6.cjs.map +1 -0
  18. package/dist/AuthenticationSettings-CJg8CJY9.js +9 -0
  19. package/dist/AuthenticationSettings-CJg8CJY9.js.map +1 -0
  20. package/dist/AuthenticationSettings-CR_i6TTS.js +495 -0
  21. package/dist/AuthenticationSettings-CR_i6TTS.js.map +1 -0
  22. package/dist/AutosaveStatus-CYkC2aI_.cjs +1 -0
  23. package/dist/AutosaveStatus-CYkC2aI_.cjs.map +1 -0
  24. package/dist/AutosaveStatus-N4uNS6-2.js +1497 -0
  25. package/dist/AutosaveStatus-N4uNS6-2.js.map +1 -0
  26. package/dist/CreditSystemSettings-BnAOK_tT.cjs +1 -0
  27. package/dist/CreditSystemSettings-BnAOK_tT.cjs.map +1 -0
  28. package/dist/CreditSystemSettings-CIf_SfJq.js +210 -0
  29. package/dist/CreditSystemSettings-CIf_SfJq.js.map +1 -0
  30. package/dist/CreditSystemSettings-CePYGgev.js +9 -0
  31. package/dist/CreditSystemSettings-CePYGgev.js.map +1 -0
  32. package/dist/CreditSystemSettings-Ck5WIMp3.cjs +1 -0
  33. package/dist/CreditSystemSettings-Ck5WIMp3.cjs.map +1 -0
  34. package/dist/{DepositsSection-BH5K162Q.js → DepositsSection-DA89uR9A.js} +5 -5
  35. package/dist/{DepositsSection-BH5K162Q.js.map → DepositsSection-DA89uR9A.js.map} +1 -1
  36. package/dist/DepositsSection-i6XdhLNs.cjs +1 -0
  37. package/dist/{DepositsSection-DpRn0koq.cjs.map → DepositsSection-i6XdhLNs.cjs.map} +1 -1
  38. package/dist/EmailRegisterForm-BrDL3BZy.js +927 -0
  39. package/dist/EmailRegisterForm-BrDL3BZy.js.map +1 -0
  40. package/dist/EmailRegisterForm-CxktR-4J.cjs +1 -0
  41. package/dist/EmailRegisterForm-CxktR-4J.cjs.map +1 -0
  42. package/dist/EmailSettings-B8xwgd6_.cjs +1 -0
  43. package/dist/EmailSettings-B8xwgd6_.cjs.map +1 -0
  44. package/dist/{AuthenticationSettings-DlVILxY4.js → EmailSettings-Bna7Z53E.js} +3 -3
  45. package/dist/EmailSettings-Bna7Z53E.js.map +1 -0
  46. package/dist/EmailSettings-DZywTTRq.cjs +1 -0
  47. package/dist/EmailSettings-DZywTTRq.cjs.map +1 -0
  48. package/dist/EmailSettings-DbMDfVaM.js +17 -0
  49. package/dist/EmailSettings-DbMDfVaM.js.map +1 -0
  50. package/dist/{EmbeddedWalletSettings-Bff6raAT.js → EmbeddedWalletSettings-ANbhj3Lt.js} +3 -3
  51. package/dist/EmbeddedWalletSettings-ANbhj3Lt.js.map +1 -0
  52. package/dist/EmbeddedWalletSettings-BEztqO19.js +79 -0
  53. package/dist/EmbeddedWalletSettings-BEztqO19.js.map +1 -0
  54. package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs +1 -0
  55. package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs.map +1 -0
  56. package/dist/EmbeddedWalletSettings-DivEPn39.cjs +1 -0
  57. package/dist/EmbeddedWalletSettings-DivEPn39.cjs.map +1 -0
  58. package/dist/ErrorMessage-CHbYbVi2.cjs +1 -0
  59. package/dist/ErrorMessage-CHbYbVi2.cjs.map +1 -0
  60. package/dist/ErrorMessage-CcEK0pYO.js +64 -0
  61. package/dist/ErrorMessage-CcEK0pYO.js.map +1 -0
  62. package/dist/{GoogleLoginButton-BzHr545L.js → GoogleLoginButton-B3uRMJ_n.js} +4 -3
  63. package/dist/{GoogleLoginButton-BzHr545L.js.map → GoogleLoginButton-B3uRMJ_n.js.map} +1 -1
  64. package/dist/GoogleLoginButton-BydKswn4.cjs +1 -0
  65. package/dist/{GoogleLoginButton-DoAdOqb3.cjs.map → GoogleLoginButton-BydKswn4.cjs.map} +1 -1
  66. package/dist/LoadingSpinner-6vml-zwr.js +79 -0
  67. package/dist/LoadingSpinner-6vml-zwr.js.map +1 -0
  68. package/dist/LoadingSpinner-d6sSxgQN.cjs +1 -0
  69. package/dist/LoadingSpinner-d6sSxgQN.cjs.map +1 -0
  70. package/dist/PermissionsSection-BGaj_sI7.js +1026 -0
  71. package/dist/PermissionsSection-BGaj_sI7.js.map +1 -0
  72. package/dist/PermissionsSection-CKXXDfqi.cjs +1 -0
  73. package/dist/PermissionsSection-CKXXDfqi.cjs.map +1 -0
  74. package/dist/ServerSettings-B2RKhJtZ.js +84 -0
  75. package/dist/ServerSettings-B2RKhJtZ.js.map +1 -0
  76. package/dist/ServerSettings-BZXlm1BX.cjs +1 -0
  77. package/dist/ServerSettings-BZXlm1BX.cjs.map +1 -0
  78. package/dist/{ServerSettings-UIVR0R4l.js → ServerSettings-Bqm4-bt2.js} +3 -3
  79. package/dist/ServerSettings-Bqm4-bt2.js.map +1 -0
  80. package/dist/ServerSettings-DZUKo6By.cjs +1 -0
  81. package/dist/ServerSettings-DZUKo6By.cjs.map +1 -0
  82. package/dist/SettingsPageLayout-COSYLMu7.cjs +1 -0
  83. package/dist/SettingsPageLayout-COSYLMu7.cjs.map +1 -0
  84. package/dist/SettingsPageLayout-DpgNEkuu.js +50 -0
  85. package/dist/SettingsPageLayout-DpgNEkuu.js.map +1 -0
  86. package/dist/{SolanaLoginButton-C-CfZxAZ.js → SolanaLoginButton-C_u9OppS.js} +5 -4
  87. package/dist/{SolanaLoginButton-C-CfZxAZ.js.map → SolanaLoginButton-C_u9OppS.js.map} +1 -1
  88. package/dist/SolanaLoginButton-fAW7kRUu.cjs +1 -0
  89. package/dist/{SolanaLoginButton-CPzms0kf.cjs.map → SolanaLoginButton-fAW7kRUu.cjs.map} +1 -1
  90. package/dist/StatsBar-BX-hHtTq.js +66 -0
  91. package/dist/StatsBar-BX-hHtTq.js.map +1 -0
  92. package/dist/StatsBar-DTUZCwDD.cjs +1 -0
  93. package/dist/StatsBar-DTUZCwDD.cjs.map +1 -0
  94. package/dist/{TeamSection-DnJudC38.js → TeamSection-CvrCoa9D.js} +27 -26
  95. package/dist/TeamSection-CvrCoa9D.js.map +1 -0
  96. package/dist/TeamSection-DlUD5kp5.cjs +1 -0
  97. package/dist/TeamSection-DlUD5kp5.cjs.map +1 -0
  98. package/dist/UsersSection-C2U8Tb7V.cjs +1 -0
  99. package/dist/{UsersSection-Ce7xVKfp.cjs.map → UsersSection-C2U8Tb7V.cjs.map} +1 -1
  100. package/dist/{UsersSection-mOOjcUEv.js → UsersSection-Dbh9PTSA.js} +17 -15
  101. package/dist/{UsersSection-mOOjcUEv.js.map → UsersSection-Dbh9PTSA.js.map} +1 -1
  102. package/dist/WebhookSettings-BT5q6AZ8.js +17 -0
  103. package/dist/WebhookSettings-BT5q6AZ8.js.map +1 -0
  104. package/dist/WebhookSettings-BWl_wsvg.cjs +1 -0
  105. package/dist/WebhookSettings-BWl_wsvg.cjs.map +1 -0
  106. package/dist/WebhookSettings-DXNH5bal.cjs +1 -0
  107. package/dist/WebhookSettings-DXNH5bal.cjs.map +1 -0
  108. package/dist/{WebhookSettings-D0i0JhQD.js → WebhookSettings-bUg2u_p0.js} +4 -4
  109. package/dist/WebhookSettings-bUg2u_p0.js.map +1 -0
  110. package/dist/WithdrawalsSection-BL_LOUq8.cjs +1 -0
  111. package/dist/{WithdrawalsSection-igRQJfjj.cjs.map → WithdrawalsSection-BL_LOUq8.cjs.map} +1 -1
  112. package/dist/WithdrawalsSection-CN-lLnqX.js +20 -0
  113. package/dist/{WithdrawalsSection-Grebjjks.js.map → WithdrawalsSection-CN-lLnqX.js.map} +1 -1
  114. package/dist/admin-only.cjs +1 -0
  115. package/dist/admin-only.cjs.map +1 -0
  116. package/dist/{admin/types.d.ts → admin-only.d.ts} +228 -167
  117. package/dist/admin-only.js +8 -0
  118. package/dist/admin-only.js.map +1 -0
  119. package/dist/apiClient-B2JxVPlH.js +216 -0
  120. package/dist/apiClient-B2JxVPlH.js.map +1 -0
  121. package/dist/apiClient-CTTKhsYb.cjs +1 -0
  122. package/dist/apiClient-CTTKhsYb.cjs.map +1 -0
  123. package/dist/assets/argon2Worker-Bi5TuQvD.js.map +1 -1
  124. package/dist/email-only.cjs +1 -1
  125. package/dist/email-only.d.ts +634 -16
  126. package/dist/email-only.js +16 -13
  127. package/dist/email-only.js.map +1 -1
  128. package/dist/google-only.cjs +1 -1
  129. package/dist/google-only.d.ts +543 -13
  130. package/dist/google-only.js +11 -8
  131. package/dist/google-only.js.map +1 -1
  132. package/dist/index.cjs +2061 -1
  133. package/dist/index.cjs.map +1 -1
  134. package/dist/index.d.ts +5007 -144
  135. package/dist/index.js +13507 -116
  136. package/dist/index.js.map +1 -1
  137. package/dist/login-react.css +1 -1
  138. package/dist/plugin-5qRh-YhX.js +596 -0
  139. package/dist/plugin-5qRh-YhX.js.map +1 -0
  140. package/dist/plugin-BtYBW6JY.cjs +1 -0
  141. package/dist/plugin-BtYBW6JY.cjs.map +1 -0
  142. package/dist/sanitization-Bo_tn-L2.cjs +1 -0
  143. package/dist/sanitization-Bo_tn-L2.cjs.map +1 -0
  144. package/dist/sanitization-CQ-H1MSg.js +39 -0
  145. package/dist/sanitization-CQ-H1MSg.js.map +1 -0
  146. package/dist/shamir-AeLLfw0p.cjs +1 -0
  147. package/dist/shamir-AeLLfw0p.cjs.map +1 -0
  148. package/dist/{solanaKeypair-BlXol3nh.js → shamir-B0wConeK.js} +765 -757
  149. package/dist/shamir-B0wConeK.js.map +1 -0
  150. package/dist/silentWalletEnroll-B8pgdKZO.cjs +1 -0
  151. package/dist/silentWalletEnroll-B8pgdKZO.cjs.map +1 -0
  152. package/dist/silentWalletEnroll-DR2kPw7W.js +41 -0
  153. package/dist/silentWalletEnroll-DR2kPw7W.js.map +1 -0
  154. package/dist/solana-only.cjs +1 -1
  155. package/dist/solana-only.d.ts +594 -13
  156. package/dist/solana-only.js +12 -9
  157. package/dist/solana-only.js.map +1 -1
  158. package/dist/style.d.ts +1 -0
  159. package/dist/useAdminDeposits-BDY5KJ0-.js +151 -0
  160. package/dist/useAdminDeposits-BDY5KJ0-.js.map +1 -0
  161. package/dist/useAdminDeposits-Dvx3_UUE.cjs +1 -0
  162. package/dist/useAdminDeposits-Dvx3_UUE.cjs.map +1 -0
  163. package/dist/{ErrorMessage-DU2VBb85.js → useAuth-Bge6KaWN.js} +954 -1226
  164. package/dist/useAuth-Bge6KaWN.js.map +1 -0
  165. package/dist/useAuth-DhIDTLRd.cjs +1 -0
  166. package/dist/useAuth-DhIDTLRd.cjs.map +1 -0
  167. package/dist/useOrgs-Be3KH4ib.js +215 -0
  168. package/dist/useOrgs-Be3KH4ib.js.map +1 -0
  169. package/dist/useOrgs-CVbacmaQ.cjs +1 -0
  170. package/dist/useOrgs-CVbacmaQ.cjs.map +1 -0
  171. package/dist/useSystemSettings-D9Cr7ZTl.cjs +1 -0
  172. package/dist/useSystemSettings-D9Cr7ZTl.cjs.map +1 -0
  173. package/dist/useSystemSettings-DN5YqfNq.js +97 -0
  174. package/dist/useSystemSettings-DN5YqfNq.js.map +1 -0
  175. package/dist/{validation-BebL7hMF.js → validation-B8kMV3BL.js} +1 -1
  176. package/dist/{validation-BebL7hMF.js.map → validation-B8kMV3BL.js.map} +1 -1
  177. package/dist/{validation-BeXIfuHB.cjs → validation-BuGQrA-K.cjs} +1 -1
  178. package/dist/{validation-BeXIfuHB.cjs.map → validation-BuGQrA-K.cjs.map} +1 -1
  179. package/package.json +11 -1
  180. package/dist/AuthenticationSettings-D8oXHkM6.cjs +0 -1
  181. package/dist/AuthenticationSettings-D8oXHkM6.cjs.map +0 -1
  182. package/dist/AuthenticationSettings-DlVILxY4.js.map +0 -1
  183. package/dist/CreditSystemSettings-Bv6u9lTs.js +0 -9
  184. package/dist/CreditSystemSettings-Bv6u9lTs.js.map +0 -1
  185. package/dist/CreditSystemSettings-D45pwDZM.cjs +0 -1
  186. package/dist/CreditSystemSettings-D45pwDZM.cjs.map +0 -1
  187. package/dist/DepositsSection-DpRn0koq.cjs +0 -1
  188. package/dist/EmailRegisterForm-C0PStlj5.js +0 -961
  189. package/dist/EmailRegisterForm-C0PStlj5.js.map +0 -1
  190. package/dist/EmailRegisterForm-DaPLGws2.cjs +0 -1
  191. package/dist/EmailRegisterForm-DaPLGws2.cjs.map +0 -1
  192. package/dist/EmailSettings-DdjoMO_c.cjs +0 -1
  193. package/dist/EmailSettings-DdjoMO_c.cjs.map +0 -1
  194. package/dist/EmailSettings-khmiWqhx.js +0 -9
  195. package/dist/EmailSettings-khmiWqhx.js.map +0 -1
  196. package/dist/EmbeddedWalletSettings-Bff6raAT.js.map +0 -1
  197. package/dist/EmbeddedWalletSettings-C5qkJtAr.cjs +0 -1
  198. package/dist/EmbeddedWalletSettings-C5qkJtAr.cjs.map +0 -1
  199. package/dist/ErrorMessage-BXHiYibN.cjs +0 -1
  200. package/dist/ErrorMessage-BXHiYibN.cjs.map +0 -1
  201. package/dist/ErrorMessage-DU2VBb85.js.map +0 -1
  202. package/dist/GoogleLoginButton-DoAdOqb3.cjs +0 -1
  203. package/dist/ServerSettings-BpZhkxh6.cjs +0 -1
  204. package/dist/ServerSettings-BpZhkxh6.cjs.map +0 -1
  205. package/dist/ServerSettings-UIVR0R4l.js.map +0 -1
  206. package/dist/SolanaLoginButton-CPzms0kf.cjs +0 -1
  207. package/dist/TeamSection-BoGqQhD5.cjs +0 -1
  208. package/dist/TeamSection-BoGqQhD5.cjs.map +0 -1
  209. package/dist/TeamSection-DnJudC38.js.map +0 -1
  210. package/dist/UsersSection-Ce7xVKfp.cjs +0 -1
  211. package/dist/WebhookSettings-Cx-BxzNQ.cjs +0 -1
  212. package/dist/WebhookSettings-Cx-BxzNQ.cjs.map +0 -1
  213. package/dist/WebhookSettings-D0i0JhQD.js.map +0 -1
  214. package/dist/WithdrawalsSection-Grebjjks.js +0 -20
  215. package/dist/WithdrawalsSection-igRQJfjj.cjs +0 -1
  216. package/dist/admin/AdminShell.d.ts +0 -38
  217. package/dist/admin/icons.d.ts +0 -2
  218. package/dist/admin/index.d.ts +0 -10
  219. package/dist/admin/plugin.d.ts +0 -3
  220. package/dist/admin/sections/AuthenticationSettings.d.ts +0 -3
  221. package/dist/admin/sections/CreditSystemSettings.d.ts +0 -3
  222. package/dist/admin/sections/DepositsSection.d.ts +0 -3
  223. package/dist/admin/sections/EmailSettings.d.ts +0 -3
  224. package/dist/admin/sections/EmbeddedWalletSettings.d.ts +0 -3
  225. package/dist/admin/sections/FeatureSettings.d.ts +0 -3
  226. package/dist/admin/sections/InvitesSection.d.ts +0 -3
  227. package/dist/admin/sections/MembersSection.d.ts +0 -3
  228. package/dist/admin/sections/ServerSettings.d.ts +0 -3
  229. package/dist/admin/sections/SettingsSections.d.ts +0 -7
  230. package/dist/admin/sections/TeamSection.d.ts +0 -3
  231. package/dist/admin/sections/UsersSection.d.ts +0 -3
  232. package/dist/admin/sections/WebhookSettings.d.ts +0 -3
  233. package/dist/admin/sections/WithdrawalsSection.d.ts +0 -3
  234. package/dist/components/LoginButton.d.ts +0 -23
  235. package/dist/components/LoginForm.d.ts +0 -9
  236. package/dist/components/LoginModal.d.ts +0 -9
  237. package/dist/components/admin/AdminUserDetail.d.ts +0 -23
  238. package/dist/components/admin/AdminUserList.d.ts +0 -21
  239. package/dist/components/admin/CedrosAdminDashboard.d.ts +0 -52
  240. package/dist/components/admin/PermissionsSection.d.ts +0 -7
  241. package/dist/components/admin/ProfileDropdown.d.ts +0 -34
  242. package/dist/components/admin/SetupWizard.d.ts +0 -30
  243. package/dist/components/admin/StatsBar.d.ts +0 -17
  244. package/dist/components/admin/SystemSettings.d.ts +0 -19
  245. package/dist/components/admin/settings/AuthenticationSettings.d.ts +0 -4
  246. package/dist/components/admin/settings/AutosaveStatus.d.ts +0 -6
  247. package/dist/components/admin/settings/CreditSystemSettings.d.ts +0 -6
  248. package/dist/components/admin/settings/EmailSettings.d.ts +0 -4
  249. package/dist/components/admin/settings/EmbeddedWalletSettings.d.ts +0 -4
  250. package/dist/components/admin/settings/FeatureSettings.d.ts +0 -4
  251. package/dist/components/admin/settings/MessagingSettings.d.ts +0 -4
  252. package/dist/components/admin/settings/SecuritySettings.d.ts +0 -4
  253. package/dist/components/admin/settings/ServerSettings.d.ts +0 -4
  254. package/dist/components/admin/settings/SettingsPageLayout.d.ts +0 -16
  255. package/dist/components/admin/settings/SsoProvidersSettings.d.ts +0 -4
  256. package/dist/components/admin/settings/WebhookSettings.d.ts +0 -4
  257. package/dist/components/admin/settings/index.d.ts +0 -31
  258. package/dist/components/admin/settings/settingsInputs.d.ts +0 -79
  259. package/dist/components/admin/settings/settingsMetadata.d.ts +0 -18
  260. package/dist/components/apple/AppleLoginButton.d.ts +0 -29
  261. package/dist/components/deposit/CreditBalance.d.ts +0 -19
  262. package/dist/components/deposit/DepositFlow.d.ts +0 -118
  263. package/dist/components/deposit/FeeConfigDisplay.d.ts +0 -15
  264. package/dist/components/deposit/History.d.ts +0 -21
  265. package/dist/components/deposit/TieredAmountSlider.d.ts +0 -19
  266. package/dist/components/deposit/TokenSelector.d.ts +0 -23
  267. package/dist/components/deposit/admin/AdminDepositList.d.ts +0 -21
  268. package/dist/components/deposit/admin/AdminDepositStats.d.ts +0 -15
  269. package/dist/components/deposit/admin/AdminPrivacyPeriodDeposits.d.ts +0 -19
  270. package/dist/components/deposit/admin/AdminWithdrawalHistory.d.ts +0 -19
  271. package/dist/components/deposit/admin/AdminWithdrawalQueue.d.ts +0 -23
  272. package/dist/components/deposit/admin/AdminWithdrawalStats.d.ts +0 -10
  273. package/dist/components/deposit/admin/FeatureDisabledMessage.d.ts +0 -15
  274. package/dist/components/deposit/admin/PrivacySystemStatus.d.ts +0 -15
  275. package/dist/components/deposit/admin/featureDisabled.d.ts +0 -14
  276. package/dist/components/deposit/admin/index.d.ts +0 -22
  277. package/dist/components/deposit/index.d.ts +0 -12
  278. package/dist/components/deposit/tierUtils.d.ts +0 -8
  279. package/dist/components/deposit/tokens.d.ts +0 -19
  280. package/dist/components/email/EmailLoginForm.d.ts +0 -11
  281. package/dist/components/email/EmailRegisterForm.d.ts +0 -14
  282. package/dist/components/email/ForgotPasswordForm.d.ts +0 -17
  283. package/dist/components/email/PasswordInput.d.ts +0 -14
  284. package/dist/components/email/ResetPasswordForm.d.ts +0 -22
  285. package/dist/components/google/GoogleLoginButton.d.ts +0 -12
  286. package/dist/components/invites/InviteForm.d.ts +0 -38
  287. package/dist/components/invites/InviteList.d.ts +0 -40
  288. package/dist/components/members/MemberList.d.ts +0 -47
  289. package/dist/components/org/CreateOrgForm.d.ts +0 -7
  290. package/dist/components/org/OrgAvatar.d.ts +0 -7
  291. package/dist/components/org/OrgListView.d.ts +0 -9
  292. package/dist/components/org/OrgSelector.d.ts +0 -52
  293. package/dist/components/org/OrgSwitcher.d.ts +0 -47
  294. package/dist/components/org/icons.d.ts +0 -8
  295. package/dist/components/profile/UserProfileSettings.d.ts +0 -35
  296. package/dist/components/profile/index.d.ts +0 -2
  297. package/dist/components/sessions/SessionList.d.ts +0 -33
  298. package/dist/components/shared/ErrorBoundary.d.ts +0 -38
  299. package/dist/components/shared/ErrorMessage.d.ts +0 -14
  300. package/dist/components/shared/LoadingSpinner.d.ts +0 -16
  301. package/dist/components/solana/SolanaLoginButton.d.ts +0 -49
  302. package/dist/components/templates/FullPageLayout.d.ts +0 -40
  303. package/dist/components/templates/SplitPageLayout.d.ts +0 -44
  304. package/dist/components/templates/index.d.ts +0 -4
  305. package/dist/components/totp/OtpInput.d.ts +0 -32
  306. package/dist/components/totp/QrCode.d.ts +0 -21
  307. package/dist/components/totp/TotpSettings.d.ts +0 -38
  308. package/dist/components/totp/TotpSetup.d.ts +0 -23
  309. package/dist/components/totp/TotpVerify.d.ts +0 -25
  310. package/dist/components/totp/index.d.ts +0 -10
  311. package/dist/components/wallet/CapabilityWarning.d.ts +0 -11
  312. package/dist/components/wallet/PasskeyPrompt.d.ts +0 -34
  313. package/dist/components/wallet/RecoveryPhraseDisplay.d.ts +0 -18
  314. package/dist/components/wallet/RecoveryPhraseInput.d.ts +0 -21
  315. package/dist/components/wallet/WalletAddressRow.d.ts +0 -10
  316. package/dist/components/wallet/WalletEnrollment.d.ts +0 -15
  317. package/dist/components/wallet/WalletManager.d.ts +0 -9
  318. package/dist/components/wallet/WalletRecovery.d.ts +0 -19
  319. package/dist/components/wallet/WalletStatus.d.ts +0 -28
  320. package/dist/components/wallet/WalletUnlock.d.ts +0 -23
  321. package/dist/components/wallet/index.d.ts +0 -23
  322. package/dist/components/webauthn/PasskeyLoginButton.d.ts +0 -8
  323. package/dist/context/CedrosLoginContext.d.ts +0 -24
  324. package/dist/context/CedrosLoginProvider.d.ts +0 -17
  325. package/dist/context/EmbeddedWalletExposure.d.ts +0 -19
  326. package/dist/context/useCedrosLogin.d.ts +0 -12
  327. package/dist/crypto/aesGcm.d.ts +0 -89
  328. package/dist/crypto/argon2.d.ts +0 -65
  329. package/dist/crypto/argon2Worker.d.ts +0 -1
  330. package/dist/crypto/argon2WorkerClient.d.ts +0 -28
  331. package/dist/crypto/bip39.d.ts +0 -106
  332. package/dist/crypto/capabilities.d.ts +0 -35
  333. package/dist/crypto/entropy.d.ts +0 -56
  334. package/dist/crypto/hkdf.d.ts +0 -38
  335. package/dist/crypto/index.d.ts +0 -30
  336. package/dist/crypto/secureWipe.d.ts +0 -71
  337. package/dist/crypto/shamir.d.ts +0 -52
  338. package/dist/crypto/solanaKeypair.d.ts +0 -63
  339. package/dist/crypto/types.d.ts +0 -134
  340. package/dist/crypto/webauthnPrf.d.ts +0 -108
  341. package/dist/hooks/useAdminDeposits.d.ts +0 -10
  342. package/dist/hooks/useAdminUsers.d.ts +0 -28
  343. package/dist/hooks/useAppleAuth.d.ts +0 -52
  344. package/dist/hooks/useAuth.d.ts +0 -34
  345. package/dist/hooks/useAuthSession.d.ts +0 -19
  346. package/dist/hooks/useAuthorize.d.ts +0 -62
  347. package/dist/hooks/useCredits.d.ts +0 -11
  348. package/dist/hooks/useDashboardPermissions.d.ts +0 -45
  349. package/dist/hooks/useDeposit.d.ts +0 -16
  350. package/dist/hooks/useEmailAuth.d.ts +0 -60
  351. package/dist/hooks/useGoogleAuth.d.ts +0 -67
  352. package/dist/hooks/useInstantLink.d.ts +0 -42
  353. package/dist/hooks/useInvites.d.ts +0 -57
  354. package/dist/hooks/useMembers.d.ts +0 -52
  355. package/dist/hooks/useOrgs.d.ts +0 -49
  356. package/dist/hooks/usePasswordReset.d.ts +0 -32
  357. package/dist/hooks/usePendingRecovery.d.ts +0 -34
  358. package/dist/hooks/useProfile.d.ts +0 -35
  359. package/dist/hooks/useRateLimiter.d.ts +0 -58
  360. package/dist/hooks/useServerFeatures.d.ts +0 -55
  361. package/dist/hooks/useSessions.d.ts +0 -45
  362. package/dist/hooks/useSettingsAutosave.d.ts +0 -29
  363. package/dist/hooks/useSetup.d.ts +0 -25
  364. package/dist/hooks/useSolanaAuth.d.ts +0 -30
  365. package/dist/hooks/useSsoProviders.d.ts +0 -52
  366. package/dist/hooks/useSystemSettings.d.ts +0 -47
  367. package/dist/hooks/useThemeManager.d.ts +0 -11
  368. package/dist/hooks/useTotp.d.ts +0 -52
  369. package/dist/hooks/useTotpVerify.d.ts +0 -38
  370. package/dist/hooks/useTransactionSigning.d.ts +0 -45
  371. package/dist/hooks/useWallet.d.ts +0 -10
  372. package/dist/hooks/useWalletDiscovery.d.ts +0 -24
  373. package/dist/hooks/useWalletEnrollment.d.ts +0 -9
  374. package/dist/hooks/useWalletMaterial.d.ts +0 -10
  375. package/dist/hooks/useWalletRecovery.d.ts +0 -9
  376. package/dist/hooks/useWalletSigning.d.ts +0 -31
  377. package/dist/hooks/useWebAuthn.d.ts +0 -25
  378. package/dist/i18n/I18nProvider.d.ts +0 -16
  379. package/dist/i18n/context.d.ts +0 -6
  380. package/dist/i18n/index.d.ts +0 -5
  381. package/dist/i18n/translations.d.ts +0 -66
  382. package/dist/i18n/useI18n.d.ts +0 -9
  383. package/dist/index-BI9Bj9DF.js +0 -19650
  384. package/dist/index-BI9Bj9DF.js.map +0 -1
  385. package/dist/index-CDRTfEJz.cjs +0 -2061
  386. package/dist/index-CDRTfEJz.cjs.map +0 -1
  387. package/dist/silentWalletEnroll-C3JRAD9_.js +0 -42
  388. package/dist/silentWalletEnroll-C3JRAD9_.js.map +0 -1
  389. package/dist/silentWalletEnroll-DRYQAQfg.cjs +0 -1
  390. package/dist/silentWalletEnroll-DRYQAQfg.cjs.map +0 -1
  391. package/dist/solanaKeypair-BlXol3nh.js.map +0 -1
  392. package/dist/solanaKeypair-C-lIR1JY.cjs +0 -1
  393. package/dist/solanaKeypair-C-lIR1JY.cjs.map +0 -1
  394. package/dist/types/adminUser.d.ts +0 -168
  395. package/dist/types/auth.d.ts +0 -122
  396. package/dist/types/config.d.ts +0 -266
  397. package/dist/types/deposit.d.ts +0 -490
  398. package/dist/types/index.d.ts +0 -13
  399. package/dist/types/invite.d.ts +0 -71
  400. package/dist/types/member.d.ts +0 -45
  401. package/dist/types/org.d.ts +0 -133
  402. package/dist/types/profile.d.ts +0 -56
  403. package/dist/types/session.d.ts +0 -28
  404. package/dist/types/setup.d.ts +0 -47
  405. package/dist/types/systemSettings.d.ts +0 -85
  406. package/dist/types/totp.d.ts +0 -52
  407. package/dist/types/wallet.d.ts +0 -309
  408. package/dist/utils/adminUserApi.d.ts +0 -60
  409. package/dist/utils/apiClient.d.ts +0 -78
  410. package/dist/utils/cryptoShim.d.ts +0 -17
  411. package/dist/utils/csrf.d.ts +0 -1
  412. package/dist/utils/deviceDetection.d.ts +0 -17
  413. package/dist/utils/embeddedWallet.d.ts +0 -75
  414. package/dist/utils/inviteApi.d.ts +0 -31
  415. package/dist/utils/memberApi.d.ts +0 -23
  416. package/dist/utils/orgApi.d.ts +0 -36
  417. package/dist/utils/profileApi.d.ts +0 -26
  418. package/dist/utils/sanitization.d.ts +0 -66
  419. package/dist/utils/sessionApi.d.ts +0 -16
  420. package/dist/utils/setupApi.d.ts +0 -21
  421. package/dist/utils/silentWalletEnroll.d.ts +0 -41
  422. package/dist/utils/systemSettingsApi.d.ts +0 -18
  423. package/dist/utils/tabSync.d.ts +0 -46
  424. package/dist/utils/tokenManager.d.ts +0 -107
  425. package/dist/utils/unlockCredential.d.ts +0 -5
  426. package/dist/utils/validation.d.ts +0 -48
  427. package/dist/utils/walletDetection.d.ts +0 -23
  428. package/dist/utils/webauthnJson.d.ts +0 -21
@@ -1,106 +0,0 @@
1
- import { Seed, ShamirShare } from './types';
2
- /** Number of words in recovery phrase (12 = 128 bits, standard Solana format) */
3
- export declare const MNEMONIC_WORD_COUNT = 12;
4
- /**
5
- * Encode a Shamir share as a BIP-39 mnemonic phrase
6
- *
7
- * @param share - 16-byte share to encode
8
- * @returns Array of 12 mnemonic words
9
- */
10
- export declare function shareToMnemonic(share: ShamirShare): string[];
11
- /**
12
- * Decode a BIP-39 mnemonic phrase back to a Shamir share
13
- *
14
- * @param words - Array of 12 mnemonic words
15
- * @returns 16-byte share
16
- * @throws Error if mnemonic is invalid
17
- */
18
- export declare function mnemonicToShare(words: string[]): ShamirShare;
19
- /**
20
- * Encode a 16-byte seed as a BIP-39 mnemonic phrase
21
- *
22
- * This is used for the recovery phrase which encodes the FULL SEED
23
- * (not a Shamir share) to allow complete wallet recovery.
24
- *
25
- * @param seed - 16-byte seed to encode
26
- * @returns Array of 12 mnemonic words
27
- */
28
- export declare function seedToMnemonic(seed: Seed): string[];
29
- /**
30
- * Decode a BIP-39 mnemonic phrase back to a seed
31
- *
32
- * This is used during recovery to restore the full wallet seed.
33
- *
34
- * @param words - Array of 12 mnemonic words
35
- * @returns 16-byte seed
36
- * @throws Error if mnemonic is invalid
37
- */
38
- export declare function mnemonicToSeed(words: string[]): Seed;
39
- /**
40
- * Validate a mnemonic phrase without decoding
41
- *
42
- * @param words - Array of words to validate
43
- * @returns true if valid BIP-39 mnemonic
44
- */
45
- export declare function isValidMnemonic(words: string[]): boolean;
46
- /**
47
- * Check if a single word is in the BIP-39 wordlist
48
- *
49
- * @param word - Word to check
50
- * @returns true if word is in the wordlist
51
- */
52
- export declare function isValidWord(word: string): boolean;
53
- /**
54
- * Get word suggestions for autocomplete
55
- *
56
- * @param prefix - Partial word input
57
- * @param limit - Maximum number of suggestions
58
- * @returns Array of matching words from wordlist
59
- */
60
- export declare function getWordSuggestions(prefix: string, limit?: number): string[];
61
- /**
62
- * Generate a random mnemonic for testing purposes
63
- *
64
- * WARNING: Do not use this for actual wallet generation.
65
- * Use the proper enrollment flow which generates a seed and splits it.
66
- *
67
- * @returns Array of 12 random words
68
- */
69
- export declare function generateRandomMnemonic(): string[];
70
- /**
71
- * Format mnemonic words for display (groups of 4)
72
- *
73
- * @param words - Array of mnemonic words
74
- * @returns Array of word groups
75
- */
76
- export declare function formatMnemonicForDisplay(words: string[]): string[][];
77
- /**
78
- * Parse user input into word array, handling various formats
79
- *
80
- * @param input - User input (space/comma/newline separated)
81
- * @returns Array of normalized words
82
- */
83
- export declare function parseMnemonicInput(input: string): string[];
84
- /**
85
- * Securely wipe mnemonic array
86
- *
87
- * @security CRYPTO-2: This is BEST-EFFORT only. JavaScript strings are immutable
88
- * and the original word values WILL persist in memory until garbage collected.
89
- * See secureWipe.ts wipeString() for details on JS string wiping limitations.
90
- *
91
- * @param words - Array of words to wipe
92
- */
93
- export declare function wipeMnemonic(words: string[]): void;
94
- /**
95
- * Get the BIP-39 wordlist for UI purposes (e.g., validation indicators)
96
- *
97
- * @returns Copy of the wordlist
98
- */
99
- export declare function getWordlist(): readonly string[];
100
- /**
101
- * Calculate the index of a word in the wordlist
102
- *
103
- * @param word - Word to look up
104
- * @returns Index (0-2047) or -1 if not found
105
- */
106
- export declare function getWordIndex(word: string): number;
@@ -1,35 +0,0 @@
1
- import { CryptoCapabilities } from './types';
2
- /**
3
- * Check all required crypto capabilities
4
- *
5
- * @returns Capability check results
6
- */
7
- export declare function checkCryptoCapabilities(): Promise<CryptoCapabilities>;
8
- /**
9
- * Get a human-readable message about missing capabilities
10
- *
11
- * @param capabilities - Capability check results
12
- * @returns Error message describing what's missing, or null if all supported
13
- */
14
- export declare function getMissingCapabilitiesMessage(capabilities: CryptoCapabilities): string | null;
15
- /**
16
- * Check if the browser is known to support all required features
17
- *
18
- * @returns Object with browser info and support status
19
- */
20
- export declare function getBrowserSupportInfo(): {
21
- browser: string;
22
- version: string;
23
- likelySupported: boolean;
24
- };
25
- /**
26
- * Get cached capabilities or check if not cached
27
- *
28
- * @param forceRefresh - If true, bypass cache and recheck
29
- * @returns Capability check results
30
- */
31
- export declare function getCryptoCapabilities(forceRefresh?: boolean): Promise<CryptoCapabilities>;
32
- /**
33
- * Clear the capability cache (useful for testing)
34
- */
35
- export declare function clearCapabilityCache(): void;
@@ -1,56 +0,0 @@
1
- import { Seed, AesNonce, Argon2Salt, PrfSalt } from './types';
2
- /**
3
- * Get cryptographically secure random bytes
4
- *
5
- * @param length - Number of bytes to generate
6
- * @returns Random bytes
7
- * @throws Error if WebCrypto is not available
8
- */
9
- export declare function getRandomBytes(length: number): Uint8Array;
10
- /**
11
- * Generate a cryptographically secure 16-byte seed for wallet derivation
12
- *
13
- * Note: 16 bytes (128 bits) matches standard Solana wallet format.
14
- *
15
- * @returns 16-byte seed
16
- * @throws Error if WebCrypto is not available
17
- */
18
- export declare function generateSeed(): Seed;
19
- /**
20
- * Generate a 12-byte nonce for AES-GCM encryption
21
- *
22
- * Security: AES-GCM requires a unique nonce per encryption with the same key.
23
- * Using random nonces is safe for reasonable message counts (< 2^32).
24
- *
25
- * CRYPTO-03: For high-volume encryption scenarios (>2^30 messages with same key),
26
- * the birthday bound risk of nonce collision increases. Recommendations:
27
- * 1. Rotate encryption keys periodically (e.g., every 2^20 encryptions)
28
- * 2. Use counter-based nonces instead of random for sequential encryption
29
- * 3. Monitor encryption count and trigger re-keying before limits are reached
30
- *
31
- * For typical wallet use cases (encrypting seed once), random nonces are safe.
32
- *
33
- * @returns 12-byte nonce
34
- * @throws Error if WebCrypto is not available
35
- */
36
- export declare function generateNonce(): AesNonce;
37
- /**
38
- * Generate a 16-byte salt for Argon2id KDF
39
- *
40
- * Security: Salt must be unique per user/password combination.
41
- * 16 bytes provides sufficient uniqueness.
42
- *
43
- * @returns 16-byte salt
44
- * @throws Error if WebCrypto is not available
45
- */
46
- export declare function generateArgon2Salt(): Argon2Salt;
47
- /**
48
- * Generate a 32-byte salt for WebAuthn PRF extension
49
- *
50
- * Security: PRF salt is used as input to the PRF to derive unique
51
- * per-credential keys. Must be stored alongside encrypted share.
52
- *
53
- * @returns 32-byte PRF salt
54
- * @throws Error if WebCrypto is not available
55
- */
56
- export declare function generatePrfSalt(): PrfSalt;
@@ -1,38 +0,0 @@
1
- import { EncryptionKey } from './types';
2
- /**
3
- * Derive an encryption key using HKDF-SHA256
4
- *
5
- * @param inputKeyMaterial - Raw key material (e.g., from PRF)
6
- * @param salt - Optional salt (if not provided, uses zero-filled buffer)
7
- * @param info - Context/application-specific info string
8
- * @param outputLength - Desired output key length in bytes (default: 32)
9
- * @returns Derived key
10
- */
11
- export declare function hkdfDerive(inputKeyMaterial: Uint8Array, salt: Uint8Array | undefined, info: string, outputLength?: number): Promise<Uint8Array>;
12
- /**
13
- * Derive a 256-bit encryption key from PRF output
14
- *
15
- * @param prfOutput - Output from WebAuthn PRF extension (typically 32 bytes)
16
- * @param prfSalt - Salt used with PRF (stored with encrypted share)
17
- * @returns 32-byte encryption key suitable for AES-256-GCM
18
- */
19
- export declare function deriveKeyFromPrf(prfOutput: Uint8Array, prfSalt: Uint8Array): Promise<EncryptionKey>;
20
- /**
21
- * Derive a key with domain separation for different purposes
22
- *
23
- * @param inputKeyMaterial - Base key material
24
- * @param domain - Domain separator string (e.g., 'signing', 'encryption')
25
- * @param salt - Optional salt
26
- * @returns Derived key
27
- *
28
- * @security Domain strings MUST be unique across the codebase. Using the same
29
- * domain with the same input key material will produce identical keys, which
30
- * could lead to key reuse vulnerabilities. See module-level docs for reserved domains.
31
- */
32
- export declare function deriveKeyWithDomain(inputKeyMaterial: Uint8Array, domain: string, salt?: Uint8Array): Promise<Uint8Array>;
33
- /**
34
- * Check if HKDF is supported in the current environment
35
- *
36
- * @returns true if HKDF is available
37
- */
38
- export declare function isHkdfSupported(): Promise<boolean>;
@@ -1,30 +0,0 @@
1
- /**
2
- * Crypto module exports for SSS wallet implementation
3
- *
4
- * This module provides all cryptographic primitives needed for the
5
- * non-custodial Solana wallet feature using Shamir Secret Sharing.
6
- *
7
- * Key components:
8
- * - Entropy: Secure random number generation
9
- * - Shamir: Secret splitting and reconstruction
10
- * - AES-GCM: Authenticated encryption
11
- * - Argon2: Password-based key derivation
12
- * - HKDF: Key derivation from PRF output
13
- * - BIP-39: Mnemonic encoding for recovery phrase
14
- * - WebAuthn PRF: Device key derivation via passkeys
15
- * - Solana Keypair: Ed25519 keypair derivation
16
- * - Secure Wipe: Memory cleanup utilities
17
- * - Capabilities: Feature detection
18
- */
19
- export * from './types';
20
- export { getRandomBytes, generateSeed, generateNonce, generateArgon2Salt, generatePrfSalt, } from './entropy';
21
- export { wipeBytes, wipeAll, withSecureCleanup, withSecureCleanupSync, createSecureContainer, type SecureContainer, } from './secureWipe';
22
- export { aesGcmEncrypt, aesGcmDecrypt, aesGcmEncryptToBase64, aesGcmDecryptFromBase64, encryptWithPasswordKey, decryptWithPasswordKey, encryptAndWipe, uint8ArrayToBase64, base64ToUint8Array, type AesGcmEncryptResult, } from './aesGcm';
23
- export { hkdfDerive, deriveKeyFromPrf, deriveKeyWithDomain, isHkdfSupported } from './hkdf';
24
- export { argon2Derive, argon2DeriveFromBytes, validateKdfParams, isArgon2Supported, verifyPassword, getRecommendedParams, } from './argon2';
25
- export { argon2DeriveInWorker } from './argon2WorkerClient';
26
- export { splitSecret, combineShares, verifyShares, getShareIndex, padToLength, SHAMIR_THRESHOLD, SHAMIR_TOTAL, type ShareId, type ShamirSplitResult, } from './shamir';
27
- export { shareToMnemonic, mnemonicToShare, seedToMnemonic, mnemonicToSeed, isValidMnemonic, isValidWord, getWordSuggestions, generateRandomMnemonic, formatMnemonicForDisplay, parseMnemonicInput, wipeMnemonic, getWordlist, getWordIndex, MNEMONIC_WORD_COUNT, } from './bip39';
28
- export { isWebAuthnAvailable, isPrfSupported, registerPasskeyWithPrf, authenticateWithPrf, authenticateWithDiscoverablePrf, getEncryptionKeyFromPasskey, isCredentialAvailable, type PasskeyRegistrationResult, type PasskeyAuthResult, } from './webauthnPrf';
29
- export { deriveKeypairFromSeed, getPublicKeyFromSeed, publicKeyToBase58, base58ToPublicKey, isValidSolanaAddress, type SolanaKeypair, } from './solanaKeypair';
30
- export { checkCryptoCapabilities, getMissingCapabilitiesMessage, getBrowserSupportInfo, getCryptoCapabilities, clearCapabilityCache, } from './capabilities';
@@ -1,71 +0,0 @@
1
- /**
2
- * Secure memory wiping utilities
3
- *
4
- * Security: JavaScript does not guarantee memory clearing due to GC and
5
- * JIT optimization. These functions provide best-effort clearing of
6
- * sensitive data. For truly sensitive operations, consider using
7
- * WebAssembly with explicit memory management.
8
- *
9
- * IMPORTANT - String vs Uint8Array:
10
- * - Uint8Array CAN be wiped (wipeBytes) - use for keys, seeds, passwords
11
- * - Strings CANNOT be wiped in JavaScript - they are immutable
12
- * - Always prefer Uint8Array for sensitive cryptographic material
13
- *
14
- * Best practices:
15
- * - Call wipe functions as soon as sensitive data is no longer needed
16
- * - Use try/finally blocks to ensure wiping on errors
17
- * - Keep sensitive data lifetime as short as possible
18
- * - Convert sensitive strings to Uint8Array immediately, wipe after use
19
- */
20
- /**
21
- * Best-effort wipe of a Uint8Array by zeroing all bytes
22
- *
23
- * Warning: JavaScript JIT may optimize away this operation. This provides
24
- * defense-in-depth but is not a guarantee against memory inspection.
25
- *
26
- * @param data - Array to wipe
27
- */
28
- export declare function wipeBytes(data: Uint8Array): void;
29
- /**
30
- * Wipe multiple byte arrays
31
- *
32
- * @param arrays - Arrays to wipe
33
- */
34
- export declare function wipeAll(...arrays: (Uint8Array | undefined | null)[]): void;
35
- /**
36
- * Execute a function with automatic cleanup of byte arrays
37
- *
38
- * @param arrays - Arrays to wipe after function completes
39
- * @param fn - Function to execute
40
- * @returns Result of function
41
- */
42
- export declare function withSecureCleanup<T>(arrays: Uint8Array[], fn: () => Promise<T>): Promise<T>;
43
- /**
44
- * Execute a synchronous function with automatic cleanup of byte arrays
45
- *
46
- * @param arrays - Arrays to wipe after function completes
47
- * @param fn - Function to execute
48
- * @returns Result of function
49
- */
50
- export declare function withSecureCleanupSync<T>(arrays: Uint8Array[], fn: () => T): T;
51
- /**
52
- * Create a scoped container for sensitive byte data with automatic cleanup
53
- *
54
- * Usage:
55
- * ```typescript
56
- * const container = createSecureContainer();
57
- * try {
58
- * const key = container.track(generateKey());
59
- * // use key...
60
- * } finally {
61
- * container.wipeAll();
62
- * }
63
- * ```
64
- */
65
- export declare function createSecureContainer(): SecureContainer;
66
- export interface SecureContainer {
67
- /** Track a byte array for later cleanup */
68
- track<T extends Uint8Array>(data: T): T;
69
- /** Wipe all tracked arrays */
70
- wipeAll(): void;
71
- }
@@ -1,52 +0,0 @@
1
- import { Seed, ShamirShare } from './types';
2
- /** Shamir threshold (minimum shares to reconstruct) */
3
- export declare const SHAMIR_THRESHOLD = 2;
4
- /** Total number of shares */
5
- export declare const SHAMIR_TOTAL = 3;
6
- /** Share identifiers */
7
- export type ShareId = 'A' | 'B' | 'C';
8
- /** Result of splitting a secret into shares */
9
- export interface ShamirSplitResult {
10
- /** Share A (for password encryption) */
11
- shareA: ShamirShare;
12
- /** Share B (for device PRF encryption) */
13
- shareB: ShamirShare;
14
- /** Share C (for recovery phrase) */
15
- shareC: ShamirShare;
16
- }
17
- /**
18
- * Split a 16-byte seed into 3 shares using Shamir's Secret Sharing
19
- *
20
- * @param seed - 16-byte seed to split
21
- * @returns Three shares (any 2 can reconstruct the seed)
22
- */
23
- export declare function splitSecret(seed: Seed): ShamirSplitResult;
24
- /**
25
- * Combine 2 shares to reconstruct the original seed
26
- *
27
- * @param share1 - First share
28
- * @param share2 - Second share (must be different from first)
29
- * @returns Reconstructed 16-byte seed (MAINT-03: fixed from incorrect "32-byte")
30
- * @throws Error if shares are invalid or cannot reconstruct
31
- */
32
- export declare function combineShares(share1: ShamirShare, share2: ShamirShare): Seed;
33
- /**
34
- * Verify that shares can successfully reconstruct a seed
35
- *
36
- * @param share1 - First share
37
- * @param share2 - Second share
38
- * @param expectedSeed - Expected seed after reconstruction
39
- * @returns true if shares reconstruct to expected seed
40
- */
41
- export declare function verifyShares(share1: ShamirShare, share2: ShamirShare, expectedSeed: Seed): boolean;
42
- /**
43
- * Extract share index from a share (useful for debugging)
44
- *
45
- * @param share - Share to inspect
46
- * @returns Share index (1-based)
47
- */
48
- export declare function getShareIndex(share: ShamirShare): number;
49
- /**
50
- * Pad a Uint8Array to a specific length
51
- */
52
- export declare function padToLength(data: Uint8Array, targetLength: number): Uint8Array;
@@ -1,63 +0,0 @@
1
- import { Seed } from './types';
2
- /** Solana keypair with public and secret key */
3
- export interface SolanaKeypair {
4
- /** 32-byte Ed25519 public key */
5
- publicKey: Uint8Array;
6
- /** 64-byte Ed25519 secret key (32-byte expanded seed + 32-byte public key) */
7
- secretKey: Uint8Array;
8
- }
9
- /**
10
- * Derive an Ed25519 keypair from a 16-byte seed
11
- *
12
- * The 16-byte seed is expanded to 32 bytes using SHA-256, then used for
13
- * Ed25519 derivation which internally:
14
- * - Hashes expanded seed with SHA-512
15
- * - Clamps lower 32 bytes to form scalar
16
- * - Multiplies by Ed25519 base point
17
- *
18
- * @param seed - 16-byte seed (128-bit entropy)
19
- * @returns Keypair with 32-byte public key and 64-byte secret key
20
- *
21
- * @security **CALLER MUST WIPE secretKey AFTER USE**
22
- * The returned `secretKey` contains sensitive cryptographic material.
23
- * Callers are responsible for wiping it when no longer needed:
24
- * ```ts
25
- * const keypair = deriveKeypairFromSeed(seed);
26
- * try {
27
- * // use keypair.secretKey for signing
28
- * } finally {
29
- * wipeBytes(keypair.secretKey);
30
- * }
31
- * ```
32
- * Failure to wipe may leave key material in memory, vulnerable to memory
33
- * dump attacks. The internal `expandedSeed` is automatically wiped.
34
- */
35
- export declare function deriveKeypairFromSeed(seed: Seed): SolanaKeypair;
36
- /**
37
- * Get the public key from a seed without returning the secret key
38
- *
39
- * @param seed - 32-byte seed
40
- * @returns 32-byte Ed25519 public key
41
- */
42
- export declare function getPublicKeyFromSeed(seed: Seed): Uint8Array;
43
- /**
44
- * Encode a public key as a Base58 Solana address
45
- *
46
- * @param publicKey - 32-byte public key
47
- * @returns Base58-encoded address string
48
- */
49
- export declare function publicKeyToBase58(publicKey: Uint8Array): string;
50
- /**
51
- * Decode a Base58 Solana address to public key bytes
52
- *
53
- * @param address - Base58-encoded address
54
- * @returns 32-byte public key
55
- */
56
- export declare function base58ToPublicKey(address: string): Uint8Array;
57
- /**
58
- * Validate a Solana address format
59
- *
60
- * @param address - Address string to validate
61
- * @returns true if valid Base58 and correct length
62
- */
63
- export declare function isValidSolanaAddress(address: string): boolean;
@@ -1,134 +0,0 @@
1
- /**
2
- * Cryptographic type definitions for SSS wallet implementation
3
- *
4
- * Security: These types define the structure for client-side key material.
5
- * The server never receives plaintext seeds or derived keys.
6
- */
7
- /** 16-byte seed for wallet derivation (128 bits, standard Solana format) */
8
- export type Seed = Uint8Array & {
9
- readonly _brand: 'Seed';
10
- };
11
- /** 16-byte Shamir share (128 bits) */
12
- export type ShamirShare = Uint8Array & {
13
- readonly _brand: 'ShamirShare';
14
- };
15
- /** 32-byte encryption key */
16
- export type EncryptionKey = Uint8Array & {
17
- readonly _brand: 'EncryptionKey';
18
- };
19
- /** 12-byte AES-GCM nonce */
20
- export type AesNonce = Uint8Array & {
21
- readonly _brand: 'AesNonce';
22
- };
23
- /** 16+ byte Argon2 salt */
24
- export type Argon2Salt = Uint8Array & {
25
- readonly _brand: 'Argon2Salt';
26
- };
27
- /** 32-byte PRF salt */
28
- export type PrfSalt = Uint8Array & {
29
- readonly _brand: 'PrfSalt';
30
- };
31
- /** Argon2id KDF parameters (OWASP recommended) */
32
- export interface KdfParams {
33
- /** Memory cost in KiB (default: 19456 = 19 MiB) */
34
- mCost: number;
35
- /** Time cost / iterations (default: 2) */
36
- tCost: number;
37
- /** Parallelism (default: 1) */
38
- pCost: number;
39
- }
40
- /** Default OWASP-recommended Argon2id parameters */
41
- export declare const DEFAULT_KDF_PARAMS: KdfParams;
42
- /** Encrypted data with nonce for AES-GCM */
43
- export interface EncryptedData {
44
- /** Base64-encoded ciphertext */
45
- ciphertext: string;
46
- /** Base64-encoded 12-byte nonce */
47
- nonce: string;
48
- }
49
- /** Enrollment flow state */
50
- export type EnrollmentStep = 'idle' | 'generating_seed' | 'splitting_shares' | 'encrypting_shares' | 'registering_passkey' | 'uploading' | 'showing_recovery' | 'complete' | 'error';
51
- /** Enrollment flow state machine */
52
- export interface EnrollmentState {
53
- step: EnrollmentStep;
54
- error?: string;
55
- /** BIP-39 mnemonic words (only during showing_recovery step) */
56
- recoveryPhrase?: string[];
57
- /** Solana public key (after complete) */
58
- solanaPubkey?: string;
59
- }
60
- /** Recovery flow state */
61
- export type RecoveryStep = 'idle' | 'entering_phrase' | 'validating' | 'prompting_password' | 'registering_passkey' | 'encrypting' | 'uploading' | 'complete' | 'error';
62
- /** Recovery flow state machine */
63
- export interface RecoveryState {
64
- step: RecoveryStep;
65
- error?: string;
66
- /**
67
- * New recovery phrase (12 words) shown ONLY on successful completion.
68
- * SECURITY: Must be displayed to user immediately and never logged.
69
- * User should write down and securely store this phrase.
70
- */
71
- recoveryPhrase?: string[];
72
- }
73
- /** Crypto capability detection results */
74
- export interface CryptoCapabilities {
75
- /** WebCrypto API available */
76
- webCrypto: boolean;
77
- /** AES-GCM supported */
78
- aesGcm: boolean;
79
- /** HKDF supported */
80
- hkdf: boolean;
81
- /** Ed25519 signing supported */
82
- ed25519: boolean;
83
- /** WebAuthn available */
84
- webAuthn: boolean;
85
- /** WebAuthn PRF extension supported */
86
- webAuthnPrf: boolean;
87
- /** Argon2 WASM can be loaded */
88
- argon2: boolean;
89
- /** All required capabilities available */
90
- allSupported: boolean;
91
- }
92
- /** Wallet status */
93
- export type WalletStatus = 'loading' | 'not_enrolled' | 'enrolled_locked' | 'enrolled_unlocked' | 'unlocked' | 'error';
94
- /** Type guard: verify Seed length (16 bytes) */
95
- export declare function isSeed(data: Uint8Array): data is Seed;
96
- /** Type guard: verify ShamirShare is valid
97
- * CRYPTO-4: Improved validation to check secrets.js format markers.
98
- * secrets.js produces shares with format: {bits}{id}{data}
99
- *
100
- * Note: BIP-39 mnemonic system stores 16-byte entropy without secrets.js
101
- * metadata, so we also accept exactly 16-byte arrays for compatibility.
102
- */
103
- export declare function isShamirShare(data: Uint8Array): data is ShamirShare;
104
- /** Type guard: verify EncryptionKey length */
105
- export declare function isEncryptionKey(data: Uint8Array): data is EncryptionKey;
106
- /** Type guard: verify AesNonce length */
107
- export declare function isAesNonce(data: Uint8Array): data is AesNonce;
108
- /** Type guard: verify Argon2Salt length (16+ bytes) */
109
- export declare function isArgon2Salt(data: Uint8Array): data is Argon2Salt;
110
- /** Type guard: verify PrfSalt length */
111
- export declare function isPrfSalt(data: Uint8Array): data is PrfSalt;
112
- /** Create branded Seed from Uint8Array (throws if invalid) */
113
- export declare function toSeed(data: Uint8Array): Seed;
114
- /** Create branded ShamirShare from Uint8Array (throws if invalid) */
115
- export declare function toShamirShare(data: Uint8Array): ShamirShare;
116
- /** Create branded EncryptionKey from Uint8Array (throws if invalid) */
117
- export declare function toEncryptionKey(data: Uint8Array): EncryptionKey;
118
- /** Create branded AesNonce from Uint8Array (throws if invalid) */
119
- export declare function toAesNonce(data: Uint8Array): AesNonce;
120
- /** Create branded Argon2Salt from Uint8Array (throws if invalid) */
121
- export declare function toArgon2Salt(data: Uint8Array): Argon2Salt;
122
- /** Create branded PrfSalt from Uint8Array (throws if invalid) */
123
- export declare function toPrfSalt(data: Uint8Array): PrfSalt;
124
- /**
125
- * Cast branded Uint8Array types to BufferSource for Web Crypto API compatibility.
126
- *
127
- * Web Crypto APIs (importKey, encrypt, decrypt, etc.) expect BufferSource which only
128
- * accepts plain Uint8Array with ArrayBuffer (not ArrayBufferLike), not our branded types.
129
- * This function returns a new Uint8Array backed by a plain ArrayBuffer to satisfy the type.
130
- *
131
- * @param data - Any branded Uint8Array type (Seed, EncryptionKey, AesNonce, etc.)
132
- * @returns BufferSource suitable for Web Crypto APIs
133
- */
134
- export declare function toBufferSource<T extends Uint8Array>(data: T): BufferSource;