@dynamic-labs-sdk/client 1.18.0 → 1.19.0

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 (247) hide show
  1. package/dist/client/createDynamicClient/createDynamicClient.d.ts +11 -1
  2. package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
  3. package/dist/client/defaultClient/defaultClient.d.ts +12 -1
  4. package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
  5. package/dist/core.cjs +5 -5
  6. package/dist/core.esm.js +7 -7
  7. package/dist/core.esm.js.map +1 -1
  8. package/dist/core.native.esm.js +7 -7
  9. package/dist/core.native.esm.js.map +1 -1
  10. package/dist/errors/APIError/APIError.d.ts +11 -1
  11. package/dist/errors/APIError/APIError.d.ts.map +1 -1
  12. package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts +21 -0
  13. package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts.map +1 -1
  14. package/dist/errors/MergeAccountsConfirmationError.d.ts +49 -0
  15. package/dist/errors/MergeAccountsConfirmationError.d.ts.map +1 -0
  16. package/dist/errors/WalletScreeningBlockedError.d.ts +13 -0
  17. package/dist/errors/WalletScreeningBlockedError.d.ts.map +1 -1
  18. package/dist/exports/index.d.ts +15 -5
  19. package/dist/exports/index.d.ts.map +1 -1
  20. package/dist/exports/waas.d.ts +2 -0
  21. package/dist/exports/waas.d.ts.map +1 -1
  22. package/dist/{getNetworkProviderFromNetworkId-CMIgKqEH.cjs → getNetworkProviderFromNetworkId-BJX2AMGR.cjs} +74 -4
  23. package/dist/getNetworkProviderFromNetworkId-BJX2AMGR.cjs.map +1 -0
  24. package/dist/{getNetworkProviderFromNetworkId-C6DBO0OX.native.esm.js → getNetworkProviderFromNetworkId-Bsv12Q6B.native.esm.js} +90 -9
  25. package/dist/getNetworkProviderFromNetworkId-Bsv12Q6B.native.esm.js.map +1 -0
  26. package/dist/{getNetworkProviderFromNetworkId-CEs4SGW4.esm.js → getNetworkProviderFromNetworkId-D3uwhdMN.esm.js} +72 -8
  27. package/dist/getNetworkProviderFromNetworkId-D3uwhdMN.esm.js.map +1 -0
  28. package/dist/{getSignedSessionId-De_N_Ofg.cjs → getSignedSessionId-BIZJGg61.cjs} +3 -3
  29. package/dist/{getSignedSessionId-De_N_Ofg.cjs.map → getSignedSessionId-BIZJGg61.cjs.map} +1 -1
  30. package/dist/{getSignedSessionId-CUqILBh8.esm.js → getSignedSessionId-CnSAMO3P.esm.js} +3 -3
  31. package/dist/{getSignedSessionId-CUqILBh8.esm.js.map → getSignedSessionId-CnSAMO3P.esm.js.map} +1 -1
  32. package/dist/{getSignedSessionId-Hp1nSbaW.native.esm.js → getSignedSessionId-DXDi7NkE.native.esm.js} +3 -3
  33. package/dist/{getSignedSessionId-Hp1nSbaW.native.esm.js.map → getSignedSessionId-DXDi7NkE.native.esm.js.map} +1 -1
  34. package/dist/{getWalletProviderByKey-D3e0XMjs.cjs → getWalletProviderByKey-C6aS7KgD.cjs} +2 -2
  35. package/dist/{getWalletProviderByKey-D3e0XMjs.cjs.map → getWalletProviderByKey-C6aS7KgD.cjs.map} +1 -1
  36. package/dist/{getWalletProviderByKey-CKORCA8l.esm.js → getWalletProviderByKey-Cr8m-Nax.esm.js} +2 -2
  37. package/dist/{getWalletProviderByKey-CKORCA8l.esm.js.map → getWalletProviderByKey-Cr8m-Nax.esm.js.map} +1 -1
  38. package/dist/{getWalletProviderByKey-D5M801xH.native.esm.js → getWalletProviderByKey-DVk2t98D.native.esm.js} +2 -2
  39. package/dist/{getWalletProviderByKey-D5M801xH.native.esm.js.map → getWalletProviderByKey-DVk2t98D.native.esm.js.map} +1 -1
  40. package/dist/index.cjs +732 -54
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.esm.js +729 -53
  43. package/dist/index.esm.js.map +1 -1
  44. package/dist/index.native.esm.js +656 -52
  45. package/dist/index.native.esm.js.map +1 -1
  46. package/dist/{isDynamicWaasEnabled-BQuXZne_.cjs → isDynamicWaasEnabled-BawttOeb.cjs} +20 -6
  47. package/dist/isDynamicWaasEnabled-BawttOeb.cjs.map +1 -0
  48. package/dist/{isDynamicWaasEnabled-BlVIlXMZ.esm.js → isDynamicWaasEnabled-DDrg89y1.esm.js} +19 -5
  49. package/dist/isDynamicWaasEnabled-DDrg89y1.esm.js.map +1 -0
  50. package/dist/{isDynamicWaasEnabled-BaY09iv6.native.esm.js → isDynamicWaasEnabled-Dj_sLoBO.native.esm.js} +19 -5
  51. package/dist/isDynamicWaasEnabled-Dj_sLoBO.native.esm.js.map +1 -0
  52. package/dist/{isMfaRequiredForAction-Dghiguch.cjs → isMfaRequiredForAction-BuvyBN_r.cjs} +19 -2
  53. package/dist/isMfaRequiredForAction-BuvyBN_r.cjs.map +1 -0
  54. package/dist/{isMfaRequiredForAction-r9aDdmK5.esm.js → isMfaRequiredForAction-DTp4CZBt.esm.js} +19 -2
  55. package/dist/isMfaRequiredForAction-DTp4CZBt.esm.js.map +1 -0
  56. package/dist/{isMfaRequiredForAction-CwOGwiDz.native.esm.js → isMfaRequiredForAction-EY-OQORc.native.esm.js} +2 -2
  57. package/dist/{isMfaRequiredForAction-CwOGwiDz.native.esm.js.map → isMfaRequiredForAction-EY-OQORc.native.esm.js.map} +1 -1
  58. package/dist/{isUserOnboardingComplete-j4b_q9Pf.cjs → isUserOnboardingComplete-CkyzRYrg.cjs} +11 -4
  59. package/dist/{isUserOnboardingComplete-j4b_q9Pf.cjs.map → isUserOnboardingComplete-CkyzRYrg.cjs.map} +1 -1
  60. package/dist/{isUserOnboardingComplete-C-ioFLRR.native.esm.js → isUserOnboardingComplete-D3HrBYje.native.esm.js} +10 -3
  61. package/dist/{isUserOnboardingComplete-C-ioFLRR.native.esm.js.map → isUserOnboardingComplete-D3HrBYje.native.esm.js.map} +1 -1
  62. package/dist/{isUserOnboardingComplete-BMNAbXk1.esm.js → isUserOnboardingComplete-Dy2Ygp0u.esm.js} +10 -3
  63. package/dist/{isUserOnboardingComplete-BMNAbXk1.esm.js.map → isUserOnboardingComplete-Dy2Ygp0u.esm.js.map} +1 -1
  64. package/dist/{migrateFromFireblocks-D8Y5h0hz.native.esm.js → migrateFromFireblocks-B5qWGLCM.native.esm.js} +3 -3
  65. package/dist/{migrateFromFireblocks-D8Y5h0hz.native.esm.js.map → migrateFromFireblocks-B5qWGLCM.native.esm.js.map} +1 -1
  66. package/dist/{migrateFromFireblocks-D9pJIgt5.cjs → migrateFromFireblocks-Dp-QA9hi.cjs} +3 -3
  67. package/dist/{migrateFromFireblocks-D9pJIgt5.cjs.map → migrateFromFireblocks-Dp-QA9hi.cjs.map} +1 -1
  68. package/dist/{migrateFromFireblocks-D--uqWp5.esm.js → migrateFromFireblocks-MAatsk_w.esm.js} +3 -3
  69. package/dist/{migrateFromFireblocks-D--uqWp5.esm.js.map → migrateFromFireblocks-MAatsk_w.esm.js.map} +1 -1
  70. package/dist/modules/apiClient/constants.d.ts +8 -0
  71. package/dist/modules/apiClient/constants.d.ts.map +1 -1
  72. package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
  73. package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts +11 -1
  74. package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts.map +1 -1
  75. package/dist/modules/auth/isSignedIn/isSignedIn.d.ts +9 -0
  76. package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
  77. package/dist/modules/auth/logout/logout.d.ts +13 -0
  78. package/dist/modules/auth/logout/logout.d.ts.map +1 -1
  79. package/dist/modules/auth/mergeUserAccounts/index.d.ts +3 -0
  80. package/dist/modules/auth/mergeUserAccounts/index.d.ts.map +1 -0
  81. package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.d.ts +62 -0
  82. package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.d.ts.map +1 -0
  83. package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.types.d.ts +78 -0
  84. package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.types.d.ts.map +1 -0
  85. package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +7 -0
  86. package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
  87. package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +9 -0
  88. package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
  89. package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts +8 -0
  90. package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map +1 -1
  91. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts +34 -0
  92. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts.map +1 -0
  93. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/index.d.ts +2 -0
  94. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/index.d.ts.map +1 -0
  95. package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts +11 -0
  96. package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts.map +1 -1
  97. package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +0 -1
  98. package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts.map +1 -1
  99. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts +12 -0
  100. package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts.map +1 -1
  101. package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts +10 -0
  102. package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts.map +1 -1
  103. package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
  104. package/dist/modules/captcha/CaptchaProviderEnum/CaptchaProviderEnum.d.ts +37 -0
  105. package/dist/modules/captcha/CaptchaProviderEnum/CaptchaProviderEnum.d.ts.map +1 -0
  106. package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts +41 -5
  107. package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts.map +1 -1
  108. package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.types.d.ts +22 -0
  109. package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.types.d.ts.map +1 -0
  110. package/dist/modules/captcha/getCaptchaSettings/index.d.ts +1 -1
  111. package/dist/modules/captcha/getCaptchaSettings/index.d.ts.map +1 -1
  112. package/dist/modules/clientEvents/clientEvents.d.ts +34 -0
  113. package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
  114. package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/clearDeviceRegistrationRedirectParams.d.ts +35 -0
  115. package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/clearDeviceRegistrationRedirectParams.d.ts.map +1 -0
  116. package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/index.d.ts +2 -0
  117. package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/index.d.ts.map +1 -0
  118. package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts +8 -1
  119. package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts.map +1 -1
  120. package/dist/modules/flow/cancelFlow/cancelFlow.d.ts +10 -3
  121. package/dist/modules/flow/cancelFlow/cancelFlow.d.ts.map +1 -1
  122. package/dist/modules/flow/getFlow/getFlow.d.ts +11 -3
  123. package/dist/modules/flow/getFlow/getFlow.d.ts.map +1 -1
  124. package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts +16 -3
  125. package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts.map +1 -1
  126. package/dist/modules/initializeClient/initializeClient.d.ts +16 -0
  127. package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
  128. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +12 -2
  129. package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts.map +1 -1
  130. package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts +14 -0
  131. package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts.map +1 -1
  132. package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts +12 -0
  133. package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts.map +1 -1
  134. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +33 -1
  135. package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
  136. package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts +1 -1
  137. package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts.map +1 -1
  138. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +8 -0
  139. package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
  140. package/dist/modules/user/checkUserScopes/checkUserScopes.d.ts +28 -0
  141. package/dist/modules/user/checkUserScopes/checkUserScopes.d.ts.map +1 -0
  142. package/dist/modules/user/checkUserScopes/index.d.ts +2 -0
  143. package/dist/modules/user/checkUserScopes/index.d.ts.map +1 -0
  144. package/dist/modules/user/deleteUser/deleteUser.d.ts +8 -0
  145. package/dist/modules/user/deleteUser/deleteUser.d.ts.map +1 -1
  146. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +8 -1
  147. package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
  148. package/dist/modules/user/refreshAuth/refreshAuth.d.ts +17 -3
  149. package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
  150. package/dist/modules/user/refreshUser/refreshUser.d.ts +16 -3
  151. package/dist/modules/user/refreshUser/refreshUser.d.ts.map +1 -1
  152. package/dist/modules/user/user.types.d.ts +9 -1
  153. package/dist/modules/user/user.types.d.ts.map +1 -1
  154. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts +30 -0
  155. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts.map +1 -0
  156. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts +2 -0
  157. package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts.map +1 -0
  158. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts +23 -0
  159. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts.map +1 -0
  160. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts +2 -0
  161. package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts.map +1 -0
  162. package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts +11 -1
  163. package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts.map +1 -1
  164. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +11 -3
  165. package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
  166. package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts +16 -3
  167. package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts.map +1 -1
  168. package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +9 -1
  169. package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts.map +1 -1
  170. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +11 -1
  171. package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts.map +1 -1
  172. package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +9 -0
  173. package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts.map +1 -1
  174. package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts +10 -2
  175. package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts.map +1 -1
  176. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +8 -0
  177. package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
  178. package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +8 -0
  179. package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -1
  180. package/dist/modules/wallets/networks/switchActiveNetwork/switchActiveNetwork.d.ts +11 -1
  181. package/dist/modules/wallets/networks/switchActiveNetwork/switchActiveNetwork.d.ts.map +1 -1
  182. package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts +10 -0
  183. package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts.map +1 -1
  184. package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts +9 -1
  185. package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts.map +1 -1
  186. package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +24 -0
  187. package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts.map +1 -0
  188. package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/index.d.ts.map +1 -0
  189. package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/getSelectedWalletAccount.d.ts +30 -0
  190. package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/getSelectedWalletAccount.d.ts.map +1 -0
  191. package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/index.d.ts +2 -0
  192. package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/index.d.ts.map +1 -0
  193. package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/index.d.ts.map +1 -0
  194. package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts +28 -0
  195. package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts.map +1 -0
  196. package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/index.d.ts +2 -0
  197. package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/index.d.ts.map +1 -0
  198. package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/setSelectedWalletAccount.d.ts +34 -0
  199. package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/setSelectedWalletAccount.d.ts.map +1 -0
  200. package/dist/modules/wallets/signMessage/signMessage.d.ts +12 -1
  201. package/dist/modules/wallets/signMessage/signMessage.d.ts.map +1 -1
  202. package/dist/modules/wallets/transferAmount/transferAmount.d.ts +13 -2
  203. package/dist/modules/wallets/transferAmount/transferAmount.d.ts.map +1 -1
  204. package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts +10 -1
  205. package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts.map +1 -1
  206. package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts +11 -1
  207. package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts.map +1 -1
  208. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +1 -0
  209. package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
  210. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts +12 -1
  211. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts.map +1 -1
  212. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  213. package/dist/{updateAuthFromVerifyResponse-wVY_DoiL.native.esm.js → updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js} +93 -17
  214. package/dist/updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js.map +1 -0
  215. package/dist/{updateAuthFromVerifyResponse-BQes11vz.esm.js → updateAuthFromVerifyResponse-_oYRLK_w.esm.js} +93 -17
  216. package/dist/updateAuthFromVerifyResponse-_oYRLK_w.esm.js.map +1 -0
  217. package/dist/{updateAuthFromVerifyResponse-Deg9em9o.cjs → updateAuthFromVerifyResponse-pgYXvDvj.cjs} +93 -17
  218. package/dist/updateAuthFromVerifyResponse-pgYXvDvj.cjs.map +1 -0
  219. package/dist/waas.cjs +72 -5
  220. package/dist/waas.cjs.map +1 -1
  221. package/dist/waas.esm.js +70 -5
  222. package/dist/waas.esm.js.map +1 -1
  223. package/dist/waas.native.esm.js +70 -5
  224. package/dist/waas.native.esm.js.map +1 -1
  225. package/dist/waasCore.cjs +6 -6
  226. package/dist/waasCore.esm.js +6 -6
  227. package/dist/waasCore.native.esm.js +6 -6
  228. package/package.json +3 -3
  229. package/dist/getNetworkProviderFromNetworkId-C6DBO0OX.native.esm.js.map +0 -1
  230. package/dist/getNetworkProviderFromNetworkId-CEs4SGW4.esm.js.map +0 -1
  231. package/dist/getNetworkProviderFromNetworkId-CMIgKqEH.cjs.map +0 -1
  232. package/dist/isDynamicWaasEnabled-BQuXZne_.cjs.map +0 -1
  233. package/dist/isDynamicWaasEnabled-BaY09iv6.native.esm.js.map +0 -1
  234. package/dist/isDynamicWaasEnabled-BlVIlXMZ.esm.js.map +0 -1
  235. package/dist/isMfaRequiredForAction-Dghiguch.cjs.map +0 -1
  236. package/dist/isMfaRequiredForAction-r9aDdmK5.esm.js.map +0 -1
  237. package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +0 -10
  238. package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts.map +0 -1
  239. package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/index.d.ts.map +0 -1
  240. package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/index.d.ts.map +0 -1
  241. package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts +0 -12
  242. package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts.map +0 -1
  243. package/dist/updateAuthFromVerifyResponse-BQes11vz.esm.js.map +0 -1
  244. package/dist/updateAuthFromVerifyResponse-Deg9em9o.cjs.map +0 -1
  245. package/dist/updateAuthFromVerifyResponse-wVY_DoiL.native.esm.js.map +0 -1
  246. /package/dist/modules/wallets/{primaryWalletAccount → selectedWalletAccount}/getPrimaryWalletAccount/index.d.ts +0 -0
  247. /package/dist/modules/wallets/{primaryWalletAccount → selectedWalletAccount}/selectPrimaryWalletAccount/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"isUserOnboardingComplete-BMNAbXk1.esm.js","names":["preconnectWaasIframe"],"sources":["../src/errors/WaasOnboardingIncompleteError.ts","../src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts","../src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts","../src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts","../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"sourcesContent":["import { BaseError } from './base';\n\n/**\n * Thrown when the embedded (WaaS) wallet client is requested before the user\n * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`\n * because MFA, KYC, recovery-codes acknowledgment, or device registration is\n * still pending.\n *\n * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the\n * token captured at client construction (before any per-operation token\n * resync). Building the client during this window lets that pre-warm fire with\n * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler\n * force-logs-out the user. Throwing here surfaces a clear, recoverable reason\n * instead — wait for onboarding to complete and retry.\n */\nexport class WaasOnboardingIncompleteError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'waas_onboarding_incomplete',\n docsUrl: null,\n name: 'WaasOnboardingIncompleteError',\n shortMessage:\n 'Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration).',\n });\n }\n}\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { preconnectWaasIframe as preconnectWaasIframeOrigin } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { DEFAULT_WAAS_BASE_API_URL } from '../constants';\nimport { isDynamicWaasEnabled } from '../isDynamicWaasEnabled';\n\n/**\n * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet\n * iframe origin so the iframe mounted after authentication completes loads on\n * a hot connection. Called when an auth flow starts (OTP send/verify, social\n * callback). Safe to call repeatedly; no-op on React Native / SSR and when\n * Dynamic WaaS is not enabled.\n *\n * @param client - The Dynamic client instance.\n * @notInstrumented\n */\nexport const preconnectWaasIframe = (client: DynamicClient): void => {\n const core = getCore(client);\n try {\n if (!isDynamicWaasEnabled(client)) return;\n\n preconnectWaasIframeOrigin({\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n });\n } catch (error) {\n // Best-effort: never break the auth flow (also swallows the assertion\n // from isDynamicWaasEnabled when project settings are not loaded yet).\n core.logger.warn('[preconnectWaasIframe] skipped', error);\n }\n};\n","import type { User } from '../../user/user.types';\n\n/**\n * Checks if device registration is required for the given user.\n *\n * This function determines if the user has the deviceRegistration\n * scope, indicating that device registration is required.\n *\n * @param user - The user to check.\n * @returns True if device registration is required, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when this device must be registered, updated when the user changes.\n */\nexport const isDeviceRegistrationRequired = (user: User) =>\n Boolean(user.scope?.includes('device:register'));\n","import { MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user is still pending acknowledgment of their MFA recovery codes.\n *\n * This function determines whether the user has been presented with recovery\n * codes that they have not yet acknowledged as saved or backed up.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if recovery codes are pending acknowledgment, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when recovery codes await acknowledgment, updated when the user changes.\n */\nexport const isPendingRecoveryCodesAcknowledgment = (\n client = getDefaultClient()\n) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return (\n user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending\n );\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { isDeviceRegistrationRequired } from '../../deviceRegistration/isDeviceRegistrationRequired';\nimport { isPendingRecoveryCodesAcknowledgment } from '../../mfa/isPendingRecoveryCodesAcknowledgment';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\n\n/**\n * Checks if the user has completed all onboarding requirements.\n *\n * This function verifies whether a user has fulfilled all necessary requirements\n * including KYC fields (Know Your Customer information), MFA setup\n * (Multi-Factor Authentication including recovery codes acknowledgment), and\n * device registration.\n *\n * A `false` result means the user still has an outstanding onboarding step, so\n * any feature that requires a fully onboarded (`user:basic`) user should hold\n * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet\n * is one such feature — its backend calls reject a pre-`user:basic` token — but\n * this predicate is general and not specific to embedded wallets.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when onboarding is complete, updated when the user changes.\n */\nexport const isUserOnboardingComplete = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n const hasMissingKycFields = Boolean(user.missingFields?.length);\n const hasPendingMfaAuth = isUserMissingMfaAuth(client);\n const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);\n const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);\n\n const userOnboardingComplete =\n !hasMissingKycFields &&\n !hasPendingMfaAuth &&\n !hasPendingRecoveryCodes &&\n !hasPendingDeviceRegistration;\n\n return userOnboardingComplete;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,IAAa,gCAAb,cAAmD,UAAU;CAC3D,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;ACLN,MAAaA,0BAAwB,WAAgC;CACnE,MAAM,OAAO,QAAQ,OAAO;AAC5B,KAAI;AACF,MAAI,CAAC,qBAAqB,OAAO,CAAE;AAEnC,uBAA2B;GACzB,UAAW,gBAAgB,OAAO,GAAG,WAAW;GAChD,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;GACF,CAAC;UACK,OAAO;AAGd,OAAK,OAAO,KAAK,kCAAkC,MAAM;;;;;;;;;;;;;;;;;ACrB7D,MAAa,gCAAgC,SAC3C,QAAQ,KAAK,OAAO,SAAS,kBAAkB,CAAC;;;;;;;;;;;;;;;ACElD,MAAa,wCACX,SAAS,kBAAkB,KACxB;CACH,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;AAEzC,QACE,KAAK,iCAAiC,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;ACCvE,MAAa,4BAA4B,SAAS,kBAAkB,KAAK;CACvE,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;CAEzC,MAAM,sBAAsB,QAAQ,KAAK,eAAe,OAAO;CAC/D,MAAM,oBAAoB,qBAAqB,OAAO;CACtD,MAAM,0BAA0B,qCAAqC,OAAO;CAC5E,MAAM,+BAA+B,6BAA6B,KAAK;AAQvE,QALE,CAAC,uBACD,CAAC,qBACD,CAAC,2BACD,CAAC"}
1
+ {"version":3,"file":"isUserOnboardingComplete-Dy2Ygp0u.esm.js","names":["preconnectWaasIframe"],"sources":["../src/errors/WaasOnboardingIncompleteError.ts","../src/modules/waas/preconnectWaasIframe/preconnectWaasIframe.ts","../src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts","../src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts","../src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts"],"sourcesContent":["import { BaseError } from './base';\n\n/**\n * Thrown when the embedded (WaaS) wallet client is requested before the user\n * has completed onboarding — i.e. the JWT has not upgraded to `user:basic`\n * because MFA, KYC, recovery-codes acknowledgment, or device registration is\n * still pending.\n *\n * The WaaS iframe's init-time room-cache pre-warm fires `createRooms` using the\n * token captured at client construction (before any per-operation token\n * resync). Building the client during this window lets that pre-warm fire with\n * a pre-`user:basic` token, get a 401, and the iframe's unauthorized handler\n * force-logs-out the user. Throwing here surfaces a clear, recoverable reason\n * instead — wait for onboarding to complete and retry.\n */\nexport class WaasOnboardingIncompleteError extends BaseError {\n constructor() {\n super({\n cause: null,\n code: 'waas_onboarding_incomplete',\n docsUrl: null,\n name: 'WaasOnboardingIncompleteError',\n shortMessage:\n 'Cannot create or access the embedded wallet until onboarding is complete (pending MFA, KYC, recovery-codes acknowledgment, or device registration).',\n });\n }\n}\n","import type { AuthMode } from '@dynamic-labs-wallet/browser-wallet-client';\nimport { preconnectWaasIframe as preconnectWaasIframeOrigin } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getCore } from '../../../client/core/getCore';\nimport type { DynamicClient } from '../../../client/types';\nimport { isCookieEnabled } from '../../projectSettings/isCookieEnabled';\nimport { DEFAULT_WAAS_BASE_API_URL } from '../constants';\nimport { isDynamicWaasEnabled } from '../isDynamicWaasEnabled';\n\n/**\n * Warms the browser's connection (DNS + TCP + TLS) to the embedded-wallet\n * iframe origin so the iframe mounted after authentication completes loads on\n * a hot connection. Called when an auth flow starts (OTP send/verify, social\n * callback). Safe to call repeatedly; no-op on React Native / SSR and when\n * Dynamic WaaS is not enabled.\n *\n * @param client - The Dynamic client instance.\n * @notInstrumented\n */\nexport const preconnectWaasIframe = (client: DynamicClient): void => {\n const core = getCore(client);\n try {\n if (!isDynamicWaasEnabled(client)) return;\n\n preconnectWaasIframeOrigin({\n authMode: (isCookieEnabled(client) ? 'cookie' : 'header') as AuthMode,\n baseApiUrl: (core.apiBaseUrl || DEFAULT_WAAS_BASE_API_URL).replace(\n '/api/v0',\n ''\n ),\n });\n } catch (error) {\n // Best-effort: never break the auth flow (also swallows the assertion\n // from isDynamicWaasEnabled when project settings are not loaded yet).\n core.logger.warn('[preconnectWaasIframe] skipped', error);\n }\n};\n","import type { User } from '../../user/user.types';\n\n/**\n * Checks if device registration is required for the given user.\n *\n * This function determines if the user has the deviceRegistration\n * scope, indicating that device registration is required.\n *\n * @param user - The user to check.\n * @returns True if device registration is required, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when this device must be registered, updated when the user changes.\n */\nexport const isDeviceRegistrationRequired = (user: User) =>\n Boolean(user.scope?.includes('device:register'));\n","import { MfaBackupCodeAcknowledgement } from '@dynamic-labs/sdk-api-core';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\n\n/**\n * Checks if the user is still pending acknowledgment of their MFA recovery codes.\n *\n * This function determines whether the user has been presented with recovery\n * codes that they have not yet acknowledged as saved or backed up.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if recovery codes are pending acknowledgment, false otherwise.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when recovery codes await acknowledgment, updated when the user changes.\n */\nexport const isPendingRecoveryCodesAcknowledgment = (\n client = getDefaultClient()\n) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n return (\n user.mfaBackupCodeAcknowledgement === MfaBackupCodeAcknowledgement.Pending\n );\n};\n","import { getDefaultClient } from '../../../client/defaultClient';\nimport { assertDefined } from '../../../utils/assertDefined';\nimport { isDeviceRegistrationRequired } from '../../deviceRegistration/isDeviceRegistrationRequired';\nimport { isPendingRecoveryCodesAcknowledgment } from '../../mfa/isPendingRecoveryCodesAcknowledgment';\nimport { isUserMissingMfaAuth } from '../../mfa/isUserMissingMfaAuth';\n\n/**\n * Checks if the user has completed all onboarding requirements.\n *\n * This function verifies whether a user has fulfilled all necessary requirements\n * including KYC fields (Know Your Customer information), MFA setup\n * (Multi-Factor Authentication including recovery codes acknowledgment), and\n * device registration.\n *\n * A `false` result means the user still has an outstanding onboarding step, so\n * any feature that requires a fully onboarded (`user:basic`) user should hold\n * off until it returns `true`. Creating or accessing an embedded (WaaS) wallet\n * is one such feature — its backend calls reject a pre-`user:basic` token — but\n * this predicate is general and not specific to embedded wallets.\n *\n * @deprecated Use {@link checkUserScopes} instead. This function conflates\n * Dynamic-controlled requirements (MFA, device registration, required fields)\n * with the concept of \"onboarding complete\", which is app-specific. Replace\n * with `checkUserScopes({ user, scopes: ['user:basic'] })` to check whether\n * Dynamic's requirements are satisfied, and compose your own logic on top for\n * any app-specific onboarding steps.\n *\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.\n * @notInstrumented\n * @hook Exposed as a hook so consumers reactively know when onboarding is complete, updated when the user changes.\n */\nexport const isUserOnboardingComplete = (client = getDefaultClient()) => {\n const user = client.user;\n\n assertDefined(user, 'User not logged in');\n\n const hasMissingKycFields = Boolean(user.missingFields?.length);\n const hasPendingMfaAuth = isUserMissingMfaAuth(client);\n const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);\n const hasPendingDeviceRegistration = isDeviceRegistrationRequired(user);\n\n const userOnboardingComplete =\n !hasMissingKycFields &&\n !hasPendingMfaAuth &&\n !hasPendingRecoveryCodes &&\n !hasPendingDeviceRegistration;\n\n return userOnboardingComplete;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,IAAa,gCAAb,cAAmD,UAAU;CAC3D,cAAc;AACZ,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cACE;GACH,CAAC;;;;;;;;;;;;;;;;ACLN,MAAaA,0BAAwB,WAAgC;CACnE,MAAM,OAAO,QAAQ,OAAO;AAC5B,KAAI;AACF,MAAI,CAAC,qBAAqB,OAAO,CAAE;AAEnC,uBAA2B;GACzB,UAAW,gBAAgB,OAAO,GAAG,WAAW;GAChD,aAAa,KAAK,cAAc,2BAA2B,QACzD,WACA,GACD;GACF,CAAC;UACK,OAAO;AAGd,OAAK,OAAO,KAAK,kCAAkC,MAAM;;;;;;;;;;;;;;;;;ACrB7D,MAAa,gCAAgC,SAC3C,QAAQ,KAAK,OAAO,SAAS,kBAAkB,CAAC;;;;;;;;;;;;;;;ACElD,MAAa,wCACX,SAAS,kBAAkB,KACxB;CACH,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;AAEzC,QACE,KAAK,iCAAiC,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACQvE,MAAa,4BAA4B,SAAS,kBAAkB,KAAK;CACvE,MAAM,OAAO,OAAO;AAEpB,eAAc,MAAM,qBAAqB;CAEzC,MAAM,sBAAsB,QAAQ,KAAK,eAAe,OAAO;CAC/D,MAAM,oBAAoB,qBAAqB,OAAO;CACtD,MAAM,0BAA0B,qCAAqC,OAAO;CAC5E,MAAM,+BAA+B,6BAA6B,KAAK;AAQvE,QALE,CAAC,uBACD,CAAC,qBACD,CAAC,2BACD,CAAC"}
@@ -1,5 +1,5 @@
1
- import { A as NoWalletProviderFoundError, E as getWalletProviderFromWalletAccount, _t as BaseError, c as isWaasWalletProvider, d as DYNAMIC_WAAS_METADATA, f as getWalletProviders, mt as getDefaultClient } from "./updateAuthFromVerifyResponse-wVY_DoiL.native.esm.js";
2
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-BaY09iv6.native.esm.js";
1
+ import { T as getWalletProviderFromWalletAccount, _t as BaseError, c as isWaasWalletProvider, d as DYNAMIC_WAAS_METADATA, f as getWalletProviders, k as NoWalletProviderFoundError, mt as getDefaultClient } from "./updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js";
2
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-Dj_sLoBO.native.esm.js";
3
3
 
4
4
  //#region src/errors/NotWaasWalletProviderError.ts
5
5
  var NotWaasWalletProviderError = class extends BaseError {
@@ -62,4 +62,4 @@ const migrateFromFireblocks = async ({ coinTypes, deviceId, expectedAddresses, j
62
62
 
63
63
  //#endregion
64
64
  export { getWaasWalletProviderFromWalletAccount as n, NotWaasWalletProviderError as r, migrateFromFireblocks as t };
65
- //# sourceMappingURL=migrateFromFireblocks-D8Y5h0hz.native.esm.js.map
65
+ //# sourceMappingURL=migrateFromFireblocks-B5qWGLCM.native.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-D8Y5h0hz.native.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-B5qWGLCM.native.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
@@ -1,5 +1,5 @@
1
- const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-Deg9em9o.cjs');
2
- const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-BQuXZne_.cjs');
1
+ const require_updateAuthFromVerifyResponse = require('./updateAuthFromVerifyResponse-pgYXvDvj.cjs');
2
+ const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-BawttOeb.cjs');
3
3
 
4
4
  //#region src/errors/NotWaasWalletProviderError.ts
5
5
  var NotWaasWalletProviderError = class extends require_updateAuthFromVerifyResponse.BaseError {
@@ -79,4 +79,4 @@ Object.defineProperty(exports, 'migrateFromFireblocks', {
79
79
  return migrateFromFireblocks;
80
80
  }
81
81
  });
82
- //# sourceMappingURL=migrateFromFireblocks-D9pJIgt5.cjs.map
82
+ //# sourceMappingURL=migrateFromFireblocks-Dp-QA9hi.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-D9pJIgt5.cjs","names":["BaseError","getWalletProviderFromWalletAccount","isWaasWalletProvider","NotWaasWalletAccountError","getDefaultClient","getWalletProviders","NoWalletProviderFoundError","DYNAMIC_WAAS_METADATA","isWaasWalletProvider","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgDA,+CAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiBC,wEACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAACC,0DAAqB,eAAe,CACvC,OAAM,IAAIC,uDAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAASC,uDAAkB,KACgB;CAC3C,MAAM,YAAYC,wDAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAIC,gEAA2B,EACnC,mBAAmBC,2DAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAKC,0DAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMC,mDAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-Dp-QA9hi.cjs","names":["BaseError","getWalletProviderFromWalletAccount","isWaasWalletProvider","NotWaasWalletAccountError","getDefaultClient","getWalletProviders","NoWalletProviderFoundError","DYNAMIC_WAAS_METADATA","isWaasWalletProvider","refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgDA,+CAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiBC,wEACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAACC,0DAAqB,eAAe,CACvC,OAAM,IAAIC,uDAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAASC,uDAAkB,KACgB;CAC3C,MAAM,YAAYC,wDAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAIC,gEAA2B,EACnC,mBAAmBC,2DAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAKC,0DAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMC,mDAAY,OAAO;AAEzB,QAAO"}
@@ -1,5 +1,5 @@
1
- import { A as NoWalletProviderFoundError, E as getWalletProviderFromWalletAccount, _t as BaseError, c as isWaasWalletProvider, d as DYNAMIC_WAAS_METADATA, f as getWalletProviders, mt as getDefaultClient } from "./updateAuthFromVerifyResponse-BQes11vz.esm.js";
2
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-BlVIlXMZ.esm.js";
1
+ import { T as getWalletProviderFromWalletAccount, _t as BaseError, c as isWaasWalletProvider, d as DYNAMIC_WAAS_METADATA, f as getWalletProviders, k as NoWalletProviderFoundError, mt as getDefaultClient } from "./updateAuthFromVerifyResponse-_oYRLK_w.esm.js";
2
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-DDrg89y1.esm.js";
3
3
 
4
4
  //#region src/errors/NotWaasWalletProviderError.ts
5
5
  var NotWaasWalletProviderError = class extends BaseError {
@@ -62,4 +62,4 @@ const migrateFromFireblocks = async ({ coinTypes, deviceId, expectedAddresses, j
62
62
 
63
63
  //#endregion
64
64
  export { getWaasWalletProviderFromWalletAccount as n, NotWaasWalletProviderError as r, migrateFromFireblocks as t };
65
- //# sourceMappingURL=migrateFromFireblocks-D--uqWp5.esm.js.map
65
+ //# sourceMappingURL=migrateFromFireblocks-MAatsk_w.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrateFromFireblocks-D--uqWp5.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
1
+ {"version":3,"file":"migrateFromFireblocks-MAatsk_w.esm.js","names":["refreshAuth"],"sources":["../src/errors/NotWaasWalletProviderError.ts","../src/modules/waas/getWaasWalletProviderFromWalletAccount/getWaasWalletProviderFromWalletAccount.ts","../src/modules/waas/migrateFromFireblocks/migrateFromFireblocks.ts"],"sourcesContent":["import { BaseError } from './base';\n\ntype NotWaasWalletProviderErrorParams = {\n walletProviderKey: string;\n};\n\nexport class NotWaasWalletProviderError extends BaseError {\n constructor({ walletProviderKey }: NotWaasWalletProviderErrorParams) {\n super({\n cause: null,\n code: 'not_waas_wallet_provider_error',\n docsUrl: null,\n name: 'NotWaasWalletProviderError',\n shortMessage: `Wallet provider ${walletProviderKey} is not a Dynamic WaaS wallet provider`,\n });\n }\n}\n","import type { DynamicClient } from '../../../client/types/DynamicClient';\nimport { NotWaasWalletAccountError } from '../../../errors/NotWaasWalletAccountError';\nimport { getWalletProviderFromWalletAccount } from '../../wallets/utils/getWalletProviderFromWalletAccount';\nimport type { WalletAccount } from '../../wallets/walletAccount';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\nimport type { WaasWalletProvider } from '../waas.types';\n\ntype GetWalletProviderFromWalletAccountParams = {\n walletAccount: WalletAccount;\n};\n\n/** @notInstrumented */\nexport const getWaasWalletProviderFromWalletAccount = (\n { walletAccount }: GetWalletProviderFromWalletAccountParams,\n client: DynamicClient\n): WaasWalletProvider => {\n const walletProvider = getWalletProviderFromWalletAccount(\n { walletAccount },\n client\n );\n\n if (!isWaasWalletProvider(walletProvider)) {\n throw new NotWaasWalletAccountError({\n walletAddress: walletAccount.address,\n });\n }\n\n return walletProvider;\n};\n","import type { MigrateFromFireblocksResponse } from '@dynamic-labs-wallet/browser-wallet-client';\n\nimport { getDefaultClient } from '../../../client/defaultClient';\nimport { NoWalletProviderFoundError } from '../../../errors/NoWalletProviderFoundError';\nimport { NotWaasWalletProviderError } from '../../../errors/NotWaasWalletProviderError';\nimport { refreshAuth } from '../../user/refreshAuth';\nimport { getWalletProviders } from '../../wallets/getWalletProviders';\nimport { DYNAMIC_WAAS_METADATA } from '../constants';\nimport { isWaasWalletProvider } from '../isWaasWalletProvider';\n\ntype MigrateFromFireblocksParams = {\n /**\n * Optional SLIP-0044 coin types per chain name for BIP44 derivation off the\n * Fireblocks takeover xprv (e.g. `{ EVM: 1 }` for Sepolia).\n */\n coinTypes?: Record<string, number>;\n /**\n * The Fireblocks NCW device id whose key material is being migrated.\n */\n deviceId: string;\n /**\n * Required per-chain expected wallet address (the address Fireblocks held). Its\n * keys are the chains migration runs on, and the migration iframe verifies each\n * imported Dynamic address matches the value, so a wrong derivation fails loudly\n * instead of producing an unusable wallet.\n */\n expectedAddresses: Record<string, string>;\n /**\n * The Fireblocks-issued JWT authorizing the takeover.\n */\n jwt: string;\n /**\n * The password that encrypted the legacy Fireblocks NCW device storage.\n */\n password: string;\n /**\n * The serialized Fireblocks NCW device storage (the local key share backup).\n */\n storage: Record<string, string>;\n};\n\n/**\n * Migrates an existing Fireblocks NCW wallet into Dynamic's WaaS infrastructure.\n *\n * Migration is a single cross-chain operation: one call takes over the Fireblocks\n * key material and provisions Dynamic WaaS wallet accounts for every supported\n * chain. Because it is not per-chain, this resolves a single WaaS wallet provider\n * (any registered chain) and delegates the takeover to it.\n *\n * @param params.deviceId - The Fireblocks NCW device id being migrated.\n * @param params.jwt - The Fireblocks-issued JWT authorizing the takeover.\n * @param params.storage - The serialized Fireblocks NCW device storage.\n * @param params.password - The password that encrypted the legacy device storage.\n * @param params.expectedAddresses - Required per-chain expected address; its keys are the chains migration runs on, and each imported address is verified against it.\n * @param [params.coinTypes] - Optional SLIP-0044 coin types per chain name.\n * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.\n * @returns A promise resolving to the per-chain migration results.\n * @notInstrumented\n */\nexport const migrateFromFireblocks = async (\n {\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n }: MigrateFromFireblocksParams,\n client = getDefaultClient()\n): Promise<MigrateFromFireblocksResponse> => {\n const providers = getWalletProviders(client);\n\n if (providers.length === 0) {\n throw new NoWalletProviderFoundError({\n walletProviderKey: DYNAMIC_WAAS_METADATA.displayName,\n });\n }\n\n // Migration is cross-chain, so any registered WaaS provider can drive the\n // takeover. Resolve the first one rather than iterating per chain.\n const waasProvider = providers.find(isWaasWalletProvider);\n\n if (!waasProvider) {\n throw new NotWaasWalletProviderError({\n walletProviderKey: providers[0].key,\n });\n }\n\n const result = await waasProvider.migrateFromFireblocks({\n coinTypes,\n deviceId,\n expectedAddresses,\n jwt,\n password,\n storage,\n });\n\n await refreshAuth(client);\n\n return result;\n};\n"],"mappings":";;;;AAMA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,EAAE,qBAAuD;AACnE,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,mBAAmB,kBAAkB;GACpD,CAAC;;;;;;;ACFN,MAAa,0CACX,EAAE,iBACF,WACuB;CACvB,MAAM,iBAAiB,mCACrB,EAAE,eAAe,EACjB,OACD;AAED,KAAI,CAAC,qBAAqB,eAAe,CACvC,OAAM,IAAI,0BAA0B,EAClC,eAAe,cAAc,SAC9B,CAAC;AAGJ,QAAO;;;;;;;;;;;;;;;;;;;;;;;ACgCT,MAAa,wBAAwB,OACnC,EACE,WACA,UACA,mBACA,KACA,UACA,WAEF,SAAS,kBAAkB,KACgB;CAC3C,MAAM,YAAY,mBAAmB,OAAO;AAE5C,KAAI,UAAU,WAAW,EACvB,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,sBAAsB,aAC1C,CAAC;CAKJ,MAAM,eAAe,UAAU,KAAK,qBAAqB;AAEzD,KAAI,CAAC,aACH,OAAM,IAAI,2BAA2B,EACnC,mBAAmB,UAAU,GAAG,KACjC,CAAC;CAGJ,MAAM,SAAS,MAAM,aAAa,sBAAsB;EACtD;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;AAEF,OAAMA,sBAAY,OAAO;AAEzB,QAAO"}
@@ -6,5 +6,13 @@ export declare const MFA_TOKEN_HEADER = "x-mfa-auth-token";
6
6
  export declare const SESSION_PUBLIC_KEY_HEADER = "x-dyn-session-public-key";
7
7
  export declare const DYNAMIC_SDK_API_VERSION: string;
8
8
  export declare const DYNAMIC_SDK_SESSION_ID_HEADER = "x-dyn-session-id";
9
+ /**
10
+ * Reports the runtime platform (`web` or `react-native`) to the Dynamic API.
11
+ *
12
+ * Named `x-dynamic-platform` (not `x-dyn-*`) to match the header the legacy
13
+ * webview-controller already sends, so the backend receives a consistent
14
+ * platform signal across SDK generations.
15
+ */
16
+ export declare const DYNAMIC_PLATFORM_HEADER = "x-dynamic-platform";
9
17
  export declare const CLIENT_SDK_NAME = "ClientSDK";
10
18
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAE1D,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAE1E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AAEpE,eAAO,MAAM,uBAAuB,QACQ,CAAC;AAE7C,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE,eAAO,MAAM,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,sBAAsB,CAAC;AAE9D,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAE5D,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAE1D,eAAO,MAAM,4BAA4B,gCAAgC,CAAC;AAE1E,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AAEpE,eAAO,MAAM,uBAAuB,QACQ,CAAC;AAE7C,eAAO,MAAM,6BAA6B,qBAAqB,CAAC;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,eAAO,MAAM,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAKxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAiChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WAqEtB,CAAC"}
1
+ {"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/modules/apiClient/createApiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAInE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAmChE;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,sBAAsB,sBACvB,aAAa,WAsEtB,CAAC"}
@@ -8,10 +8,20 @@ type SignInWithExternalJwtParams = {
8
8
  * This function allows authentication using JWT tokens from external providers,
9
9
  * enabling integration with custom authentication systems.
10
10
  *
11
+ * @example
12
+ * ```ts
13
+ * const response = await signInWithExternalJwt({
14
+ * externalJwt: 'eyJhbGciOiJSUzI1NiIs...',
15
+ * });
16
+ * ```
17
+ *
11
18
  * @param [params.externalJwt] - Optional external JWT token to authenticate with. Not required when using cookie based auth.
19
+ * @param [params.sessionPublicKey] - Optional session public key for session-based auth.
12
20
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
13
21
  * @returns A promise that resolves to the authentication response from the server.
14
- * @instrumented
22
+ * @see logout
23
+ * @see refreshAuth
24
+ * @instrumented
15
25
  */
16
26
  export declare const signInWithExternalJwt: ({ externalJwt, sessionPublicKey }?: SignInWithExternalJwtParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
17
27
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"signInWithExternalJwt.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts"],"names":[],"mappings":"AAKA,KAAK,2BAA2B,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,qBAAqB,uCACG,2BAA2B,uHAiB/D,CAAC"}
1
+ {"version":3,"file":"signInWithExternalJwt.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.ts"],"names":[],"mappings":"AAKA,KAAK,2BAA2B,GAAG;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,qBAAqB,uCACG,2BAA2B,uHAiB/D,CAAC"}
@@ -14,8 +14,17 @@
14
14
  * "Check if signed in" guide:
15
15
  * https://www.dynamic.xyz/docs/javascript/user-session-management
16
16
  *
17
+ * @example
18
+ * ```ts
19
+ * if (isSignedIn()) {
20
+ * console.log('User is authenticated or has a wallet connected');
21
+ * }
22
+ * ```
23
+ *
17
24
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
18
25
  * @returns True if the user is signed in, false otherwise.
26
+ * @see logout
27
+ * @see isAnyWalletAccountConnected
19
28
  * @notInstrumented
20
29
  */
21
30
  export declare const isSignedIn: (client?: import("../../../exports").DynamicClient) => boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"isSignedIn.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/isSignedIn/isSignedIn.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,UAAU,gEACuC,CAAC"}
1
+ {"version":3,"file":"isSignedIn.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/isSignedIn/isSignedIn.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,UAAU,gEACuC,CAAC"}
@@ -1,8 +1,21 @@
1
1
  /**
2
2
  * Logs out the current user and clears all authentication data.
3
3
  *
4
+ * @example
5
+ * ```ts
6
+ * await logout();
7
+ * ```
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * // With explicit client for multi-client setups
12
+ * await logout(myClient);
13
+ * ```
14
+ *
4
15
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
5
16
  * @returns A promise that resolves when the logout process is complete.
17
+ * @see isAnyWalletAccountConnected
18
+ * @see refreshAuth
6
19
  * @notInstrumented
7
20
  */
8
21
  export declare const logout: (client?: import("../../../exports").DynamicClient) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,sEAQlB,CAAC"}
1
+ {"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/logout/logout.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,sEAQlB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { mergeUserAccounts } from './mergeUserAccounts';
2
+ export type { MergeUserAccountsParams } from './mergeUserAccounts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/mergeUserAccounts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { MergeUserConflictResolution, SdkUser } from '@dynamic-labs/sdk-api-core';
2
+ /**
3
+ * Parameters for {@link mergeUserAccounts}: the optional per-field conflict
4
+ * resolutions to apply when completing a merge that surfaced conflicts. Omit it
5
+ * entirely (or pass an empty array) when the merge has no conflicts.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * const params: MergeUserAccountsParams = {
10
+ * conflictResolutions: [{ fieldKey, userId, type }],
11
+ * };
12
+ * ```
13
+ * @see mergeUserAccounts
14
+ * @see MergeUserConflictResolution
15
+ */
16
+ export type MergeUserAccountsParams = {
17
+ /**
18
+ * Per-field resolutions choosing whose value to keep when the two accounts
19
+ * hold different values for the same profile field. Provide these when the
20
+ * merge surfaced conflicts (via `MergeAccountsConfirmationError.mergeConflicts`).
21
+ * Omit or pass an empty array when there are no conflicts to resolve.
22
+ */
23
+ conflictResolutions?: MergeUserConflictResolution[];
24
+ };
25
+ /**
26
+ * Completes an account merge after a credential was found to already belong to
27
+ * another user (surfaced as `MergeAccountsConfirmationError` during
28
+ * verification / linking).
29
+ *
30
+ * When the merge has no field-level conflicts, call it with no resolutions to
31
+ * merge directly. When the two accounts hold different values for the same
32
+ * profile field, pass the user's chosen `conflictResolutions` (one per
33
+ * conflict) so the backend knows which value to keep. On success the two users
34
+ * are folded into one, the merged session is persisted, and the merged user is
35
+ * returned.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * try {
40
+ * await verifyWalletAccount({ walletAccount });
41
+ * } catch (error) {
42
+ * if (error instanceof MergeAccountsConfirmationError) {
43
+ * // resolveConflicts is your own function (not provided by the SDK): given
44
+ * // the conflicting fields, decide which value to keep for each one —
45
+ * // usually by prompting the user — and return them as MergeUserConflictResolution[].
46
+ * await mergeUserAccounts(
47
+ * error.mergeConflicts
48
+ * ? { conflictResolutions: resolveConflicts(error.mergeConflicts) }
49
+ * : undefined,
50
+ * );
51
+ * }
52
+ * }
53
+ * ```
54
+ * @param params.conflictResolutions - Optional per-field conflict resolutions.
55
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
56
+ * @returns A promise that resolves to the merged user.
57
+ * @see MergeAccountsConfirmationError
58
+ * @see MergeUserConflictResolution
59
+ * @notInstrumented
60
+ */
61
+ export declare const mergeUserAccounts: ({ conflictResolutions }?: MergeUserAccountsParams, client?: import("../../../exports").DynamicClient) => Promise<SdkUser>;
62
+ //# sourceMappingURL=mergeUserAccounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeUserAccounts.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/mergeUserAccounts/mergeUserAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,OAAO,EAER,MAAM,4BAA4B,CAAC;AAOpC;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,2BAA2B,EAAE,CAAC;CACrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,iBAAiB,6BACH,uBAAuB,wDAE/C,OAAO,CAAC,OAAO,CA4BjB,CAAC"}
@@ -0,0 +1,78 @@
1
+ import type { MergeConflicts as MergeConflictsCore, MergeUserConflict as MergeUserConflictCore, MergeUserConflictResolution as MergeUserConflictResolutionCore, MergeUser as MergeUserCore } from '@dynamic-labs/sdk-api-core';
2
+ /**
3
+ * One side of a single field-level merge conflict: the id of a user involved in
4
+ * the merge together with that user's value for the conflicting profile field.
5
+ *
6
+ * Surfaced (via {@link MergeUserConflict}) when a credential being linked
7
+ * already belongs to another user and the two accounts hold different values
8
+ * for the same field. The `userId` is what you pass back as
9
+ * `MergeUserConflictResolution.userId` to choose whose value to keep.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const chosen: MergeUser = conflict.currentUser;
14
+ * console.log(chosen.userId, chosen.value);
15
+ * ```
16
+ * @see MergeUserConflict
17
+ * @see MergeUserConflictResolution
18
+ */
19
+ export type MergeUser = MergeUserCore;
20
+ /**
21
+ * A single field-level conflict between the two accounts being merged: the
22
+ * `field` in question plus the differing values held by `fromUser` (the account
23
+ * that owns the credential) and `currentUser` (the signed-in account).
24
+ *
25
+ * The user resolves each conflict by choosing which side to keep; that choice
26
+ * becomes a {@link MergeUserConflictResolution} passed to `mergeUserAccounts`.
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * conflicts.forEach((conflict: MergeUserConflict) => {
31
+ * console.log(conflict.field, conflict.fromUser.value, conflict.currentUser.value);
32
+ * });
33
+ * ```
34
+ * @see MergeUser
35
+ * @see MergeConflicts
36
+ */
37
+ export type MergeUserConflict = MergeUserConflictCore;
38
+ /**
39
+ * The full set of field-level conflicts surfaced when a merge is offered:
40
+ * the `fromUser` being merged in and the list of `conflicts` to resolve.
41
+ *
42
+ * This is the shape carried on `MergeAccountsConfirmationError.mergeConflicts`;
43
+ * present it to the user, collect a {@link MergeUserConflictResolution} per
44
+ * conflict, and pass those to `mergeUserAccounts`.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * catch (error) {
49
+ * if (error instanceof MergeAccountsConfirmationError) {
50
+ * const conflicts: MergeConflicts | undefined = error.mergeConflicts;
51
+ * }
52
+ * }
53
+ * ```
54
+ * @see MergeUserConflict
55
+ * @see MergeUserConflictResolution
56
+ */
57
+ export type MergeConflicts = MergeConflictsCore;
58
+ /**
59
+ * The user's decision for one field-level conflict: `fieldKey` identifies the
60
+ * conflicting field, `userId` selects whose value to keep, and `type` is the
61
+ * field's kind.
62
+ *
63
+ * Build one of these per {@link MergeUserConflict} and pass the array to
64
+ * `mergeUserAccounts` to complete a merge that had conflicts.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const resolution: MergeUserConflictResolution = {
69
+ * fieldKey: conflict.field.key,
70
+ * userId: conflict.currentUser.userId,
71
+ * type: conflict.field.type,
72
+ * };
73
+ * ```
74
+ * @see MergeUserConflict
75
+ * @see MergeConflicts
76
+ */
77
+ export type MergeUserConflictResolution = MergeUserConflictResolutionCore;
78
+ //# sourceMappingURL=mergeUserAccounts.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeUserAccounts.types.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/mergeUserAccounts/mergeUserAccounts.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,IAAI,kBAAkB,EACpC,iBAAiB,IAAI,qBAAqB,EAC1C,2BAA2B,IAAI,+BAA+B,EAC9D,SAAS,IAAI,aAAa,EAC3B,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC;AAEtC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,2BAA2B,GAAG,+BAA+B,CAAC"}
@@ -9,10 +9,17 @@ type RegisterPasskeyParams = {
9
9
  * passwordless authentication. The user will be prompted to create a passkey
10
10
  * using their device's biometric authentication or security key.
11
11
  *
12
+ * @example
13
+ * ```ts
14
+ * await registerPasskey();
15
+ * ```
16
+ *
12
17
  * @param [params.createMfaToken] - Optional configuration for MFA token creation.
13
18
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
14
19
  * @returns A promise that resolves to the registration response.
15
20
  * @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
21
+ * @see signInWithPasskey
22
+ * @see getPasskeys
16
23
  * @instrumented
17
24
  */
18
25
  export declare const registerPasskey: ({ createMfaToken }?: RegisterPasskeyParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"registerPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/registerPasskey/registerPasskey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAUjE,KAAK,qBAAqB,GAAG;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,wBACN,qBAAqB,uHAuB1C,CAAC"}
1
+ {"version":3,"file":"registerPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/registerPasskey/registerPasskey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAUjE,KAAK,qBAAqB,GAAG;IAC3B,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,wBACN,qBAAqB,uHAuB1C,CAAC"}
@@ -8,9 +8,18 @@ export type SignInWithPasskeyParams = {
8
8
  * credential, providing passwordless authentication using biometrics or
9
9
  * security keys.
10
10
  *
11
+ * @example
12
+ * ```ts
13
+ * const response = await signInWithPasskey();
14
+ * console.log('Signed in:', response.user.email);
15
+ * ```
16
+ *
17
+ * @param [params.relatedOriginRpId] - Optional relying party ID for cross-origin authentication.
11
18
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
12
19
  * @returns A promise that resolves to the authentication response.
13
20
  * @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
21
+ * @see registerPasskey
22
+ * @see getPasskeys
14
23
  * @instrumented
15
24
  */
16
25
  export declare const signInWithPasskey: ({ relatedOriginRpId }?: SignInWithPasskeyParams, client?: import("../../../../exports").DynamicClient) => Promise<import("@dynamic-labs/sdk-api-core").VerifyResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"signInWithPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,2BACL,uBAAuB,uHA0B/C,CAAC"}
1
+ {"version":3,"file":"signInWithPasskey.d.ts","sourceRoot":"","sources":["../../../../../src/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,iBAAiB,2BACL,uBAAuB,uHA0B/C,CAAC"}
@@ -7,6 +7,14 @@ type AuthenticateWithSocialParams = {
7
7
  * @deprecated Renamed to {@link signInWithSocialRedirect}. This alias will be
8
8
  * removed in a future major version.
9
9
  *
10
+ * @example
11
+ * ```ts
12
+ * // Prefer signInWithSocialRedirect instead
13
+ * await signInWithSocialRedirect({ provider: 'google', redirectUrl: window.location.href });
14
+ * ```
15
+ *
16
+ * @see signInWithSocialRedirect
17
+ * @see completeSocialRedirect
10
18
  * @instrumented
11
19
  * @noHook Deprecated alias that is not exposed as a React hook.
12
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"authenticateWithSocial.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,WACzB,4BAA4B,2EAEO,CAAC"}
1
+ {"version":3,"file":"authenticateWithSocial.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGzD,KAAK,4BAA4B,GAAG;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,sBAAsB,WACzB,4BAA4B,2EAEO,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Removes the social OAuth redirect parameters that `signInWithSocialRedirect`
3
+ * appends to the return URL from the browser's current URL, leaving every other
4
+ * query parameter, the path, and the hash untouched.
5
+ *
6
+ * Call this once you have finished `completeSocialRedirect` so a page refresh
7
+ * doesn't re-trigger the redirect flow. Unlike clearing the whole query
8
+ * string, this preserves any of your own parameters on the callback URL.
9
+ *
10
+ * This reads and rewrites `window.location`, so it can only run in the
11
+ * browser. Calling it during server-side rendering (no `window`) throws
12
+ * `UnavailableInServerSideError`.
13
+ *
14
+ * @returns Nothing. The current URL is rewritten in place via
15
+ * `window.history.replaceState`.
16
+ *
17
+ * @throws {UnavailableInServerSideError} When called without a `window`
18
+ * (e.g. during server-side rendering).
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * await completeSocialRedirect({ url: new URL(window.location.href) });
23
+ * clearSocialRedirectParams();
24
+ * ```
25
+ *
26
+ * @see {@link completeSocialRedirect} to finish the redirect sign-in before
27
+ * clearing the parameters.
28
+ * @see {@link detectSocialRedirectUrl} to check whether the current URL is a
29
+ * social OAuth callback.
30
+ *
31
+ * @notInstrumented
32
+ */
33
+ export declare const clearSocialRedirectParams: () => void;
34
+ //# sourceMappingURL=clearSocialRedirectParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clearSocialRedirectParams.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,yBAAyB,QAAO,IAY5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { clearSocialRedirectParams } from './clearSocialRedirectParams';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/auth/social/oauth/clearSocialRedirectParams/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
@@ -8,12 +8,23 @@ export type { CompleteSocialRedirectParams } from './completeSocialRedirect.type
8
8
  * authenticating (or linking) the user with the social provider. This is the
9
9
  * final step after `signInWithSocialRedirect` + `detectSocialRedirectUrl`.
10
10
  *
11
+ * @example
12
+ * ```ts
13
+ * const redirectUrl = detectSocialRedirectUrl();
14
+ * if (redirectUrl) {
15
+ * const user = await completeSocialRedirect({ url: redirectUrl });
16
+ * }
17
+ * ```
18
+ *
11
19
  * @param params.url - The callback URL containing OAuth response parameters.
12
20
  * @param [params.requestedScopes] - Optional scopes to request an elevated access token when verifying (linking) a social account.
13
21
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
14
22
  * @returns A promise that resolves to the authenticated user or null.
15
23
  * @throws MissingSocialUrlParamError If required OAuth parameters are missing.
16
24
  * @throws InvalidRedirectStorageStateError If the stored state doesn't match.
25
+ * @see signInWithSocialRedirect
26
+ * @see detectSocialRedirectUrl
27
+ * @see clearSocialRedirectParams
17
28
  * @instrumented
18
29
  */
19
30
  export declare const completeSocialRedirect: ({ url, requestedScopes }: CompleteSocialRedirectParams, client?: import("../../../../../exports").DynamicClient) => Promise<User | null>;