@dynamic-labs/sdk-react-core 1.1.0-alpha.22 → 1.1.0-alpha.24

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 (547) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +11 -11
  5. package/src/index.cjs +9 -3
  6. package/src/index.js +5 -2
  7. package/src/lib/Main.cjs +1 -1
  8. package/src/lib/Main.js +1 -1
  9. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +1 -1
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +1 -1
  11. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +1 -1
  12. package/src/lib/components/AnimatePresence/AnimatePresence.js +1 -1
  13. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +1 -1
  14. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +1 -1
  15. package/src/lib/components/Badge/Badge.cjs +1 -1
  16. package/src/lib/components/Badge/Badge.d.ts +2 -1
  17. package/src/lib/components/Badge/Badge.js +1 -1
  18. package/src/lib/components/Captcha/Captcha.cjs +1 -1
  19. package/src/lib/components/Captcha/Captcha.js +1 -1
  20. package/src/lib/components/Divider/Divider.cjs +1 -1
  21. package/src/lib/components/Divider/Divider.js +1 -1
  22. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.cjs +1 -1
  23. package/src/lib/components/DynamicConnectButton/DynamicConnectButton.js +1 -1
  24. package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +1 -1
  25. package/src/lib/components/LogoutButton/LogoutButton.cjs +1 -1
  26. package/src/lib/components/LogoutButton/LogoutButton.js +1 -1
  27. package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +1 -1
  28. package/src/lib/components/MenuList/Dropdown/Dropdown.js +1 -1
  29. package/src/lib/components/Modal/Modal.cjs +1 -1
  30. package/src/lib/components/Modal/Modal.js +1 -1
  31. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +8 -11
  32. package/src/lib/components/NeedHelpSection/NeedHelpSection.d.ts +5 -1
  33. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +8 -11
  34. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -1
  35. package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -1
  36. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -1
  37. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -1
  38. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -1
  39. package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -1
  40. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -1
  41. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -1
  42. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -1
  43. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -1
  44. package/src/lib/components/OverlayCard/OverlayCard.cjs +1 -1
  45. package/src/lib/components/OverlayCard/OverlayCard.js +1 -1
  46. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +1 -1
  47. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +1 -1
  48. package/src/lib/components/Portal/Portal.cjs +1 -1
  49. package/src/lib/components/Portal/Portal.js +1 -1
  50. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +1 -1
  51. package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +1 -1
  52. package/src/lib/components/RenderView/RenderView.cjs +1 -1
  53. package/src/lib/components/RenderView/RenderView.js +1 -1
  54. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +66 -7
  55. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +66 -7
  56. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +1 -4
  57. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +1 -4
  58. package/src/lib/components/ShadowDOM/ShadowDOM.cjs +1 -1
  59. package/src/lib/components/ShadowDOM/ShadowDOM.js +1 -1
  60. package/src/lib/components/SocialSignIn/SocialSignIn.cjs +1 -1
  61. package/src/lib/components/SocialSignIn/SocialSignIn.js +1 -1
  62. package/src/lib/components/StatusDot/StatusDot.d.ts +1 -1
  63. package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +8 -6
  64. package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +8 -6
  65. package/src/lib/components/Toolkit/Toolkit.cjs +1 -1
  66. package/src/lib/components/Toolkit/Toolkit.js +1 -1
  67. package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.cjs +1 -1
  68. package/src/lib/components/Toolkit/components/LoginWithEmailSwitch.js +1 -1
  69. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -1
  70. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -1
  71. package/src/lib/components/Tooltip/Tooltip.cjs +1 -1
  72. package/src/lib/components/Tooltip/Tooltip.js +1 -1
  73. package/src/lib/components/Tooltip/index.d.ts +1 -0
  74. package/src/lib/components/TosAndPp/TosAndPp.cjs +1 -1
  75. package/src/lib/components/TosAndPp/TosAndPp.js +1 -1
  76. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +69 -6
  77. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +69 -6
  78. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
  79. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
  80. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +1 -1
  81. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +1 -1
  82. package/src/lib/components/UserAddress/UserAddress.cjs +1 -1
  83. package/src/lib/components/UserAddress/UserAddress.js +1 -1
  84. package/src/lib/components/UserProfile/UserProfile.cjs +1 -1
  85. package/src/lib/components/UserProfile/UserProfile.js +1 -1
  86. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -1
  87. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -1
  88. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +1 -1
  89. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +1 -1
  90. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
  91. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -1
  92. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +1 -1
  93. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +1 -1
  94. package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -1
  95. package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -1
  96. package/src/lib/components/index.d.ts +1 -0
  97. package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.cjs +1 -1
  98. package/src/lib/context/ConnectWithEmailOtpContext/ConnectWithEmailOtpProvider.js +1 -1
  99. package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -1
  100. package/src/lib/context/DynamicContext/DynamicContext.js +2 -1
  101. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +1 -1
  102. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +1 -1
  103. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +1 -1
  104. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +1 -1
  105. package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.cjs +1 -1
  106. package/src/lib/context/DynamicContext/useDynamicContext/useOverrides/useOverrides.js +1 -1
  107. package/src/lib/context/FundingContext/FundingContext.cjs +1 -1
  108. package/src/lib/context/FundingContext/FundingContext.js +1 -1
  109. package/src/lib/context/LoadingContext/LoadingContext.cjs +1 -1
  110. package/src/lib/context/LoadingContext/LoadingContext.js +1 -1
  111. package/src/lib/context/MockContext/MockContext.cjs +1 -1
  112. package/src/lib/context/MockContext/MockContext.js +1 -1
  113. package/src/lib/context/PasskeyContext/PasskeyContext.cjs +158 -6
  114. package/src/lib/context/PasskeyContext/PasskeyContext.d.ts +7 -0
  115. package/src/lib/context/PasskeyContext/PasskeyContext.js +159 -7
  116. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +1 -1
  117. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +1 -1
  118. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +2 -2
  119. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +2 -2
  120. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +1 -1
  121. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +1 -1
  122. package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.cjs +1 -1
  123. package/src/lib/context/UserFieldEditorContext/UserFieldEditorContext.js +1 -1
  124. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  125. package/src/lib/context/WalletContext/WalletContext.cjs +1 -1
  126. package/src/lib/context/WalletContext/WalletContext.js +1 -1
  127. package/src/lib/data/api.cjs +14 -5
  128. package/src/lib/data/api.d.ts +3 -1
  129. package/src/lib/data/api.js +15 -6
  130. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +1 -1
  131. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +1 -1
  132. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -1
  133. package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -1
  134. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +1 -1
  135. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +1 -1
  136. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +1 -1
  137. package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +1 -1
  138. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +1 -1
  139. package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +1 -1
  140. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -1
  141. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -1
  142. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -1
  143. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -1
  144. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +1 -1
  145. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +1 -1
  146. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -1
  147. package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -1
  148. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -1
  149. package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -1
  150. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -1
  151. package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -1
  152. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -1
  153. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -1
  154. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
  155. package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
  156. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
  157. package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
  158. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
  159. package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
  160. package/src/lib/locale/en/translation.cjs +148 -33
  161. package/src/lib/locale/en/translation.d.ts +140 -25
  162. package/src/lib/locale/en/translation.js +148 -33
  163. package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.cjs +1 -1
  164. package/src/lib/modals/DynamicAuthModal/DynamicAuthModal.js +1 -1
  165. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +29 -7
  166. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +29 -7
  167. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -1
  168. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -1
  169. package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -1
  170. package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -1
  171. package/src/lib/shared/assets/domain.cjs +53 -0
  172. package/src/lib/shared/assets/domain.js +29 -0
  173. package/src/lib/shared/assets/gear.cjs +53 -0
  174. package/src/lib/shared/assets/gear.js +29 -0
  175. package/src/lib/shared/assets/index.d.ts +4 -1
  176. package/src/lib/shared/assets/multiple-account-security.cjs +106 -0
  177. package/src/lib/shared/assets/multiple-account-security.js +82 -0
  178. package/src/lib/shared/assets/passkey-account-security.cjs +92 -0
  179. package/src/lib/shared/assets/passkey-account-security.js +68 -0
  180. package/src/lib/shared/types/index.d.ts +6 -0
  181. package/src/lib/styles/index.shadow.cjs +1 -1
  182. package/src/lib/styles/index.shadow.js +1 -1
  183. package/src/lib/utils/constants/localStorage.cjs +4 -0
  184. package/src/lib/utils/constants/localStorage.d.ts +2 -0
  185. package/src/lib/utils/constants/localStorage.js +3 -1
  186. package/src/lib/utils/functions/getEnabledEmbeddedWalletsAuthenticators/getEnabledEmbeddedWalletsAuthenticators.cjs +18 -0
  187. package/src/lib/utils/functions/getEnabledEmbeddedWalletsAuthenticators/getEnabledEmbeddedWalletsAuthenticators.d.ts +2 -0
  188. package/src/lib/utils/functions/getEnabledEmbeddedWalletsAuthenticators/getEnabledEmbeddedWalletsAuthenticators.js +14 -0
  189. package/src/lib/utils/functions/getEnabledEmbeddedWalletsAuthenticators/index.d.ts +1 -0
  190. package/src/lib/utils/functions/index.d.ts +1 -0
  191. package/src/lib/utils/functions/removeElementById/removeElementById.cjs +5 -4
  192. package/src/lib/utils/functions/removeElementById/removeElementById.js +5 -4
  193. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -1
  194. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -1
  195. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -1
  196. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -1
  197. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -1
  198. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -1
  199. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +1 -1
  200. package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +1 -1
  201. package/src/lib/utils/hooks/index.d.ts +1 -0
  202. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +1 -1
  203. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +1 -1
  204. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -1
  205. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -1
  206. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +8 -3
  207. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +8 -3
  208. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -1
  209. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -1
  210. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +11 -0
  211. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +11 -0
  212. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +5 -1
  213. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +2 -1
  214. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +5 -1
  215. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +1 -1
  216. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +1 -1
  217. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +1 -1
  218. package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +1 -1
  219. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +1 -1
  220. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +1 -1
  221. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +1 -1
  222. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +1 -1
  223. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +0 -8
  224. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +0 -8
  225. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +1 -1
  226. package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +1 -1
  227. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +1 -1
  228. package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +1 -1
  229. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.cjs +1 -1
  230. package/src/lib/utils/hooks/useEmbeddedReveal/useEmbeddedReveal.js +1 -1
  231. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +13 -121
  232. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +13 -121
  233. package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/index.d.ts +1 -0
  234. package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.cjs +194 -0
  235. package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.d.ts +5 -0
  236. package/src/lib/utils/hooks/useEmbeddedWallet/useTurnkey/useTurnkey.js +190 -0
  237. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +1 -1
  238. package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +1 -1
  239. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/index.d.ts +1 -0
  240. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs +143 -0
  241. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.d.ts +13 -0
  242. package/src/lib/utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js +139 -0
  243. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -1
  244. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -1
  245. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +10 -5
  246. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +10 -5
  247. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -1
  248. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -1
  249. package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.cjs +1 -1
  250. package/src/lib/utils/hooks/useOnlyConnectedMode/useOnlyConnectedMode.js +1 -1
  251. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +120 -21
  252. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.d.ts +4 -2
  253. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +121 -22
  254. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +1 -1
  255. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +1 -1
  256. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +1 -1
  257. package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +1 -1
  258. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +1 -1
  259. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +1 -1
  260. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +1 -1
  261. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +1 -1
  262. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.cjs +1 -1
  263. package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUserWithModal/useUpdateUserWithModal.js +1 -1
  264. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -1
  265. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -1
  266. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
  267. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
  268. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
  269. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
  270. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +3 -7
  271. package/src/lib/views/AccountExistsView/AccountExistsView.js +3 -7
  272. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +1 -1
  273. package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +1 -1
  274. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
  275. package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
  276. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +1 -1
  277. package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +1 -1
  278. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
  279. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
  280. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
  281. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
  282. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +3 -3
  283. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +3 -3
  284. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -1
  285. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -1
  286. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +1 -1
  287. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +1 -1
  288. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
  289. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
  290. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -1
  291. package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -1
  292. package/src/lib/views/EmailVerification/EmailVerification.cjs +12 -8
  293. package/src/lib/views/EmailVerification/EmailVerification.js +12 -8
  294. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
  295. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
  296. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +13 -5
  297. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +13 -5
  298. package/src/lib/views/LoginView/LoginView.cjs +1 -1
  299. package/src/lib/views/LoginView/LoginView.js +1 -1
  300. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +1 -1
  301. package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +1 -1
  302. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +1 -1
  303. package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +1 -1
  304. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -1
  305. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -1
  306. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +1 -1
  307. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +1 -1
  308. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -1
  309. package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -1
  310. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +1 -1
  311. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +1 -1
  312. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
  313. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +1 -1
  314. package/src/lib/views/LoginView/useLoginView.cjs +1 -1
  315. package/src/lib/views/LoginView/useLoginView.js +1 -1
  316. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  317. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  318. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -1
  319. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -1
  320. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -1
  321. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -1
  322. package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
  323. package/src/lib/views/NoAccess/NoAccess.js +1 -1
  324. package/src/lib/views/NoAccess/useNoAccessText.cjs +1 -1
  325. package/src/lib/views/NoAccess/useNoAccessText.js +1 -1
  326. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -1
  327. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -1
  328. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -1
  329. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -1
  330. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.cjs +90 -0
  331. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.d.ts +6 -0
  332. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/AuthChoiceInfo.js +86 -0
  333. package/src/lib/views/Passkey/EmbeddedAuthChoice/AuthChoiceInfo/index.d.ts +1 -0
  334. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.cjs +120 -0
  335. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.d.ts +7 -0
  336. package/src/lib/views/Passkey/EmbeddedAuthChoice/EmbeddedAuthChoice.js +116 -0
  337. package/src/lib/views/Passkey/EmbeddedAuthChoice/index.d.ts +2 -0
  338. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.cjs +85 -0
  339. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.d.ts +14 -0
  340. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/ActionCard.js +81 -0
  341. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/ActionCard/index.d.ts +1 -0
  342. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.cjs +121 -0
  343. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.d.ts +9 -0
  344. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/EmbeddedAuthChoiceCards.js +117 -0
  345. package/src/lib/views/Passkey/EmbeddedAuthChoiceCards/index.d.ts +1 -0
  346. package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.cjs +6 -6
  347. package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.d.ts +8 -1
  348. package/src/lib/views/Passkey/PasskeyDeviceIcon/PasskeyDeviceIcon.js +6 -6
  349. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +10 -6
  350. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +11 -7
  351. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.cjs +88 -0
  352. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.d.ts +2 -0
  353. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/PasskeyNewDomainDetectedView.js +84 -0
  354. package/src/lib/views/Passkey/PasskeyNewDomainDetectedView/index.d.ts +1 -0
  355. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +22 -9
  356. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.d.ts +8 -1
  357. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +23 -10
  358. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +5 -5
  359. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +5 -5
  360. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +14 -32
  361. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.d.ts +6 -1
  362. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +15 -33
  363. package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +1 -1
  364. package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +1 -1
  365. package/src/lib/views/Passkey/index.d.ts +2 -0
  366. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +119 -14
  367. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.d.ts +31 -6
  368. package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +119 -16
  369. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -1
  370. package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -1
  371. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -1
  372. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -1
  373. package/src/lib/views/QrCodeView/QRCode.cjs +1 -1
  374. package/src/lib/views/QrCodeView/QRCode.js +1 -1
  375. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +1 -1
  376. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +1 -1
  377. package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -1
  378. package/src/lib/views/QrCodeView/QrCodeView.js +1 -1
  379. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.cjs +1 -1
  380. package/src/lib/views/SelectHardwareWalletView/SelectHardwareWalletView.js +1 -1
  381. package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.cjs +1 -1
  382. package/src/lib/views/SelectWalletInWalletGroupView/SelectWalletInWalletGroupView.js +1 -1
  383. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -1
  384. package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -1
  385. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
  386. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
  387. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +1 -1
  388. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +1 -1
  389. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -1
  390. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -1
  391. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
  392. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
  393. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
  394. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
  395. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.cjs +1 -1
  396. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.js +1 -1
  397. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
  398. package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
  399. package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.cjs +1 -1
  400. package/src/lib/views/UserFieldEditorView/useAssignDefaultValues/useAssignDefaultValues.js +1 -1
  401. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +1 -1
  402. package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +1 -1
  403. package/src/lib/views/WalletGroupView/WalletGroupView.cjs +1 -1
  404. package/src/lib/views/WalletGroupView/WalletGroupView.js +1 -1
  405. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.cjs +1 -1
  406. package/src/lib/views/WalletGroupView/components/WalletGroupItem/WalletGroupItem.js +1 -1
  407. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
  408. package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
  409. package/src/lib/views/WalletList/WalletList.cjs +1 -1
  410. package/src/lib/views/WalletList/WalletList.js +1 -1
  411. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -1
  412. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -1
  413. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +1 -1
  414. package/src/lib/views/WalletLockedView/WalletLockedView.js +1 -1
  415. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -1
  416. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -1
  417. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -1
  418. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -1
  419. package/src/lib/views/viewToComponentMap.cjs +64 -0
  420. package/src/lib/views/viewToComponentMap.js +64 -0
  421. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -1
  422. package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -1
  423. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
  424. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
  425. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -1
  426. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -1
  427. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +1 -1
  428. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +1 -1
  429. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -1
  430. package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -1
  431. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +1 -1
  432. package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +1 -1
  433. package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +1 -1
  434. package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +1 -1
  435. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +1 -1
  436. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +1 -1
  437. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
  438. package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
  439. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.cjs +1 -1
  440. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedAuthFlow/DynamicEmbeddedAuthFlow.js +1 -1
  441. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.cjs +1 -1
  442. package/src/lib/widgets/DynamicEmbeddedWidget/DynamicEmbeddedUserProfile/DynamicEmbeddedUserProfile.js +1 -1
  443. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
  444. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
  445. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -1
  446. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -1
  447. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.cjs +1 -1
  448. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveBitcoinWalletAddresses/ActiveBitcoinWalletAddresses.js +1 -1
  449. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.cjs +7 -2
  450. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletAddress/ActiveWalletAddress.js +7 -2
  451. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +5 -2
  452. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +5 -2
  453. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -1
  454. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -1
  455. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +3 -3
  456. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +6 -1
  457. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +3 -3
  458. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +3 -2
  459. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +3 -2
  460. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -1
  461. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -1
  462. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -1
  463. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -1
  464. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +1 -1
  465. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +1 -1
  466. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +3 -5
  467. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +3 -5
  468. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +1 -1
  469. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +1 -1
  470. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -1
  471. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -1
  472. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
  473. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
  474. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -1
  475. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -1
  476. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -1
  477. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -1
  478. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -2
  479. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -2
  480. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.cjs +1 -1
  481. package/src/lib/widgets/DynamicWidget/components/PromptModal/PromptModal.js +1 -1
  482. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
  483. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
  484. package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.cjs +1 -1
  485. package/src/lib/widgets/DynamicWidget/components/UnknownWalletInformation/UnknownWalletInformation.js +1 -1
  486. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +1 -1
  487. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +1 -1
  488. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -1
  489. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -1
  490. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +1 -1
  491. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +1 -1
  492. package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.cjs +1 -1
  493. package/src/lib/widgets/DynamicWidget/hooks/useCloseMultiWalletPrompt/useCloseMultiWalletPrompt.js +1 -1
  494. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -1
  495. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -1
  496. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -1
  497. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
  498. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +1 -1
  499. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -1
  500. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +1 -1
  501. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +1 -1
  502. package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.cjs +1 -1
  503. package/src/lib/widgets/DynamicWidget/hooks/useMultiWalletPromptState/useMultiWalletPromptState.js +1 -1
  504. package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.cjs +1 -1
  505. package/src/lib/widgets/DynamicWidget/prompts/AwaitingConnectionModal/AwaitingConnectionModal.js +1 -1
  506. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -1
  507. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -1
  508. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
  509. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
  510. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -1
  511. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -1
  512. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
  513. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
  514. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -1
  515. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -1
  516. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -1
  517. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -1
  518. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -1
  519. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -1
  520. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -1
  521. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -1
  522. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -1
  523. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -1
  524. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +1 -1
  525. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +1 -1
  526. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -1
  527. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -1
  528. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -1
  529. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -1
  530. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +1 -1
  531. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +1 -1
  532. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -1
  533. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -1
  534. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +8 -23
  535. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +8 -23
  536. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs +2 -2
  537. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js +2 -2
  538. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -1
  539. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -1
  540. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +34 -8
  541. package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +34 -8
  542. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +1 -1
  543. package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +1 -1
  544. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -1
  545. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -1
  546. package/src/lib/shared/assets/turnkey.cjs +0 -79
  547. package/src/lib/shared/assets/turnkey.js +0 -55
@@ -8,13 +8,14 @@ var React = require('react');
8
8
  var reactI18next = require('react-i18next');
9
9
  var iconic = require('@dynamic-labs/iconic');
10
10
  var utils = require('@dynamic-labs/utils');
11
- require('../../../../events/dynamicEvents.cjs');
11
+ var dynamicEvents = require('../../../../events/dynamicEvents.cjs');
12
12
  require('../../../../context/DynamicContext/DynamicContext.cjs');
13
13
  require('@dynamic-labs/sdk-api');
14
14
  var logger = require('../../../../shared/logger.cjs');
15
15
  require('@dynamic-labs/wallet-connector-core');
16
16
  var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
17
17
  var check = require('../../../../shared/assets/check.cjs');
18
+ var close = require('../../../../shared/assets/close.cjs');
18
19
  var error = require('../../../../shared/assets/error.cjs');
19
20
  require('@dynamic-labs/wallet-book');
20
21
  require('../../../../utils/constants/colors.cjs');
@@ -36,6 +37,8 @@ require('../../../../context/EmailVerificationContext/EmailVerificationContext.c
36
37
  require('react-dom');
37
38
  require('../../../../context/ThemeContext/ThemeContext.cjs');
38
39
  var useMutation = require('../../../../utils/hooks/useMutation/useMutation.cjs');
40
+ var passkeyRecovery = require('../../utils/passkeyRecovery/passkeyRecovery.cjs');
41
+ var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
39
42
  require('@dynamic-labs/types');
40
43
  require('yup');
41
44
  require('../../../../context/MockContext/MockContext.cjs');
@@ -49,7 +52,6 @@ require('../../../../components/Transition/OpacityTransition/OpacityTransition.c
49
52
  require('../../../../components/ShadowDOM/ShadowDOM.cjs');
50
53
  require('../../../../components/OverlayCard/OverlayCard.context.cjs');
51
54
  require('../../../../context/FooterAnimationContext/index.cjs');
52
- var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
53
55
  var Typography = require('../../../../components/Typography/Typography.cjs');
54
56
  require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
55
57
  require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
@@ -62,12 +64,13 @@ require('qrcode');
62
64
  require('../../../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
63
65
  require('../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
64
66
  require('formik');
65
- require('../../../../components/IconButton/IconButton.cjs');
67
+ var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
68
+ var IconButton = require('../../../../components/IconButton/IconButton.cjs');
66
69
  var Icon = require('../../../../components/Icon/Icon.cjs');
67
70
  require('../../../../components/Alert/Alert.cjs');
68
71
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
69
- require('@dynamic-labs/viem-utils');
70
72
  require('../../../../context/PasskeyContext/PasskeyContext.cjs');
73
+ require('@dynamic-labs/viem-utils');
71
74
  require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
72
75
  var getProperErrorMessage = require('../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.cjs');
73
76
  var TextButton = require('../../../../components/TextButton/TextButton.cjs');
@@ -80,12 +83,11 @@ require('../../../WalletList/WalletList.cjs');
80
83
  require('@hcaptcha/react-hcaptcha');
81
84
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
82
85
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
83
- var passkeyRecovery = require('../../utils/passkeyRecovery/passkeyRecovery.cjs');
84
86
 
85
87
  // eslint-disable-next-line no-useless-escape
86
88
  const bundleRegex = new RegExp(/^([A-Za-z0-9\s_+@\.-]+)$/);
87
- const PasskeyBundleRecovery = () => {
88
- const { authToken, primaryWallet, environmentId, user } = useInternalDynamicContext.useInternalDynamicContext();
89
+ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
90
+ const { authToken, primaryWallet, environmentId, user, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
89
91
  const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
90
92
  const [bundleInput, setBundleInput] = React.useState('');
91
93
  const [resendingCode, setResendingCode] = React.useState(false);
@@ -102,8 +104,14 @@ const PasskeyBundleRecovery = () => {
102
104
  wallet,
103
105
  });
104
106
  setIsValid(true);
107
+ // For passkey it will be called after adding a passkey in passkey-recovery-complete view
108
+ authenticatorType === 'email' &&
109
+ dynamicEvents.dynamicEvents.emit('passkeyRecoveryCompleted', primaryWallet);
105
110
  setTimeout(() => {
106
- setView('passkey-recovery-complete');
111
+ if (authenticatorType === 'passkey') {
112
+ return setView('passkey-recovery-complete');
113
+ }
114
+ setShowAuthFlow(false);
107
115
  }, 2000);
108
116
  }));
109
117
  /**
@@ -137,6 +145,7 @@ const PasskeyBundleRecovery = () => {
137
145
  setResendingCode(true);
138
146
  yield passkeyRecovery.resentRecoveryEmail({
139
147
  authToken,
148
+ authenticatorType,
140
149
  environmentId,
141
150
  wallet: primaryWallet,
142
151
  });
@@ -161,7 +170,11 @@ const PasskeyBundleRecovery = () => {
161
170
  const translationKey = isTurnkeyWalletWithoutAuthenticator
162
171
  ? 'dyn_passkey_secure_modal'
163
172
  : 'dyn_passkey_recovery';
164
- return (jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [!error$1 && !isValid ? (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: emailIcon, isSpinning: !error$1 && !isValid, iconSize: 96 })) : (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 64, variant: error$1 ? 'red' : 'green', InnerIcon: error$1 ? error.ReactComponent : check.ReactComponent })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.code.description`) }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Input.Input, { id: 'passkey-recovery-bundle', "data-testid": 'passkey-recovery-bundle-input', value: bundleInput, onChange: handleBundleChanged, label: t(`${translationKey}.code.input_label`), disabled: isLoading || resendingCode, error: Boolean(error$1), className: isValid ? 'passkey-recovery-view__input-valid' : '', autoFocus: true, message: errorText }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view__resend-code', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', children: t(`${translationKey}.code.resend.text`) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', children: jsxRuntime.jsx(TextButton.TextButton, { "data-testid": 'resend-email-button', onClick: handleResentEmail, disabled: resendingCode || isLoading || (bundleInput.length > 0 && !error$1), children: t(`${translationKey}.code.resend.button`) }) })] })] }));
173
+ const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => {
174
+ setShowAuthFlow(false, { emitCancelAuth: true });
175
+ dynamicEvents.dynamicEvents.emit('passkeyRecoveryFailed', new utils.DynamicError('Validation request cancelled'));
176
+ }, "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
177
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: `${translationKey}.code.title`, children: t(`${translationKey}.code.title`) }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [!error$1 && !isValid ? (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: emailIcon, isSpinning: !error$1 && !isValid, iconSize: 96 })) : (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 64, variant: error$1 ? 'red' : 'green', InnerIcon: error$1 ? error.ReactComponent : check.ReactComponent })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', copykey: `${translationKey}.code.description`, children: t(`${translationKey}.code.description`, { email: user === null || user === void 0 ? void 0 : user.email }) }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Input.Input, { id: 'passkey-recovery-bundle', "data-testid": 'passkey-recovery-bundle-input', value: bundleInput, onChange: handleBundleChanged, label: t(`${translationKey}.code.input_label`), disabled: isLoading || resendingCode, error: Boolean(error$1), className: isValid ? 'passkey-recovery-view__input-valid' : '', autoFocus: true, message: errorText }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view__resend-code', children: [jsxRuntime.jsx(Typography.Typography, { color: 'secondary', variant: 'body_small', copykey: `${translationKey}.code.resend.text`, children: t(`${translationKey}.code.resend.text`) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'link', copykey: `${translationKey}.code.resend.button`, children: jsxRuntime.jsx(TextButton.TextButton, { "data-testid": 'resend-email-button', onClick: handleResentEmail, disabled: resendingCode || isLoading || (bundleInput.length > 0 && !error$1), children: t(`${translationKey}.code.resend.button`) }) })] })] })] }));
165
178
  };
166
179
 
167
180
  exports.PasskeyBundleRecovery = PasskeyBundleRecovery;
@@ -1,2 +1,9 @@
1
1
  import { FC } from 'react';
2
- export declare const PasskeyBundleRecovery: FC;
2
+ import { AuthenticatorType } from '@dynamic-labs/wallet-connector-core';
3
+ import { EmbeddedWalletCurrentAction } from '../../../../shared';
4
+ interface PasskeyBundleValidationProps {
5
+ authenticatorType: AuthenticatorType;
6
+ currentAction?: EmbeddedWalletCurrentAction;
7
+ }
8
+ export declare const PasskeyBundleRecovery: FC<PasskeyBundleValidationProps>;
9
+ export {};
@@ -1,16 +1,17 @@
1
1
  import { __awaiter } from '../../../../../../_virtual/_tslib.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { useState, useMemo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { SignInWithEmailIcon } from '@dynamic-labs/iconic';
6
6
  import { DynamicError } from '@dynamic-labs/utils';
7
- import '../../../../events/dynamicEvents.js';
7
+ import { dynamicEvents } from '../../../../events/dynamicEvents.js';
8
8
  import '../../../../context/DynamicContext/DynamicContext.js';
9
9
  import '@dynamic-labs/sdk-api';
10
10
  import { logger } from '../../../../shared/logger.js';
11
11
  import '@dynamic-labs/wallet-connector-core';
12
12
  import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
13
13
  import { ReactComponent as SvgCheck } from '../../../../shared/assets/check.js';
14
+ import { ReactComponent as SvgClose } from '../../../../shared/assets/close.js';
14
15
  import { ReactComponent as SvgError } from '../../../../shared/assets/error.js';
15
16
  import '@dynamic-labs/wallet-book';
16
17
  import '../../../../utils/constants/colors.js';
@@ -32,6 +33,8 @@ import '../../../../context/EmailVerificationContext/EmailVerificationContext.js
32
33
  import 'react-dom';
33
34
  import '../../../../context/ThemeContext/ThemeContext.js';
34
35
  import { useMutation } from '../../../../utils/hooks/useMutation/useMutation.js';
36
+ import { passkeyRecoveryBundleValidation, resentRecoveryEmail } from '../../utils/passkeyRecovery/passkeyRecovery.js';
37
+ import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
35
38
  import '@dynamic-labs/types';
36
39
  import 'yup';
37
40
  import '../../../../context/MockContext/MockContext.js';
@@ -45,7 +48,6 @@ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js
45
48
  import '../../../../components/ShadowDOM/ShadowDOM.js';
46
49
  import '../../../../components/OverlayCard/OverlayCard.context.js';
47
50
  import '../../../../context/FooterAnimationContext/index.js';
48
- import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
49
51
  import { Typography } from '../../../../components/Typography/Typography.js';
50
52
  import '../../../../context/WalletGroupContext/WalletGroupContext.js';
51
53
  import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
@@ -58,12 +60,13 @@ import 'qrcode';
58
60
  import '../../../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
59
61
  import '../../../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
60
62
  import 'formik';
61
- import '../../../../components/IconButton/IconButton.js';
63
+ import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
64
+ import { IconButton } from '../../../../components/IconButton/IconButton.js';
62
65
  import { Icon } from '../../../../components/Icon/Icon.js';
63
66
  import '../../../../components/Alert/Alert.js';
64
67
  import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
65
- import '@dynamic-labs/viem-utils';
66
68
  import '../../../../context/PasskeyContext/PasskeyContext.js';
69
+ import '@dynamic-labs/viem-utils';
67
70
  import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
68
71
  import { getProperErrorMessage } from '../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.js';
69
72
  import { TextButton } from '../../../../components/TextButton/TextButton.js';
@@ -76,12 +79,11 @@ import '../../../WalletList/WalletList.js';
76
79
  import '@hcaptcha/react-hcaptcha';
77
80
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
78
81
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
79
- import { passkeyRecoveryBundleValidation, resentRecoveryEmail } from '../../utils/passkeyRecovery/passkeyRecovery.js';
80
82
 
81
83
  // eslint-disable-next-line no-useless-escape
82
84
  const bundleRegex = new RegExp(/^([A-Za-z0-9\s_+@\.-]+)$/);
83
- const PasskeyBundleRecovery = () => {
84
- const { authToken, primaryWallet, environmentId, user } = useInternalDynamicContext();
85
+ const PasskeyBundleRecovery = ({ authenticatorType, currentAction, }) => {
86
+ const { authToken, primaryWallet, environmentId, user, setShowAuthFlow } = useInternalDynamicContext();
85
87
  const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
86
88
  const [bundleInput, setBundleInput] = useState('');
87
89
  const [resendingCode, setResendingCode] = useState(false);
@@ -98,8 +100,14 @@ const PasskeyBundleRecovery = () => {
98
100
  wallet,
99
101
  });
100
102
  setIsValid(true);
103
+ // For passkey it will be called after adding a passkey in passkey-recovery-complete view
104
+ authenticatorType === 'email' &&
105
+ dynamicEvents.emit('passkeyRecoveryCompleted', primaryWallet);
101
106
  setTimeout(() => {
102
- setView('passkey-recovery-complete');
107
+ if (authenticatorType === 'passkey') {
108
+ return setView('passkey-recovery-complete');
109
+ }
110
+ setShowAuthFlow(false);
103
111
  }, 2000);
104
112
  }));
105
113
  /**
@@ -133,6 +141,7 @@ const PasskeyBundleRecovery = () => {
133
141
  setResendingCode(true);
134
142
  yield resentRecoveryEmail({
135
143
  authToken,
144
+ authenticatorType,
136
145
  environmentId,
137
146
  wallet: primaryWallet,
138
147
  });
@@ -157,7 +166,11 @@ const PasskeyBundleRecovery = () => {
157
166
  const translationKey = isTurnkeyWalletWithoutAuthenticator
158
167
  ? 'dyn_passkey_secure_modal'
159
168
  : 'dyn_passkey_recovery';
160
- return (jsxs("div", { className: 'passkey-recovery-view', children: [!error && !isValid ? (jsx(IconWithSpinner, { Icon: emailIcon, isSpinning: !error && !isValid, iconSize: 96 })) : (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 64, variant: error ? 'red' : 'green', InnerIcon: error ? SvgError : SvgCheck })), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.code.description`) }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Input, { id: 'passkey-recovery-bundle', "data-testid": 'passkey-recovery-bundle-input', value: bundleInput, onChange: handleBundleChanged, label: t(`${translationKey}.code.input_label`), disabled: isLoading || resendingCode, error: Boolean(error), className: isValid ? 'passkey-recovery-view__input-valid' : '', autoFocus: true, message: errorText }) }), jsxs("div", { className: 'passkey-recovery-view__resend-code', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', children: t(`${translationKey}.code.resend.text`) }), jsx(Typography, { variant: 'body_small', color: 'link', children: jsx(TextButton, { "data-testid": 'resend-email-button', onClick: handleResentEmail, disabled: resendingCode || isLoading || (bundleInput.length > 0 && !error), children: t(`${translationKey}.code.resend.button`) }) })] })] }));
169
+ const closeButton = (jsx(IconButton, { type: 'button', onClick: () => {
170
+ setShowAuthFlow(false, { emitCancelAuth: true });
171
+ dynamicEvents.emit('passkeyRecoveryFailed', new DynamicError('Validation request cancelled'));
172
+ }, "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
173
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', copykey: `${translationKey}.code.title`, children: t(`${translationKey}.code.title`) }) }), jsxs("div", { className: 'passkey-recovery-view', children: [!error && !isValid ? (jsx(IconWithSpinner, { Icon: emailIcon, isSpinning: !error && !isValid, iconSize: 96 })) : (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 64, variant: error ? 'red' : 'green', InnerIcon: error ? SvgError : SvgCheck })), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', copykey: `${translationKey}.code.description`, children: t(`${translationKey}.code.description`, { email: user === null || user === void 0 ? void 0 : user.email }) }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Input, { id: 'passkey-recovery-bundle', "data-testid": 'passkey-recovery-bundle-input', value: bundleInput, onChange: handleBundleChanged, label: t(`${translationKey}.code.input_label`), disabled: isLoading || resendingCode, error: Boolean(error), className: isValid ? 'passkey-recovery-view__input-valid' : '', autoFocus: true, message: errorText }) }), jsxs("div", { className: 'passkey-recovery-view__resend-code', children: [jsx(Typography, { color: 'secondary', variant: 'body_small', copykey: `${translationKey}.code.resend.text`, children: t(`${translationKey}.code.resend.text`) }), jsx(Typography, { variant: 'body_small', color: 'link', copykey: `${translationKey}.code.resend.button`, children: jsx(TextButton, { "data-testid": 'resend-email-button', onClick: handleResentEmail, disabled: resendingCode || isLoading || (bundleInput.length > 0 && !error), children: t(`${translationKey}.code.resend.button`) }) })] })] })] }));
161
174
  };
162
175
 
163
176
  export { PasskeyBundleRecovery };
@@ -37,6 +37,8 @@ require('../../../../context/EmailVerificationContext/EmailVerificationContext.c
37
37
  require('react-dom');
38
38
  require('../../../../context/ThemeContext/ThemeContext.cjs');
39
39
  var useMutation = require('../../../../utils/hooks/useMutation/useMutation.cjs');
40
+ var passkeyRecovery = require('../../utils/passkeyRecovery/passkeyRecovery.cjs');
41
+ var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
40
42
  require('@dynamic-labs/types');
41
43
  require('yup');
42
44
  require('../../../../context/MockContext/MockContext.cjs');
@@ -50,7 +52,6 @@ require('../../../../components/Transition/OpacityTransition/OpacityTransition.c
50
52
  require('../../../../components/ShadowDOM/ShadowDOM.cjs');
51
53
  require('../../../../components/OverlayCard/OverlayCard.context.cjs');
52
54
  require('../../../../context/FooterAnimationContext/index.cjs');
53
- var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
54
55
  var Typography = require('../../../../components/Typography/Typography.cjs');
55
56
  require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
56
57
  require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
@@ -66,9 +67,10 @@ var Button = require('../../../../components/Button/Button.cjs');
66
67
  require('../../../../components/IconButton/IconButton.cjs');
67
68
  require('../../../../components/Alert/Alert.cjs');
68
69
  var PasskeyCreatedSuccessBanner = require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
69
- require('@dynamic-labs/viem-utils');
70
70
  require('../../../../context/PasskeyContext/PasskeyContext.cjs');
71
+ require('@dynamic-labs/viem-utils');
71
72
  require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
73
+ var PasskeyDeviceIcon = require('../../PasskeyDeviceIcon/PasskeyDeviceIcon.cjs');
72
74
  var getProperErrorMessage = require('../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.cjs');
73
75
  require('../../../../components/InlineWidget/InlineWidget.cjs');
74
76
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
@@ -79,8 +81,6 @@ require('../../../WalletList/WalletList.cjs');
79
81
  require('@hcaptcha/react-hcaptcha');
80
82
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
81
83
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
82
- var PasskeyDeviceIcon = require('../../PasskeyDeviceIcon/PasskeyDeviceIcon.cjs');
83
- var passkeyRecovery = require('../../utils/passkeyRecovery/passkeyRecovery.cjs');
84
84
 
85
85
  const PasskeyCompleteRecovery = () => {
86
86
  const { authToken, primaryWallet, environmentId, user, setShowAuthFlow, setUser, setPasskeySuccessPopup, } = useInternalDynamicContext.useInternalDynamicContext();
@@ -121,7 +121,7 @@ const PasskeyCompleteRecovery = () => {
121
121
  : 'dyn_passkey_recovery';
122
122
  return (jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [jsxRuntime.jsx("div", { className: 'passkey-recovery-view__header', children: jsxRuntime.jsx(passkeyIntroIcon.ReactComponent, {}) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.complete.description`) }), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Button.Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', dataTestId: 'passkey-recovery-complete-button', onClick: () => completeRecovery(), disabled: isLoading, showInternalLoading: false, typographyProps: {
123
123
  color: 'inherit',
124
- }, children: jsxRuntime.jsxs("div", { className: 'passkey-recovery-view__inline-button', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, {}), jsxRuntime.jsx(Typography.Typography, { children: t(`${translationKey}.complete.complete_button`) })] }) }) }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {})] }));
124
+ }, children: jsxRuntime.jsxs("div", { className: 'passkey-recovery-view__inline-button', children: [jsxRuntime.jsx(PasskeyDeviceIcon.PasskeyDeviceIcon, { size: 'small' }), jsxRuntime.jsx(Typography.Typography, { children: t(`${translationKey}.complete.complete_button`) })] }) }) }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, { isRecoveryFlow: true })] }));
125
125
  };
126
126
 
127
127
  exports.PasskeyCompleteRecovery = PasskeyCompleteRecovery;
@@ -33,6 +33,8 @@ import '../../../../context/EmailVerificationContext/EmailVerificationContext.js
33
33
  import 'react-dom';
34
34
  import '../../../../context/ThemeContext/ThemeContext.js';
35
35
  import { useMutation } from '../../../../utils/hooks/useMutation/useMutation.js';
36
+ import { completePasskeyRecovery } from '../../utils/passkeyRecovery/passkeyRecovery.js';
37
+ import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
36
38
  import '@dynamic-labs/types';
37
39
  import 'yup';
38
40
  import '../../../../context/MockContext/MockContext.js';
@@ -46,7 +48,6 @@ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js
46
48
  import '../../../../components/ShadowDOM/ShadowDOM.js';
47
49
  import '../../../../components/OverlayCard/OverlayCard.context.js';
48
50
  import '../../../../context/FooterAnimationContext/index.js';
49
- import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
50
51
  import { Typography } from '../../../../components/Typography/Typography.js';
51
52
  import '../../../../context/WalletGroupContext/WalletGroupContext.js';
52
53
  import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
@@ -62,9 +63,10 @@ import { Button } from '../../../../components/Button/Button.js';
62
63
  import '../../../../components/IconButton/IconButton.js';
63
64
  import '../../../../components/Alert/Alert.js';
64
65
  import { PasskeySuccessEnum } from '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
65
- import '@dynamic-labs/viem-utils';
66
66
  import '../../../../context/PasskeyContext/PasskeyContext.js';
67
+ import '@dynamic-labs/viem-utils';
67
68
  import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
69
+ import { PasskeyDeviceIcon } from '../../PasskeyDeviceIcon/PasskeyDeviceIcon.js';
68
70
  import { getProperErrorMessage } from '../../../../modals/SignMessageConfirmationModal/getProperErrorMessage.js';
69
71
  import '../../../../components/InlineWidget/InlineWidget.js';
70
72
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
@@ -75,8 +77,6 @@ import '../../../WalletList/WalletList.js';
75
77
  import '@hcaptcha/react-hcaptcha';
76
78
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
77
79
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
78
- import { PasskeyDeviceIcon } from '../../PasskeyDeviceIcon/PasskeyDeviceIcon.js';
79
- import { completePasskeyRecovery } from '../../utils/passkeyRecovery/passkeyRecovery.js';
80
80
 
81
81
  const PasskeyCompleteRecovery = () => {
82
82
  const { authToken, primaryWallet, environmentId, user, setShowAuthFlow, setUser, setPasskeySuccessPopup, } = useInternalDynamicContext();
@@ -117,7 +117,7 @@ const PasskeyCompleteRecovery = () => {
117
117
  : 'dyn_passkey_recovery';
118
118
  return (jsxs("div", { className: 'passkey-recovery-view', children: [jsx("div", { className: 'passkey-recovery-view__header', children: jsx(SvgPasskeyIntroIcon, {}) }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.complete.description`) }), errorText && jsx(ErrorContainer, { children: errorText }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Button, { buttonVariant: 'brand-primary', buttonPadding: 'large', dataTestId: 'passkey-recovery-complete-button', onClick: () => completeRecovery(), disabled: isLoading, showInternalLoading: false, typographyProps: {
119
119
  color: 'inherit',
120
- }, children: jsxs("div", { className: 'passkey-recovery-view__inline-button', children: [jsx(PasskeyDeviceIcon, {}), jsx(Typography, { children: t(`${translationKey}.complete.complete_button`) })] }) }) }), jsx(NeedHelpSection, {})] }));
120
+ }, children: jsxs("div", { className: 'passkey-recovery-view__inline-button', children: [jsx(PasskeyDeviceIcon, { size: 'small' }), jsx(Typography, { children: t(`${translationKey}.complete.complete_button`) })] }) }) }), jsx(NeedHelpSection, { isRecoveryFlow: true })] }));
121
121
  };
122
122
 
123
123
  export { PasskeyCompleteRecovery };
@@ -2,18 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _tslib = require('../../../../../../_virtual/_tslib.cjs');
6
5
  var jsxRuntime = require('react/jsx-runtime');
7
6
  var React = require('react');
8
7
  var reactI18next = require('react-i18next');
9
8
  var utils = require('@dynamic-labs/utils');
10
- var dynamicEvents = require('../../../../events/dynamicEvents.cjs');
9
+ require('../../../../events/dynamicEvents.cjs');
10
+ require('../../../../../../_virtual/_tslib.cjs');
11
11
  require('../../../../context/DynamicContext/DynamicContext.cjs');
12
12
  require('@dynamic-labs/sdk-api');
13
- var logger = require('../../../../shared/logger.cjs');
13
+ require('../../../../shared/logger.cjs');
14
14
  require('@dynamic-labs/iconic');
15
15
  require('@dynamic-labs/wallet-connector-core');
16
- var ViewContext = require('../../../../context/ViewContext/ViewContext.cjs');
16
+ require('../../../../context/ViewContext/ViewContext.cjs');
17
17
  var close = require('../../../../shared/assets/close.cjs');
18
18
  var signInWithEmail = require('../../../../shared/assets/sign-in-with-email.cjs');
19
19
  require('@dynamic-labs/wallet-book');
@@ -25,9 +25,7 @@ require('../../../../shared/consts/index.cjs');
25
25
  var useInternalDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.cjs');
26
26
  require('../../../../context/CaptchaContext/CaptchaContext.cjs');
27
27
  require('../../../../context/ErrorContext/ErrorContext.cjs');
28
- var createOwnerWallet = require('../../../../utils/functions/createOwnerWallet/createOwnerWallet.cjs');
29
28
  require('@dynamic-labs/multi-wallet');
30
- var isAccountAbstractionWallet = require('../../../../utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.cjs');
31
29
  require('viem/chains');
32
30
  require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
33
31
  require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
@@ -36,8 +34,9 @@ require('../../../../context/EmailVerificationContext/EmailVerificationContext.c
36
34
  require('react-dom');
37
35
  var useElementById = require('../../../../utils/hooks/useElementById/useElementById.cjs');
38
36
  require('../../../../context/ThemeContext/ThemeContext.cjs');
39
- var useMutation = require('../../../../utils/hooks/useMutation/useMutation.cjs');
40
37
  var constants = require('../constants.cjs');
38
+ var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
39
+ var useInitEmbeddedWalletAuthMethod = require('../../../../utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.cjs');
41
40
  require('@dynamic-labs/types');
42
41
  require('yup');
43
42
  require('../../../../context/MockContext/MockContext.cjs');
@@ -51,7 +50,6 @@ require('../../../../components/Transition/OpacityTransition/OpacityTransition.c
51
50
  require('../../../../components/ShadowDOM/ShadowDOM.cjs');
52
51
  require('../../../../components/OverlayCard/OverlayCard.context.cjs');
53
52
  require('../../../../context/FooterAnimationContext/index.cjs');
54
- var useIsTurnkeyWallet = require('../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
55
53
  var Typography = require('../../../../components/Typography/Typography.cjs');
56
54
  require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
57
55
  require('../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
@@ -70,8 +68,8 @@ var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
70
68
  var IconButton = require('../../../../components/IconButton/IconButton.cjs');
71
69
  require('../../../../components/Alert/Alert.cjs');
72
70
  require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
73
- require('@dynamic-labs/viem-utils');
74
71
  require('../../../../context/PasskeyContext/PasskeyContext.cjs');
72
+ require('@dynamic-labs/viem-utils');
75
73
  require('../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
76
74
  require('../../../../components/InlineWidget/InlineWidget.cjs');
77
75
  require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
@@ -82,32 +80,13 @@ require('../../../WalletList/WalletList.cjs');
82
80
  require('@hcaptcha/react-hcaptcha');
83
81
  require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
84
82
  require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
85
- var passkeyRecovery = require('../../utils/passkeyRecovery/passkeyRecovery.cjs');
86
83
 
87
- const PasskeyInitRecovery = () => {
88
- const { authToken, primaryWallet, environmentId, setShowAuthFlow, user } = useInternalDynamicContext.useInternalDynamicContext();
84
+ const PasskeyInitRecovery = ({ authenticatorType, }) => {
85
+ const { setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
89
86
  const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
90
- const { setView } = ViewContext.useViewContext();
87
+ const { initAuthMethod, isLoading, error } = useInitEmbeddedWalletAuthMethod.useInitEmbeddedWalletAuthMethod();
91
88
  const iframeContainerRef = useElementById.useElementById(constants.iframeContainerId);
92
89
  const { t } = reactI18next.useTranslation();
93
- const { mutate: initRecovery, isLoading, error, } = useMutation.useMutation(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
94
- const wallet = isAccountAbstractionWallet.isAccountAbstractionWallet(primaryWallet)
95
- ? createOwnerWallet.createOwnerWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || [])
96
- : primaryWallet;
97
- yield passkeyRecovery.initPasskeyRecovery({
98
- authToken,
99
- environmentId,
100
- iframeContainer: iframeContainerRef.current,
101
- iframeElementId: constants.iframeElementId,
102
- wallet,
103
- });
104
- setView('passkey-recovery-bundle');
105
- }), {
106
- onFailure: (err) => {
107
- logger.logger.error('Failed to init passkey recovery', err);
108
- dynamicEvents.dynamicEvents.emit('passkeyRecoveryFailed', err);
109
- },
110
- });
111
90
  const errorText = React.useMemo(() => {
112
91
  if (!error) {
113
92
  return undefined;
@@ -122,7 +101,10 @@ const PasskeyInitRecovery = () => {
122
101
  ? 'dyn_passkey_secure_modal'
123
102
  : 'dyn_passkey_recovery';
124
103
  const closeButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), "data-testid": 'close-button', children: jsxRuntime.jsx(close.ReactComponent, {}) }));
125
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Button.Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initRecovery(), disabled: isLoading, showInternalLoading: false, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Typography.Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, {})] })] }));
104
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, children: jsxRuntime.jsx(Typography.Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxRuntime.jsxs("div", { className: 'passkey-recovery-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: errorText }), jsxRuntime.jsx("div", { className: 'passkey-recovery-view__actions', children: jsxRuntime.jsx(Button.Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initAuthMethod({
105
+ authenticatorType,
106
+ iframeContainer: iframeContainerRef.current,
107
+ }), disabled: isLoading, showInternalLoading: false, children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Typography.Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, { isRecoveryFlow: true })] })] }));
126
108
  };
127
109
 
128
110
  exports.PasskeyInitRecovery = PasskeyInitRecovery;
@@ -1,2 +1,7 @@
1
1
  import { FC } from 'react';
2
- export declare const PasskeyInitRecovery: FC;
2
+ import { AuthenticatorType } from '@dynamic-labs/wallet-connector-core';
3
+ interface PasskeyInitRecoveryProps {
4
+ authenticatorType: AuthenticatorType;
5
+ }
6
+ export declare const PasskeyInitRecovery: FC<PasskeyInitRecoveryProps>;
7
+ export {};
@@ -1,15 +1,15 @@
1
- import { __awaiter } from '../../../../../../_virtual/_tslib.js';
2
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
2
  import { useMemo } from 'react';
4
3
  import { useTranslation } from 'react-i18next';
5
4
  import { DynamicError } from '@dynamic-labs/utils';
6
- import { dynamicEvents } from '../../../../events/dynamicEvents.js';
5
+ import '../../../../events/dynamicEvents.js';
6
+ import '../../../../../../_virtual/_tslib.js';
7
7
  import '../../../../context/DynamicContext/DynamicContext.js';
8
8
  import '@dynamic-labs/sdk-api';
9
- import { logger } from '../../../../shared/logger.js';
9
+ import '../../../../shared/logger.js';
10
10
  import '@dynamic-labs/iconic';
11
11
  import '@dynamic-labs/wallet-connector-core';
12
- import { useViewContext } from '../../../../context/ViewContext/ViewContext.js';
12
+ import '../../../../context/ViewContext/ViewContext.js';
13
13
  import { ReactComponent as SvgClose } from '../../../../shared/assets/close.js';
14
14
  import { ReactComponent as SvgSignInWithEmail } from '../../../../shared/assets/sign-in-with-email.js';
15
15
  import '@dynamic-labs/wallet-book';
@@ -21,9 +21,7 @@ import '../../../../shared/consts/index.js';
21
21
  import { useInternalDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext.js';
22
22
  import '../../../../context/CaptchaContext/CaptchaContext.js';
23
23
  import '../../../../context/ErrorContext/ErrorContext.js';
24
- import { createOwnerWallet } from '../../../../utils/functions/createOwnerWallet/createOwnerWallet.js';
25
24
  import '@dynamic-labs/multi-wallet';
26
- import { isAccountAbstractionWallet } from '../../../../utils/functions/isAccountAbstractionWallet/isAccountAbstractionWallet.js';
27
25
  import 'viem/chains';
28
26
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
29
27
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
@@ -32,8 +30,9 @@ import '../../../../context/EmailVerificationContext/EmailVerificationContext.js
32
30
  import 'react-dom';
33
31
  import { useElementById } from '../../../../utils/hooks/useElementById/useElementById.js';
34
32
  import '../../../../context/ThemeContext/ThemeContext.js';
35
- import { useMutation } from '../../../../utils/hooks/useMutation/useMutation.js';
36
- import { iframeContainerId, iframeElementId } from '../constants.js';
33
+ import { iframeContainerId } from '../constants.js';
34
+ import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
35
+ import { useInitEmbeddedWalletAuthMethod } from '../../../../utils/hooks/useInitEmbeddedWalletAuthMethod/useInitEmbeddedWalletAuthMethod.js';
37
36
  import '@dynamic-labs/types';
38
37
  import 'yup';
39
38
  import '../../../../context/MockContext/MockContext.js';
@@ -47,7 +46,6 @@ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js
47
46
  import '../../../../components/ShadowDOM/ShadowDOM.js';
48
47
  import '../../../../components/OverlayCard/OverlayCard.context.js';
49
48
  import '../../../../context/FooterAnimationContext/index.js';
50
- import { useIsTurnkeyWallet } from '../../../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
51
49
  import { Typography } from '../../../../components/Typography/Typography.js';
52
50
  import '../../../../context/WalletGroupContext/WalletGroupContext.js';
53
51
  import '../../../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
@@ -66,8 +64,8 @@ import { ModalHeader } from '../../../../components/ModalHeader/ModalHeader.js';
66
64
  import { IconButton } from '../../../../components/IconButton/IconButton.js';
67
65
  import '../../../../components/Alert/Alert.js';
68
66
  import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
69
- import '@dynamic-labs/viem-utils';
70
67
  import '../../../../context/PasskeyContext/PasskeyContext.js';
68
+ import '@dynamic-labs/viem-utils';
71
69
  import '../../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
72
70
  import '../../../../components/InlineWidget/InlineWidget.js';
73
71
  import '../../../../components/MenuList/Dropdown/Dropdown.js';
@@ -78,32 +76,13 @@ import '../../../WalletList/WalletList.js';
78
76
  import '@hcaptcha/react-hcaptcha';
79
77
  import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
80
78
  import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
81
- import { initPasskeyRecovery } from '../../utils/passkeyRecovery/passkeyRecovery.js';
82
79
 
83
- const PasskeyInitRecovery = () => {
84
- const { authToken, primaryWallet, environmentId, setShowAuthFlow, user } = useInternalDynamicContext();
80
+ const PasskeyInitRecovery = ({ authenticatorType, }) => {
81
+ const { setShowAuthFlow } = useInternalDynamicContext();
85
82
  const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
86
- const { setView } = useViewContext();
83
+ const { initAuthMethod, isLoading, error } = useInitEmbeddedWalletAuthMethod();
87
84
  const iframeContainerRef = useElementById(iframeContainerId);
88
85
  const { t } = useTranslation();
89
- const { mutate: initRecovery, isLoading, error, } = useMutation(() => __awaiter(void 0, void 0, void 0, function* () {
90
- const wallet = isAccountAbstractionWallet(primaryWallet)
91
- ? createOwnerWallet(primaryWallet, (user === null || user === void 0 ? void 0 : user.verifiedCredentials) || [])
92
- : primaryWallet;
93
- yield initPasskeyRecovery({
94
- authToken,
95
- environmentId,
96
- iframeContainer: iframeContainerRef.current,
97
- iframeElementId,
98
- wallet,
99
- });
100
- setView('passkey-recovery-bundle');
101
- }), {
102
- onFailure: (err) => {
103
- logger.error('Failed to init passkey recovery', err);
104
- dynamicEvents.emit('passkeyRecoveryFailed', err);
105
- },
106
- });
107
86
  const errorText = useMemo(() => {
108
87
  if (!error) {
109
88
  return undefined;
@@ -118,7 +97,10 @@ const PasskeyInitRecovery = () => {
118
97
  ? 'dyn_passkey_secure_modal'
119
98
  : 'dyn_passkey_recovery';
120
99
  const closeButton = (jsx(IconButton, { type: 'button', onClick: () => setShowAuthFlow(false, { emitCancelAuth: true }), "data-testid": 'close-button', children: jsx(SvgClose, {}) }));
121
- return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxs("div", { className: 'passkey-recovery-view', children: [jsx(IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsx(ErrorContainer, { children: errorText }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initRecovery(), disabled: isLoading, showInternalLoading: false, children: jsx("div", { children: jsx(Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsx(NeedHelpSection, {})] })] }));
100
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, children: jsx(Typography, { as: 'h1', variant: 'title', color: 'primary', "data-testid": 'dynamic-auth-modal-heading', className: 'header__typography', children: t(`${translationKey}.start.title`) }) }), jsxs("div", { className: 'passkey-recovery-view', children: [jsx(IconWithSpinner, { Icon: EmailIcon, isSpinning: isLoading, iconSize: 96 }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'passkey-recovery-view__subtitle', children: t(`${translationKey}.start.description`) }), errorText && jsx(ErrorContainer, { children: errorText }), jsx("div", { className: 'passkey-recovery-view__actions', children: jsx(Button, { buttonPadding: 'large', dataTestId: 'passkey-recovery-button', onClick: () => initAuthMethod({
101
+ authenticatorType,
102
+ iframeContainer: iframeContainerRef.current,
103
+ }), disabled: isLoading, showInternalLoading: false, children: jsx("div", { children: jsx(Typography, { children: t(`${translationKey}.start.start_button`) }) }) }) }), jsx(NeedHelpSection, { isRecoveryFlow: true })] })] }));
122
104
  };
123
105
 
124
106
  export { PasskeyInitRecovery };
@@ -62,8 +62,8 @@ var ModalHeader = require('../../../components/ModalHeader/ModalHeader.cjs');
62
62
  var IconButton = require('../../../components/IconButton/IconButton.cjs');
63
63
  require('../../../components/Alert/Alert.cjs');
64
64
  var PasskeyCreatedSuccessBanner = require('../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
65
- require('@dynamic-labs/viem-utils');
66
65
  var PasskeyContext = require('../../../context/PasskeyContext/PasskeyContext.cjs');
66
+ require('@dynamic-labs/viem-utils');
67
67
  require('../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
68
68
  require('../../../components/InlineWidget/InlineWidget.cjs');
69
69
  var Input = require('../../../components/Input/Input.cjs');
@@ -58,8 +58,8 @@ import { ModalHeader } from '../../../components/ModalHeader/ModalHeader.js';
58
58
  import { IconButton } from '../../../components/IconButton/IconButton.js';
59
59
  import '../../../components/Alert/Alert.js';
60
60
  import { PasskeySuccessEnum } from '../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
61
- import '@dynamic-labs/viem-utils';
62
61
  import { usePasskeyContext } from '../../../context/PasskeyContext/PasskeyContext.js';
62
+ import '@dynamic-labs/viem-utils';
63
63
  import '../../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
64
64
  import '../../../components/InlineWidget/InlineWidget.js';
65
65
  import { Input } from '../../../components/Input/Input.js';
@@ -1,3 +1,5 @@
1
1
  export * from './PasskeyIntroView';
2
2
  export * from './PasskeyRecovery';
3
3
  export * from './RenamePasskeyView';
4
+ export * from './EmbeddedAuthChoice';
5
+ export * from './PasskeyNewDomainDetectedView';