@dynamic-labs-sdk/client 1.17.1 → 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.
- package/dist/client/createDynamicClient/createDynamicClient.d.ts +11 -1
- package/dist/client/createDynamicClient/createDynamicClient.d.ts.map +1 -1
- package/dist/client/defaultClient/defaultClient.d.ts +12 -1
- package/dist/client/defaultClient/defaultClient.d.ts.map +1 -1
- package/dist/core.cjs +7 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -6
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +6 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/APIError/APIError.d.ts +11 -1
- package/dist/errors/APIError/APIError.d.ts.map +1 -1
- package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts +26 -0
- package/dist/errors/DeviceRegistrationIdentityMismatchError.d.ts.map +1 -0
- package/dist/errors/MergeAccountsConfirmationError.d.ts +49 -0
- package/dist/errors/MergeAccountsConfirmationError.d.ts.map +1 -0
- package/dist/errors/UnsafeDeeplinkUrlError.d.ts +17 -0
- package/dist/errors/UnsafeDeeplinkUrlError.d.ts.map +1 -0
- package/dist/errors/UnsafeNavigationUrlError.d.ts +16 -0
- package/dist/errors/UnsafeNavigationUrlError.d.ts.map +1 -0
- package/dist/errors/WalletScreeningBlockedError.d.ts +27 -0
- package/dist/errors/WalletScreeningBlockedError.d.ts.map +1 -0
- package/dist/exports/core.d.ts +4 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +18 -3
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +2 -0
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CS4r9hi7.cjs → getNetworkProviderFromNetworkId-BJX2AMGR.cjs} +190 -19
- package/dist/getNetworkProviderFromNetworkId-BJX2AMGR.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-Bfg-NkNJ.native.esm.js → getNetworkProviderFromNetworkId-Bsv12Q6B.native.esm.js} +165 -10
- package/dist/getNetworkProviderFromNetworkId-Bsv12Q6B.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-pknqqhk1.esm.js → getNetworkProviderFromNetworkId-D3uwhdMN.esm.js} +166 -19
- package/dist/getNetworkProviderFromNetworkId-D3uwhdMN.esm.js.map +1 -0
- package/dist/{getSignedSessionId-cMGkmojJ.cjs → getSignedSessionId-BIZJGg61.cjs} +3 -3
- package/dist/{getSignedSessionId-cMGkmojJ.cjs.map → getSignedSessionId-BIZJGg61.cjs.map} +1 -1
- package/dist/{getSignedSessionId-CUw7LJ35.esm.js → getSignedSessionId-CnSAMO3P.esm.js} +3 -3
- package/dist/{getSignedSessionId-CUw7LJ35.esm.js.map → getSignedSessionId-CnSAMO3P.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-Cl3PEqa8.native.esm.js → getSignedSessionId-DXDi7NkE.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-Cl3PEqa8.native.esm.js.map → getSignedSessionId-DXDi7NkE.native.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-CP9Te5Sz.cjs → getWalletProviderByKey-C6aS7KgD.cjs} +2 -2
- package/dist/{getWalletProviderByKey-CP9Te5Sz.cjs.map → getWalletProviderByKey-C6aS7KgD.cjs.map} +1 -1
- package/dist/{getWalletProviderByKey-lQVfIGFi.esm.js → getWalletProviderByKey-Cr8m-Nax.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-lQVfIGFi.esm.js.map → getWalletProviderByKey-Cr8m-Nax.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-24co0tBE.native.esm.js → getWalletProviderByKey-DVk2t98D.native.esm.js} +2 -2
- package/dist/{getWalletProviderByKey-24co0tBE.native.esm.js.map → getWalletProviderByKey-DVk2t98D.native.esm.js.map} +1 -1
- package/dist/index.cjs +950 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +940 -112
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +867 -111
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-BwP1oowd.cjs → isDynamicWaasEnabled-BawttOeb.cjs} +21 -9
- package/dist/isDynamicWaasEnabled-BawttOeb.cjs.map +1 -0
- package/dist/{isDynamicWaasEnabled-BYaqAOml.esm.js → isDynamicWaasEnabled-DDrg89y1.esm.js} +20 -8
- package/dist/isDynamicWaasEnabled-DDrg89y1.esm.js.map +1 -0
- package/dist/{isDynamicWaasEnabled-BXe0VyI4.native.esm.js → isDynamicWaasEnabled-Dj_sLoBO.native.esm.js} +20 -8
- package/dist/isDynamicWaasEnabled-Dj_sLoBO.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Btejc5g3.cjs → isMfaRequiredForAction-BuvyBN_r.cjs} +21 -6
- package/dist/isMfaRequiredForAction-BuvyBN_r.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-CqEcCTIe.esm.js → isMfaRequiredForAction-DTp4CZBt.esm.js} +21 -6
- package/dist/isMfaRequiredForAction-DTp4CZBt.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-Demz9zlH.native.esm.js → isMfaRequiredForAction-EY-OQORc.native.esm.js} +3 -5
- package/dist/isMfaRequiredForAction-EY-OQORc.native.esm.js.map +1 -0
- package/dist/{isUserOnboardingComplete-C86NDY7I.cjs → isUserOnboardingComplete-CkyzRYrg.cjs} +14 -4
- package/dist/isUserOnboardingComplete-CkyzRYrg.cjs.map +1 -0
- package/dist/{isUserOnboardingComplete-CBrAH0ZF.esm.js → isUserOnboardingComplete-D3HrBYje.native.esm.js} +13 -3
- package/dist/isUserOnboardingComplete-D3HrBYje.native.esm.js.map +1 -0
- package/dist/{isUserOnboardingComplete-Cr-YTpcU.native.esm.js → isUserOnboardingComplete-Dy2Ygp0u.esm.js} +13 -3
- package/dist/isUserOnboardingComplete-Dy2Ygp0u.esm.js.map +1 -0
- package/dist/{migrateFromFireblocks-D-J6-gRo.native.esm.js → migrateFromFireblocks-B5qWGLCM.native.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-D-J6-gRo.native.esm.js.map → migrateFromFireblocks-B5qWGLCM.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-B_q8Oawb.cjs → migrateFromFireblocks-Dp-QA9hi.cjs} +3 -3
- package/dist/{migrateFromFireblocks-B_q8Oawb.cjs.map → migrateFromFireblocks-Dp-QA9hi.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-Bbx2wHZD.esm.js → migrateFromFireblocks-MAatsk_w.esm.js} +3 -3
- package/dist/{migrateFromFireblocks-Bbx2wHZD.esm.js.map → migrateFromFireblocks-MAatsk_w.esm.js.map} +1 -1
- package/dist/modules/apiClient/constants.d.ts +8 -0
- package/dist/modules/apiClient/constants.d.ts.map +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +0 -1
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts +11 -2
- package/dist/modules/auth/externalAuth/signInWithExternalJwt/signInWithExternalJwt.d.ts.map +1 -1
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts +9 -0
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
- package/dist/modules/auth/logout/logout.d.ts +13 -0
- package/dist/modules/auth/logout/logout.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
- package/dist/modules/auth/mergeUserAccounts/index.d.ts +3 -0
- package/dist/modules/auth/mergeUserAccounts/index.d.ts.map +1 -0
- package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.d.ts +62 -0
- package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.d.ts.map +1 -0
- package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.types.d.ts +78 -0
- package/dist/modules/auth/mergeUserAccounts/mergeUserAccounts.types.d.ts.map +1 -0
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +7 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +9 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts +8 -0
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts +34 -0
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/index.d.ts +2 -0
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/index.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts +11 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +0 -1
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts +12 -0
- package/dist/modules/auth/social/oauth/signInWithSocialPopUp/signInWithSocialPopUp.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts +10 -0
- package/dist/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +0 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
- package/dist/modules/captcha/CaptchaProviderEnum/CaptchaProviderEnum.d.ts +37 -0
- package/dist/modules/captcha/CaptchaProviderEnum/CaptchaProviderEnum.d.ts.map +1 -0
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts +50 -0
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.d.ts.map +1 -0
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.types.d.ts +22 -0
- package/dist/modules/captcha/getCaptchaSettings/getCaptchaSettings.types.d.ts.map +1 -0
- package/dist/modules/captcha/getCaptchaSettings/index.d.ts +3 -0
- package/dist/modules/captcha/getCaptchaSettings/index.d.ts.map +1 -0
- package/dist/modules/captcha/isCaptchaRequired/isCaptchaRequired.d.ts.map +1 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts +0 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
- package/dist/modules/clientEvents/clientEvents.d.ts +34 -0
- package/dist/modules/clientEvents/clientEvents.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/clearDeviceRegistrationRedirectParams.d.ts +35 -0
- package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/clearDeviceRegistrationRedirectParams.d.ts.map +1 -0
- package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/index.d.ts +2 -0
- package/dist/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/index.d.ts.map +1 -0
- package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts +8 -1
- package/dist/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +1 -0
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts.map +1 -1
- package/dist/modules/flow/attachFlowSource/attachFlowSource.instrumentation.d.ts +9 -0
- package/dist/modules/flow/attachFlowSource/attachFlowSource.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/broadcastFlow/broadcastFlow.instrumentation.d.ts +9 -0
- package/dist/modules/flow/broadcastFlow/broadcastFlow.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/cancelFlow/cancelFlow.d.ts +10 -3
- package/dist/modules/flow/cancelFlow/cancelFlow.d.ts.map +1 -1
- package/dist/modules/flow/cancelFlow/cancelFlow.instrumentation.d.ts +8 -0
- package/dist/modules/flow/cancelFlow/cancelFlow.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/getFlow/getFlow.d.ts +11 -3
- package/dist/modules/flow/getFlow/getFlow.d.ts.map +1 -1
- package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts +16 -3
- package/dist/modules/flow/getFlowQuote/getFlowQuote.d.ts.map +1 -1
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.d.ts +9 -0
- package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.d.ts.map +1 -0
- package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.d.ts +9 -0
- package/dist/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts +0 -4
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts.map +1 -1
- package/dist/modules/initializeClient/initializeClient.d.ts +16 -0
- package/dist/modules/initializeClient/initializeClient.d.ts.map +1 -1
- package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +12 -2
- package/dist/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts.map +1 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts +0 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +0 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts +1 -0
- package/dist/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.d.ts.map +1 -1
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts +1 -0
- package/dist/modules/mfa/isUserMissingMfaAuth/isUserMissingMfaAuth.d.ts.map +1 -1
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts +0 -3
- package/dist/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.d.ts.map +1 -1
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts +14 -1
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts.map +1 -1
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts +12 -1
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +33 -2
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.d.ts.map +1 -1
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +8 -0
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts.map +1 -1
- package/dist/modules/user/checkUserScopes/checkUserScopes.d.ts +28 -0
- package/dist/modules/user/checkUserScopes/checkUserScopes.d.ts.map +1 -0
- package/dist/modules/user/checkUserScopes/index.d.ts +2 -0
- package/dist/modules/user/checkUserScopes/index.d.ts.map +1 -0
- package/dist/modules/user/deleteUser/deleteUser.d.ts +8 -0
- package/dist/modules/user/deleteUser/deleteUser.d.ts.map +1 -1
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +9 -1
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts +17 -4
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
- package/dist/modules/user/refreshUser/refreshUser.d.ts +16 -3
- package/dist/modules/user/refreshUser/refreshUser.d.ts.map +1 -1
- package/dist/modules/user/updateUser/updateUser.d.ts +0 -1
- package/dist/modules/user/updateUser/updateUser.d.ts.map +1 -1
- package/dist/modules/user/user.types.d.ts +9 -1
- package/dist/modules/user/user.types.d.ts.map +1 -1
- package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts +30 -0
- package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/getEmbeddedWalletsRequiringUpgrade.d.ts.map +1 -0
- package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts +2 -0
- package/dist/modules/waas/getEmbeddedWalletsRequiringUpgrade/index.d.ts.map +1 -0
- package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts +23 -0
- package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/hasEmbeddedWalletsRequiringUpgrade.d.ts.map +1 -0
- package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts +2 -0
- package/dist/modules/waas/hasEmbeddedWalletsRequiringUpgrade/index.d.ts.map +1 -0
- package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts +11 -1
- package/dist/modules/wallets/connectAndVerifyWithWalletProvider/connectAndVerifyWithWalletProvider.d.ts.map +1 -1
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +11 -3
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
- package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts +16 -3
- package/dist/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +9 -1
- package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +11 -1
- package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletProviderDataByKey/getWalletProviderDataByKey.d.ts +2 -1
- package/dist/modules/wallets/getWalletProviderDataByKey/getWalletProviderDataByKey.d.ts.map +1 -1
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +9 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts.map +1 -1
- package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts +10 -2
- package/dist/modules/wallets/isWalletAccountVerified/isWalletAccountVerified.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +8 -0
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +8 -0
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -1
- package/dist/modules/wallets/networks/switchActiveNetwork/switchActiveNetwork.d.ts +11 -1
- package/dist/modules/wallets/networks/switchActiveNetwork/switchActiveNetwork.d.ts.map +1 -1
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts +10 -0
- package/dist/modules/wallets/proveWalletAccountOwnership/proveWalletAccountOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts +9 -1
- package/dist/modules/wallets/removeWalletAccount/removeWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +24 -0
- package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/index.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/getSelectedWalletAccount.d.ts +30 -0
- package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/getSelectedWalletAccount.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/index.d.ts +2 -0
- package/dist/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/index.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/index.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts +28 -0
- package/dist/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/index.d.ts +2 -0
- package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/index.d.ts.map +1 -0
- package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/setSelectedWalletAccount.d.ts +34 -0
- package/dist/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/setSelectedWalletAccount.d.ts.map +1 -0
- package/dist/modules/wallets/signMessage/signMessage.d.ts +12 -1
- package/dist/modules/wallets/signMessage/signMessage.d.ts.map +1 -1
- package/dist/modules/wallets/transferAmount/transferAmount.d.ts +13 -2
- package/dist/modules/wallets/transferAmount/transferAmount.d.ts.map +1 -1
- package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts +10 -1
- package/dist/modules/wallets/transferWalletAccount/transferWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts +11 -1
- package/dist/modules/wallets/utils/getWalletAccountFromAddress/getWalletAccountFromAddress.d.ts.map +1 -1
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +3 -0
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts +12 -1
- package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts.map +1 -1
- package/dist/services/instrumentation/createInstrumentation/createInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +40 -34
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/instrumentation.types.d.ts +50 -19
- package/dist/services/instrumentation/instrumentation.types.d.ts.map +1 -1
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -1
- package/dist/services/navigate/createNavigationHandler/createNavigationHandler.d.ts.map +1 -1
- package/dist/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/{updateAuthFromVerifyResponse-D1w-Aw9P.native.esm.js → updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js} +235 -159
- package/dist/updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-azIi_3FB.esm.js → updateAuthFromVerifyResponse-_oYRLK_w.esm.js} +235 -159
- package/dist/updateAuthFromVerifyResponse-_oYRLK_w.esm.js.map +1 -0
- package/dist/{updateAuthFromVerifyResponse-CElYpi97.cjs → updateAuthFromVerifyResponse-pgYXvDvj.cjs} +241 -159
- package/dist/updateAuthFromVerifyResponse-pgYXvDvj.cjs.map +1 -0
- package/dist/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.d.ts +12 -0
- package/dist/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.d.ts.map +1 -0
- package/dist/utils/assertSafeDeeplinkUrl/index.d.ts +2 -0
- package/dist/utils/assertSafeDeeplinkUrl/index.d.ts.map +1 -0
- package/dist/utils/assertSafeNavigationUrl/assertSafeNavigationUrl.d.ts +12 -0
- package/dist/utils/assertSafeNavigationUrl/assertSafeNavigationUrl.d.ts.map +1 -0
- package/dist/utils/assertSafeNavigationUrl/index.d.ts +2 -0
- package/dist/utils/assertSafeNavigationUrl/index.d.ts.map +1 -0
- package/dist/utils/getSecureCookieAttribute/getSecureCookieAttribute.d.ts +18 -0
- package/dist/utils/getSecureCookieAttribute/getSecureCookieAttribute.d.ts.map +1 -0
- package/dist/utils/getSecureCookieAttribute/index.d.ts +2 -0
- package/dist/utils/getSecureCookieAttribute/index.d.ts.map +1 -0
- package/dist/waas.cjs +72 -5
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +70 -5
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +70 -5
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +6 -6
- package/dist/waasCore.esm.js +6 -6
- package/dist/waasCore.native.esm.js +6 -6
- package/package.json +3 -3
- package/dist/getNetworkProviderFromNetworkId-Bfg-NkNJ.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CS4r9hi7.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-pknqqhk1.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BXe0VyI4.native.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BYaqAOml.esm.js.map +0 -1
- package/dist/isDynamicWaasEnabled-BwP1oowd.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-Btejc5g3.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-CqEcCTIe.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-Demz9zlH.native.esm.js.map +0 -1
- package/dist/isUserOnboardingComplete-C86NDY7I.cjs.map +0 -1
- package/dist/isUserOnboardingComplete-CBrAH0ZF.esm.js.map +0 -1
- package/dist/isUserOnboardingComplete-Cr-YTpcU.native.esm.js.map +0 -1
- package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +0 -10
- package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts.map +0 -1
- package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/index.d.ts.map +0 -1
- package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/index.d.ts.map +0 -1
- package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts +0 -12
- package/dist/modules/wallets/primaryWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.d.ts.map +0 -1
- package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts +0 -28
- package/dist/services/instrumentation/instrumentFunction/extractParams/extractParams.d.ts.map +0 -1
- package/dist/services/instrumentation/instrumentFunction/scrubResolvedValue/scrubResolvedValue.d.ts +0 -15
- package/dist/services/instrumentation/instrumentFunction/scrubResolvedValue/scrubResolvedValue.d.ts.map +0 -1
- package/dist/updateAuthFromVerifyResponse-CElYpi97.cjs.map +0 -1
- package/dist/updateAuthFromVerifyResponse-D1w-Aw9P.native.esm.js.map +0 -1
- package/dist/updateAuthFromVerifyResponse-azIi_3FB.esm.js.map +0 -1
- /package/dist/modules/wallets/{primaryWalletAccount → selectedWalletAccount}/getPrimaryWalletAccount/index.d.ts +0 -0
- /package/dist/modules/wallets/{primaryWalletAccount → selectedWalletAccount}/selectPrimaryWalletAccount/index.d.ts +0 -0
package/dist/index.native.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { $ as MfaRateLimitedError, A as
|
|
2
|
-
import {
|
|
3
|
-
import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-
|
|
4
|
-
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
5
|
-
import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-
|
|
6
|
-
import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-
|
|
1
|
+
import { $ as MfaRateLimitedError, A as getWalletAccounts, B as offEvent, C as extractSessionId, D as getWalletProviderRegistry, E as WalletProviderPriority, F as formatWalletAccountId, G as fetchAndStoreNonces, H as onceEvent, I as normalizeAddress, K as createApiClient, L as splitWalletProviderKey, N as getChainFromVerifiedCredentialChain, P as CHAINS_INFO_MAP, Q as SandboxMaximumThresholdReachedError, S as getOperatingSystem, T as getWalletProviderFromWalletAccount, V as onEvent, Z as getNonce, _ as SDK_API_CORE_VERSION, _t as BaseError, a as initializeWaasClientsForEagerRecovery, at as isCookieEnabled, b as DEFAULT_PII_FIELDS, bt as version, ct as getElevatedAccessToken, et as MfaInvalidOtpError, f as getWalletProviders, g as DYNAMIC_ICONIC_SPRITE_URL, ht as setDefaultClient, i as InvalidParamError, k as NoWalletProviderFoundError, lt as randomString, m as checkAndRaiseWalletAccountsChangedEvent, mt as getDefaultClient, n as upsertElevatedAccessToken, nt as InvalidExternalAuthError, ot as assertDefined, p as isUserMissingMfaAuth, pt as NONCE_POOL_SIZE, q as UnauthorizedError, r as parseElevatedAccessToken, rt as APIError, st as ValueMustBeDefinedError, t as updateAuthFromVerifyResponse, tt as LinkCredentialError, ut as getPlatform, v as instrumentFunction, vt as getCore, x as getUserAgent, y as scrubParameters, yt as name, z as emitEvent } from "./updateAuthFromVerifyResponse-DFjqCSu2.native.esm.js";
|
|
2
|
+
import { B as __logoutWithReason_wrapped, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, H as fetchProjectSettings, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, J as retryOnFail, K as createLocalStorageAdapter, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as isServerSideRendering, S as MergeAccountsConfirmationError, T as createKeychainService, U as createStorageKeySchema, V as generateSessionKeys, W as createStorage, X as isEqualShallow, Y as subscribeWithSelector, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, q as isSignedIn, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-Bsv12Q6B.native.esm.js";
|
|
3
|
+
import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-Dj_sLoBO.native.esm.js";
|
|
4
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-EY-OQORc.native.esm.js";
|
|
5
|
+
import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-D3HrBYje.native.esm.js";
|
|
6
|
+
import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-DVk2t98D.native.esm.js";
|
|
7
7
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
8
|
-
import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
8
|
+
import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
9
9
|
import * as z from "zod/mini";
|
|
10
10
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from "eventemitter3";
|
|
11
11
|
import { Passkey } from "react-native-passkey";
|
|
@@ -353,13 +353,26 @@ const initializeStorageSync = async (client) => {
|
|
|
353
353
|
//#endregion
|
|
354
354
|
//#region src/modules/user/refreshUser/refreshUser.ts
|
|
355
355
|
/**
|
|
356
|
-
* Refreshes the current user's
|
|
356
|
+
* Refreshes the current user's profile from the server.
|
|
357
357
|
*
|
|
358
|
-
* This
|
|
359
|
-
*
|
|
358
|
+
* This fetches the latest authenticated user from the backend and updates only
|
|
359
|
+
* the local user state, returning the `SdkUser`. It does not touch the auth
|
|
360
|
+
* token — use it when you just need up-to-date user data.
|
|
361
|
+
*
|
|
362
|
+
* Prefer `refreshAuth` when you need to rotate the auth token as well: it runs
|
|
363
|
+
* a full verify, updates both token and user state, and returns the raw
|
|
364
|
+
* `VerifyResponse` (including the new token).
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```ts
|
|
368
|
+
* const user = await refreshUser();
|
|
369
|
+
* console.log('Updated user:', user.email);
|
|
370
|
+
* ```
|
|
360
371
|
*
|
|
361
372
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
362
373
|
* @returns A promise that resolves to the authenticated user.
|
|
374
|
+
* @see refreshAuth
|
|
375
|
+
* @see deleteUser
|
|
363
376
|
* @instrumented
|
|
364
377
|
* @noHook Low-level refresh primitive that is not exposed as a React hook.
|
|
365
378
|
*/
|
|
@@ -410,9 +423,25 @@ var ClientAlreadyInitializedError = class extends BaseError {
|
|
|
410
423
|
*
|
|
411
424
|
* You only need to call this function if you are not using `autoInitialize: true` in createDynamicClient.
|
|
412
425
|
*
|
|
426
|
+
* @example
|
|
427
|
+
* ```ts
|
|
428
|
+
* const client = createDynamicClient({
|
|
429
|
+
* environmentId: 'env-id',
|
|
430
|
+
* autoInitialize: false,
|
|
431
|
+
* });
|
|
432
|
+
*
|
|
433
|
+
* try {
|
|
434
|
+
* await initializeClient(client);
|
|
435
|
+
* } catch (error) {
|
|
436
|
+
* console.error('Failed to initialize:', error);
|
|
437
|
+
* }
|
|
438
|
+
* ```
|
|
439
|
+
*
|
|
413
440
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
414
441
|
* @returns A promise that resolves when initialization is complete.
|
|
415
442
|
* @throws ClientAlreadyInitializedError If the client is already initialized.
|
|
443
|
+
* @see createDynamicClient
|
|
444
|
+
* @see waitForClientInitialized
|
|
416
445
|
* @instrumented
|
|
417
446
|
* @noHook Client lifecycle management is not exposed as a React hook.
|
|
418
447
|
*/
|
|
@@ -749,10 +778,67 @@ const createDynamicTransport = (params) => {
|
|
|
749
778
|
const createNavigationHandler = () => {
|
|
750
779
|
if (isServerSideRendering()) return () => Promise.reject(new UnavailableInServerSideError("createNavigationHandler"));
|
|
751
780
|
return async (url) => {
|
|
781
|
+
assertSafeNavigationUrl(url);
|
|
752
782
|
window.location.href = url;
|
|
753
783
|
};
|
|
754
784
|
};
|
|
755
785
|
|
|
786
|
+
//#endregion
|
|
787
|
+
//#region src/errors/UnsafeDeeplinkUrlError.ts
|
|
788
|
+
/**
|
|
789
|
+
* Thrown when a deeplink is opened with a URL whose scheme can execute script
|
|
790
|
+
* in the current origin (`javascript:`, `data:`, `vbscript:`). Unlike
|
|
791
|
+
* navigation, deeplinks legitimately use custom app schemes (e.g. `phantom:`,
|
|
792
|
+
* `metamask:`), so this guards via a denylist of dangerous schemes rather than
|
|
793
|
+
* an `http(s)` allowlist, preventing DOM XSS through the `window.location.assign`
|
|
794
|
+
* sink while leaving valid wallet deeplinks untouched.
|
|
795
|
+
*/
|
|
796
|
+
var UnsafeDeeplinkUrlError = class extends BaseError {
|
|
797
|
+
constructor({ scheme }) {
|
|
798
|
+
super({
|
|
799
|
+
cause: null,
|
|
800
|
+
code: "unsafe_deeplink_url_error",
|
|
801
|
+
docsUrl: null,
|
|
802
|
+
name: "UnsafeDeeplinkUrlError",
|
|
803
|
+
shortMessage: `Refusing to open a deeplink with an unsafe scheme "${scheme}". Script-executing schemes (javascript:, data:, vbscript:) are not allowed. This may indicate a compromised or misconfigured deeplink URL.`
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
//#endregion
|
|
809
|
+
//#region src/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.ts
|
|
810
|
+
/**
|
|
811
|
+
* Schemes that can execute script in the current origin and must never reach a
|
|
812
|
+
* deeplink navigation sink. Deeplinks legitimately use arbitrary custom app
|
|
813
|
+
* schemes (e.g. `phantom:`, `metamask:`), so a denylist of dangerous schemes is
|
|
814
|
+
* used here instead of the `http(s)` allowlist applied to standard navigation.
|
|
815
|
+
*/
|
|
816
|
+
const DANGEROUS_DEEPLINK_SCHEMES = new Set([
|
|
817
|
+
"javascript:",
|
|
818
|
+
"data:",
|
|
819
|
+
"vbscript:",
|
|
820
|
+
"blob:"
|
|
821
|
+
]);
|
|
822
|
+
/**
|
|
823
|
+
* Asserts that the given deeplink URL is safe to open, i.e. its scheme is not
|
|
824
|
+
* one that can execute script (`javascript:`, `data:`, `vbscript:`, `blob:`). Used as a
|
|
825
|
+
* defense-in-depth guard on the `window.location.assign` deeplink sink to
|
|
826
|
+
* prevent DOM XSS, while still permitting custom wallet app schemes.
|
|
827
|
+
*
|
|
828
|
+
* @param url - The deeplink URL string to validate.
|
|
829
|
+
* @throws {UnsafeDeeplinkUrlError} If the URL cannot be parsed or its scheme can execute script.
|
|
830
|
+
* @notInstrumented
|
|
831
|
+
*/
|
|
832
|
+
const assertSafeDeeplinkUrl = (url) => {
|
|
833
|
+
let parsed;
|
|
834
|
+
try {
|
|
835
|
+
parsed = new URL(url);
|
|
836
|
+
} catch {
|
|
837
|
+
throw new UnsafeDeeplinkUrlError({ scheme: "unknown" });
|
|
838
|
+
}
|
|
839
|
+
if (DANGEROUS_DEEPLINK_SCHEMES.has(parsed.protocol)) throw new UnsafeDeeplinkUrlError({ scheme: parsed.protocol });
|
|
840
|
+
};
|
|
841
|
+
|
|
756
842
|
//#endregion
|
|
757
843
|
//#region src/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.ts
|
|
758
844
|
/**
|
|
@@ -772,6 +858,7 @@ const createNavigationHandler = () => {
|
|
|
772
858
|
const createWebDeeplinkOpener = () => {
|
|
773
859
|
if (isServerSideRendering()) return () => Promise.reject(new UnavailableInServerSideError("createWebDeeplinkOpener"));
|
|
774
860
|
return async (url) => {
|
|
861
|
+
assertSafeDeeplinkUrl(url);
|
|
775
862
|
window.location.assign(url);
|
|
776
863
|
};
|
|
777
864
|
};
|
|
@@ -1112,8 +1199,18 @@ const createCore = (config) => {
|
|
|
1112
1199
|
* Manually calling `initializeClient` also allows you to catch any potential
|
|
1113
1200
|
* errors that may occur during initialization.
|
|
1114
1201
|
*
|
|
1202
|
+
* @example
|
|
1203
|
+
* ```ts
|
|
1204
|
+
* const client = createDynamicClient({
|
|
1205
|
+
* environmentId: 'your-environment-id',
|
|
1206
|
+
* appUrl: 'https://myapp.com',
|
|
1207
|
+
* });
|
|
1208
|
+
* ```
|
|
1209
|
+
*
|
|
1115
1210
|
* @param config - The configuration for the Dynamic client, like the environment ID, app url, etc.
|
|
1116
1211
|
* @returns The Dynamic client instance.
|
|
1212
|
+
* @see initializeClient
|
|
1213
|
+
* @see getDefaultClient
|
|
1117
1214
|
* @instrumented
|
|
1118
1215
|
*/
|
|
1119
1216
|
const createDynamicClient = (config) => {
|
|
@@ -1202,6 +1299,42 @@ var DeeplinkConnectAndVerifyUnsupportedError = class extends BaseError {
|
|
|
1202
1299
|
}
|
|
1203
1300
|
};
|
|
1204
1301
|
|
|
1302
|
+
//#endregion
|
|
1303
|
+
//#region src/errors/DeviceRegistrationIdentityMismatchError.ts
|
|
1304
|
+
/**
|
|
1305
|
+
* Thrown when completing device registration would replace the current session
|
|
1306
|
+
* with a different user's identity.
|
|
1307
|
+
*
|
|
1308
|
+
* The device registration token resolved to a user other than the one currently
|
|
1309
|
+
* authenticated, which can indicate a login-CSRF / session-fixation attempt, so
|
|
1310
|
+
* the returned session is rejected and the current session is left untouched.
|
|
1311
|
+
*
|
|
1312
|
+
* @example
|
|
1313
|
+
* ```ts
|
|
1314
|
+
* try {
|
|
1315
|
+
* await completeDeviceRegistration({ token });
|
|
1316
|
+
* } catch (error) {
|
|
1317
|
+
* if (error instanceof DeviceRegistrationIdentityMismatchError) {
|
|
1318
|
+
* // The current session was preserved; ask the user to retry on this device.
|
|
1319
|
+
* }
|
|
1320
|
+
* }
|
|
1321
|
+
* ```
|
|
1322
|
+
* @see completeDeviceRegistration
|
|
1323
|
+
* @see InvalidDeviceRegistrationRedirectError
|
|
1324
|
+
*/
|
|
1325
|
+
var DeviceRegistrationIdentityMismatchError = class extends BaseError {
|
|
1326
|
+
constructor() {
|
|
1327
|
+
super({
|
|
1328
|
+
cause: null,
|
|
1329
|
+
code: "device_registration_identity_mismatch_error",
|
|
1330
|
+
docsUrl: null,
|
|
1331
|
+
metaMessages: ["The device registration token resolved to a different user than the one currently authenticated.", "This can indicate a login-CSRF / session-fixation attempt, so the returned session was rejected and the current session was left untouched."],
|
|
1332
|
+
name: "DeviceRegistrationIdentityMismatchError",
|
|
1333
|
+
shortMessage: "Device registration completion was rejected because it would have replaced the current session with a different identity."
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
|
|
1205
1338
|
//#endregion
|
|
1206
1339
|
//#region src/errors/FeeEstimationFailedError.ts
|
|
1207
1340
|
var FeeEstimationFailedError = class extends BaseError {
|
|
@@ -1649,7 +1782,6 @@ const __checkStepUpAuth_wrapped = instrumentFunction({
|
|
|
1649
1782
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1650
1783
|
* @returns A promise that resolves to the assertion response containing the elevated access token.
|
|
1651
1784
|
* @instrumented
|
|
1652
|
-
* @redact-params
|
|
1653
1785
|
*/
|
|
1654
1786
|
const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDefaultClient()) => {
|
|
1655
1787
|
const core = getCore(client);
|
|
@@ -1677,8 +1809,7 @@ const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
|
|
|
1677
1809
|
} catch {
|
|
1678
1810
|
return;
|
|
1679
1811
|
}
|
|
1680
|
-
}
|
|
1681
|
-
redactAll: true
|
|
1812
|
+
}
|
|
1682
1813
|
});
|
|
1683
1814
|
|
|
1684
1815
|
//#endregion
|
|
@@ -1689,11 +1820,20 @@ const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
|
|
|
1689
1820
|
* This function allows authentication using JWT tokens from external providers,
|
|
1690
1821
|
* enabling integration with custom authentication systems.
|
|
1691
1822
|
*
|
|
1823
|
+
* @example
|
|
1824
|
+
* ```ts
|
|
1825
|
+
* const response = await signInWithExternalJwt({
|
|
1826
|
+
* externalJwt: 'eyJhbGciOiJSUzI1NiIs...',
|
|
1827
|
+
* });
|
|
1828
|
+
* ```
|
|
1829
|
+
*
|
|
1692
1830
|
* @param [params.externalJwt] - Optional external JWT token to authenticate with. Not required when using cookie based auth.
|
|
1831
|
+
* @param [params.sessionPublicKey] - Optional session public key for session-based auth.
|
|
1693
1832
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1694
1833
|
* @returns A promise that resolves to the authentication response from the server.
|
|
1834
|
+
* @see logout
|
|
1835
|
+
* @see refreshAuth
|
|
1695
1836
|
* @instrumented
|
|
1696
|
-
* @redact-params
|
|
1697
1837
|
*/
|
|
1698
1838
|
const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, client = getDefaultClient()) => {
|
|
1699
1839
|
const core = getCore(client);
|
|
@@ -1717,8 +1857,7 @@ const __signInWithExternalJwt_wrapped = instrumentFunction({
|
|
|
1717
1857
|
} catch {
|
|
1718
1858
|
return;
|
|
1719
1859
|
}
|
|
1720
|
-
}
|
|
1721
|
-
redactAll: true
|
|
1860
|
+
}
|
|
1722
1861
|
});
|
|
1723
1862
|
|
|
1724
1863
|
//#endregion
|
|
@@ -1726,8 +1865,21 @@ const __signInWithExternalJwt_wrapped = instrumentFunction({
|
|
|
1726
1865
|
/**
|
|
1727
1866
|
* Logs out the current user and clears all authentication data.
|
|
1728
1867
|
*
|
|
1868
|
+
* @example
|
|
1869
|
+
* ```ts
|
|
1870
|
+
* await logout();
|
|
1871
|
+
* ```
|
|
1872
|
+
*
|
|
1873
|
+
* @example
|
|
1874
|
+
* ```ts
|
|
1875
|
+
* // With explicit client for multi-client setups
|
|
1876
|
+
* await logout(myClient);
|
|
1877
|
+
* ```
|
|
1878
|
+
*
|
|
1729
1879
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1730
1880
|
* @returns A promise that resolves when the logout process is complete.
|
|
1881
|
+
* @see isAnyWalletAccountConnected
|
|
1882
|
+
* @see refreshAuth
|
|
1731
1883
|
* @notInstrumented
|
|
1732
1884
|
*/
|
|
1733
1885
|
const logout = async (client = getDefaultClient()) => {
|
|
@@ -1740,6 +1892,58 @@ const logout = async (client = getDefaultClient()) => {
|
|
|
1740
1892
|
return __logoutWithReason_wrapped({ reason: "user-intent" }, client);
|
|
1741
1893
|
};
|
|
1742
1894
|
|
|
1895
|
+
//#endregion
|
|
1896
|
+
//#region src/modules/auth/mergeUserAccounts/mergeUserAccounts.ts
|
|
1897
|
+
/**
|
|
1898
|
+
* Completes an account merge after a credential was found to already belong to
|
|
1899
|
+
* another user (surfaced as `MergeAccountsConfirmationError` during
|
|
1900
|
+
* verification / linking).
|
|
1901
|
+
*
|
|
1902
|
+
* When the merge has no field-level conflicts, call it with no resolutions to
|
|
1903
|
+
* merge directly. When the two accounts hold different values for the same
|
|
1904
|
+
* profile field, pass the user's chosen `conflictResolutions` (one per
|
|
1905
|
+
* conflict) so the backend knows which value to keep. On success the two users
|
|
1906
|
+
* are folded into one, the merged session is persisted, and the merged user is
|
|
1907
|
+
* returned.
|
|
1908
|
+
*
|
|
1909
|
+
* @example
|
|
1910
|
+
* ```ts
|
|
1911
|
+
* try {
|
|
1912
|
+
* await verifyWalletAccount({ walletAccount });
|
|
1913
|
+
* } catch (error) {
|
|
1914
|
+
* if (error instanceof MergeAccountsConfirmationError) {
|
|
1915
|
+
* // resolveConflicts is your own function (not provided by the SDK): given
|
|
1916
|
+
* // the conflicting fields, decide which value to keep for each one —
|
|
1917
|
+
* // usually by prompting the user — and return them as MergeUserConflictResolution[].
|
|
1918
|
+
* await mergeUserAccounts(
|
|
1919
|
+
* error.mergeConflicts
|
|
1920
|
+
* ? { conflictResolutions: resolveConflicts(error.mergeConflicts) }
|
|
1921
|
+
* : undefined,
|
|
1922
|
+
* );
|
|
1923
|
+
* }
|
|
1924
|
+
* }
|
|
1925
|
+
* ```
|
|
1926
|
+
* @param params.conflictResolutions - Optional per-field conflict resolutions.
|
|
1927
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1928
|
+
* @returns A promise that resolves to the merged user.
|
|
1929
|
+
* @see MergeAccountsConfirmationError
|
|
1930
|
+
* @see MergeUserConflictResolution
|
|
1931
|
+
* @notInstrumented
|
|
1932
|
+
*/
|
|
1933
|
+
const mergeUserAccounts = async ({ conflictResolutions } = {}, client = getDefaultClient()) => {
|
|
1934
|
+
const core = getCore(client);
|
|
1935
|
+
const apiClient = createApiClient({}, client);
|
|
1936
|
+
const hasConflictResolutions = conflictResolutions !== void 0 && conflictResolutions.length > 0;
|
|
1937
|
+
let response;
|
|
1938
|
+
if (hasConflictResolutions) response = await apiClient.verifyMergeUsers({
|
|
1939
|
+
environmentId: core.environmentId,
|
|
1940
|
+
mergeUserConflictResolutions: { mergeUserResolutions: conflictResolutions }
|
|
1941
|
+
});
|
|
1942
|
+
else response = await apiClient.mergeUsers({ environmentId: core.environmentId });
|
|
1943
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
1944
|
+
return response.user;
|
|
1945
|
+
};
|
|
1946
|
+
|
|
1743
1947
|
//#endregion
|
|
1744
1948
|
//#region src/modules/auth/passkeys/deletePasskey/deletePasskey.ts
|
|
1745
1949
|
/**
|
|
@@ -1825,12 +2029,18 @@ const serverRegisterPasskey = async ({ registration, createMfaToken }, client) =
|
|
|
1825
2029
|
* passwordless authentication. The user will be prompted to create a passkey
|
|
1826
2030
|
* using their device's biometric authentication or security key.
|
|
1827
2031
|
*
|
|
2032
|
+
* @example
|
|
2033
|
+
* ```ts
|
|
2034
|
+
* await registerPasskey();
|
|
2035
|
+
* ```
|
|
2036
|
+
*
|
|
1828
2037
|
* @param [params.createMfaToken] - Optional configuration for MFA token creation.
|
|
1829
2038
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1830
2039
|
* @returns A promise that resolves to the registration response.
|
|
1831
2040
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
2041
|
+
* @see signInWithPasskey
|
|
2042
|
+
* @see getPasskeys
|
|
1832
2043
|
* @instrumented
|
|
1833
|
-
* @redact-params
|
|
1834
2044
|
*/
|
|
1835
2045
|
const registerPasskey = async ({ createMfaToken } = {}, client = getDefaultClient()) => {
|
|
1836
2046
|
const core = getCore(client);
|
|
@@ -1853,8 +2063,7 @@ const __registerPasskey_wrapped = instrumentFunction({
|
|
|
1853
2063
|
} catch {
|
|
1854
2064
|
return;
|
|
1855
2065
|
}
|
|
1856
|
-
}
|
|
1857
|
-
redactAll: true
|
|
2066
|
+
}
|
|
1858
2067
|
});
|
|
1859
2068
|
|
|
1860
2069
|
//#endregion
|
|
@@ -1895,11 +2104,19 @@ const serverSigninPasskey = async ({ authentication, createMfaToken }, client) =
|
|
|
1895
2104
|
* credential, providing passwordless authentication using biometrics or
|
|
1896
2105
|
* security keys.
|
|
1897
2106
|
*
|
|
2107
|
+
* @example
|
|
2108
|
+
* ```ts
|
|
2109
|
+
* const response = await signInWithPasskey();
|
|
2110
|
+
* console.log('Signed in:', response.user.email);
|
|
2111
|
+
* ```
|
|
2112
|
+
*
|
|
2113
|
+
* @param [params.relatedOriginRpId] - Optional relying party ID for cross-origin authentication.
|
|
1898
2114
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1899
2115
|
* @returns A promise that resolves to the authentication response.
|
|
1900
2116
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
2117
|
+
* @see registerPasskey
|
|
2118
|
+
* @see getPasskeys
|
|
1901
2119
|
* @instrumented
|
|
1902
|
-
* @redact-params
|
|
1903
2120
|
*/
|
|
1904
2121
|
const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = getDefaultClient()) => {
|
|
1905
2122
|
const core = getCore(client);
|
|
@@ -1919,8 +2136,7 @@ const __signInWithPasskey_wrapped = instrumentFunction({
|
|
|
1919
2136
|
} catch {
|
|
1920
2137
|
return;
|
|
1921
2138
|
}
|
|
1922
|
-
}
|
|
1923
|
-
redactAll: true
|
|
2139
|
+
}
|
|
1924
2140
|
});
|
|
1925
2141
|
|
|
1926
2142
|
//#endregion
|
|
@@ -1980,6 +2196,14 @@ const __signInWithSocialRedirect_wrapped = instrumentFunction({
|
|
|
1980
2196
|
* @deprecated Renamed to {@link signInWithSocialRedirect}. This alias will be
|
|
1981
2197
|
* removed in a future major version.
|
|
1982
2198
|
*
|
|
2199
|
+
* @example
|
|
2200
|
+
* ```ts
|
|
2201
|
+
* // Prefer signInWithSocialRedirect instead
|
|
2202
|
+
* await signInWithSocialRedirect({ provider: 'google', redirectUrl: window.location.href });
|
|
2203
|
+
* ```
|
|
2204
|
+
*
|
|
2205
|
+
* @see signInWithSocialRedirect
|
|
2206
|
+
* @see completeSocialRedirect
|
|
1983
2207
|
* @instrumented
|
|
1984
2208
|
* @noHook Deprecated alias that is not exposed as a React hook.
|
|
1985
2209
|
*/
|
|
@@ -1997,6 +2221,20 @@ const __authenticateWithSocial_wrapped = instrumentFunction({
|
|
|
1997
2221
|
}
|
|
1998
2222
|
});
|
|
1999
2223
|
|
|
2224
|
+
//#endregion
|
|
2225
|
+
//#region src/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.native.ts
|
|
2226
|
+
/**
|
|
2227
|
+
* Clearing social OAuth redirect parameters is not supported on React Native.
|
|
2228
|
+
* There is no browser address bar to clean because `signInWithSocialPopUp`
|
|
2229
|
+
* processes the pop-up callback inline rather than via a URL redirect.
|
|
2230
|
+
*
|
|
2231
|
+
* @throws MethodNotImplementedError Always on React Native.
|
|
2232
|
+
* @notInstrumented
|
|
2233
|
+
*/
|
|
2234
|
+
const clearSocialRedirectParams = () => {
|
|
2235
|
+
throw new MethodNotImplementedError("clearSocialRedirectParams (not needed on React Native — signInWithSocialPopUp processes the callback inline)");
|
|
2236
|
+
};
|
|
2237
|
+
|
|
2000
2238
|
//#endregion
|
|
2001
2239
|
//#region src/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.native.ts
|
|
2002
2240
|
/**
|
|
@@ -2211,22 +2449,29 @@ const addOAuthUrlParams = ({ baseUrl, isGoogleDriveBackupEnabled, provider }) =>
|
|
|
2211
2449
|
|
|
2212
2450
|
//#endregion
|
|
2213
2451
|
//#region src/modules/auth/social/oauth/signInWithSocialRedirect/buildOAuthUrl/getOAuthBaseUrl/getOAuthBaseUrl.ts
|
|
2214
|
-
/**
|
|
2452
|
+
/**
|
|
2453
|
+
* Resolves the raw base URL string for a provider before parsing/validation.
|
|
2215
2454
|
*/
|
|
2216
|
-
const
|
|
2455
|
+
const resolveBaseUrl = (provider) => {
|
|
2217
2456
|
assertDefined(provider.provider, "Provider type not found");
|
|
2218
2457
|
const providerType = provider.provider;
|
|
2219
2458
|
if (providerType === ProviderEnum$1.Telegram) {
|
|
2220
2459
|
assertDefined(provider.authorizationUrl, "Telegram authorization URL not found");
|
|
2221
|
-
return
|
|
2460
|
+
return provider.authorizationUrl;
|
|
2222
2461
|
}
|
|
2223
2462
|
assertDefined(provider.baseAuthUrl, "Base auth URL not found");
|
|
2224
2463
|
if (providerType === ProviderEnum$1.Shopify) {
|
|
2225
2464
|
assertDefined(provider.shopifyStore, "Shopify store value not found in provider");
|
|
2226
|
-
|
|
2227
|
-
return new URL(loginBaseUrl);
|
|
2465
|
+
return provider.baseAuthUrl.replace("{{shopifyStore}}", provider.shopifyStore);
|
|
2228
2466
|
}
|
|
2229
|
-
return
|
|
2467
|
+
return provider.baseAuthUrl;
|
|
2468
|
+
};
|
|
2469
|
+
/** Helper function to build the OAuth base URL for a given provider. * @notInstrumented
|
|
2470
|
+
*/
|
|
2471
|
+
const getOAuthBaseUrl = (provider) => {
|
|
2472
|
+
const urlString = resolveBaseUrl(provider);
|
|
2473
|
+
assertSafeNavigationUrl(urlString);
|
|
2474
|
+
return new URL(urlString);
|
|
2230
2475
|
};
|
|
2231
2476
|
|
|
2232
2477
|
//#endregion
|
|
@@ -2362,19 +2607,39 @@ const __signInWithSocialPopUp_wrapped = instrumentFunction({
|
|
|
2362
2607
|
});
|
|
2363
2608
|
|
|
2364
2609
|
//#endregion
|
|
2365
|
-
//#region src/modules/wallets/
|
|
2610
|
+
//#region src/modules/wallets/selectedWalletAccount/getSelectedWalletAccount/getSelectedWalletAccount.ts
|
|
2366
2611
|
/**
|
|
2367
|
-
* Get the
|
|
2368
|
-
*
|
|
2369
|
-
*
|
|
2370
|
-
*
|
|
2612
|
+
* Get the wallet account currently selected for the user.
|
|
2613
|
+
*
|
|
2614
|
+
* The SDK itself does not use or care about which wallet is "selected" — it has
|
|
2615
|
+
* no bearing on authentication, signing, or any other SDK behaviour. This is
|
|
2616
|
+
* purely a convenience for *reading* which wallet the user most recently
|
|
2617
|
+
* selected (derived from the backend `lastSelectedAt` timestamp, across both
|
|
2618
|
+
* unverified and verified wallet accounts). Applications that need a notion of
|
|
2619
|
+
* an active/current wallet should own that selection state themselves.
|
|
2620
|
+
*
|
|
2621
|
+
* The one exception is the wagmi integration (`@dynamic-labs-sdk/wagmi`), which
|
|
2622
|
+
* mirrors the selected EVM wallet into wagmi's connector state.
|
|
2623
|
+
*
|
|
2624
|
+
* @example
|
|
2625
|
+
* ```ts
|
|
2626
|
+
* const selected = getSelectedWalletAccount();
|
|
2627
|
+
* if (selected) {
|
|
2628
|
+
* console.log('Selected wallet:', selected.address);
|
|
2629
|
+
* }
|
|
2630
|
+
* ```
|
|
2631
|
+
*
|
|
2632
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2633
|
+
* @returns The selected wallet account, or null if no wallet has been selected.
|
|
2634
|
+
* @see setSelectedWalletAccount
|
|
2635
|
+
* @see getWalletAccounts
|
|
2371
2636
|
* @notInstrumented
|
|
2372
2637
|
*/
|
|
2373
|
-
const
|
|
2638
|
+
const getSelectedWalletAccount = (client = getDefaultClient()) => {
|
|
2374
2639
|
const sortedLastSelectedWalletAccounts = getWalletAccounts(client).filter((walletAccount) => Boolean(walletAccount.lastSelectedAt)).sort((a, b) => b.lastSelectedAt.getTime() - a.lastSelectedAt.getTime());
|
|
2375
2640
|
if (sortedLastSelectedWalletAccounts.length === 0) return null;
|
|
2376
|
-
const [
|
|
2377
|
-
return
|
|
2641
|
+
const [selectedWallet] = sortedLastSelectedWalletAccounts;
|
|
2642
|
+
return selectedWallet;
|
|
2378
2643
|
};
|
|
2379
2644
|
|
|
2380
2645
|
//#endregion
|
|
@@ -2392,14 +2657,13 @@ const getPrimaryWalletAccount = (client = getDefaultClient()) => {
|
|
|
2392
2657
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2393
2658
|
* @returns A promise that resolves to the verify response.
|
|
2394
2659
|
* @instrumented
|
|
2395
|
-
* @redact-params
|
|
2396
2660
|
*/
|
|
2397
2661
|
const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefaultClient()) => {
|
|
2398
2662
|
const core = getCore(client);
|
|
2399
2663
|
const apiClient = createApiClient({ elevatedAccessTokenScope: TokenScope$1.Credentialunlink }, client);
|
|
2400
|
-
const
|
|
2401
|
-
const walletId =
|
|
2402
|
-
const isEmbeddedWallet = !!
|
|
2664
|
+
const selectedWallet = getSelectedWalletAccount(client);
|
|
2665
|
+
const walletId = selectedWallet?.verifiedCredentialId?.replace("-zerodev", "") ?? void 0;
|
|
2666
|
+
const isEmbeddedWallet = !!selectedWallet && getVerifiedCredentialForWalletAccount({ walletAccount: selectedWallet }, client)?.walletProvider === WalletProviderEnum.EmbeddedWallet;
|
|
2403
2667
|
const response = await apiClient.verifyUnlink({
|
|
2404
2668
|
environmentId: core.environmentId,
|
|
2405
2669
|
verifyUnlinkRequest: {
|
|
@@ -2420,8 +2684,7 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2420
2684
|
} catch {
|
|
2421
2685
|
return;
|
|
2422
2686
|
}
|
|
2423
|
-
}
|
|
2424
|
-
redactAll: true
|
|
2687
|
+
}
|
|
2425
2688
|
});
|
|
2426
2689
|
|
|
2427
2690
|
//#endregion
|
|
@@ -2513,6 +2776,59 @@ const getMultichainTokenBalances = async ({ balanceRequest }, client = getDefaul
|
|
|
2513
2776
|
*/
|
|
2514
2777
|
const getMultichainBalances = (params, client = getDefaultClient()) => getMultichainTokenBalances(params, client);
|
|
2515
2778
|
|
|
2779
|
+
//#endregion
|
|
2780
|
+
//#region src/modules/captcha/getCaptchaSettings/getCaptchaSettings.ts
|
|
2781
|
+
/**
|
|
2782
|
+
* The captcha providers Dynamic can be configured to use for an environment.
|
|
2783
|
+
* Use it to branch on which captcha widget to render for the active provider.
|
|
2784
|
+
*
|
|
2785
|
+
* Redeclared locally (rather than re-exported directly from the generated
|
|
2786
|
+
* `sdk-api-core`) so the public client entry point owns its own documented,
|
|
2787
|
+
* stable surface for this token.
|
|
2788
|
+
*
|
|
2789
|
+
* @example
|
|
2790
|
+
* ```ts
|
|
2791
|
+
* const settings = getCaptchaSettings();
|
|
2792
|
+
* if (settings?.provider === CaptchaProviderEnum.Hcaptcha) {
|
|
2793
|
+
* renderHcaptcha(settings.siteKey);
|
|
2794
|
+
* }
|
|
2795
|
+
* ```
|
|
2796
|
+
* @see getCaptchaSettings
|
|
2797
|
+
* @see CaptchaSettingsResult
|
|
2798
|
+
*/
|
|
2799
|
+
const CaptchaProviderEnum = CaptchaProviderEnum$1;
|
|
2800
|
+
/**
|
|
2801
|
+
* Returns the active captcha provider and site key, or undefined if captcha is not enabled.
|
|
2802
|
+
* Use this to determine which captcha widget to render and which site key to pass it.
|
|
2803
|
+
*
|
|
2804
|
+
* @example
|
|
2805
|
+
* ```ts
|
|
2806
|
+
* const settings = getCaptchaSettings();
|
|
2807
|
+
* if (settings) renderCaptcha(settings.provider, settings.siteKey);
|
|
2808
|
+
* ```
|
|
2809
|
+
* @see CaptchaSettingsResult
|
|
2810
|
+
* @see CaptchaProviderEnum
|
|
2811
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2812
|
+
* @returns The active captcha provider and site key, or undefined when captcha is not enabled.
|
|
2813
|
+
* @notInstrumented
|
|
2814
|
+
*/
|
|
2815
|
+
const getCaptchaSettings = (client = getDefaultClient()) => {
|
|
2816
|
+
const projectSettings = client.projectSettings;
|
|
2817
|
+
if (!projectSettings) return void 0;
|
|
2818
|
+
const { security } = projectSettings;
|
|
2819
|
+
if (security.captcha) {
|
|
2820
|
+
if (security.captcha.enabled) return {
|
|
2821
|
+
provider: security.captcha.provider ?? CaptchaProviderEnum.Hcaptcha,
|
|
2822
|
+
siteKey: security.captcha.siteKey
|
|
2823
|
+
};
|
|
2824
|
+
return;
|
|
2825
|
+
}
|
|
2826
|
+
if (security.hCaptcha?.enabled) return {
|
|
2827
|
+
provider: CaptchaProviderEnum.Hcaptcha,
|
|
2828
|
+
siteKey: security.hCaptcha.siteKey
|
|
2829
|
+
};
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2516
2832
|
//#endregion
|
|
2517
2833
|
//#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
|
|
2518
2834
|
/** @notInstrumented */
|
|
@@ -3072,14 +3388,50 @@ const requiresConversion = async ({ transaction }, client = getDefaultClient())
|
|
|
3072
3388
|
return !checkout.settlementConfig.settlements.some((settlement) => settlement.chainName === transaction.fromChainName && settlement.chainId === transaction.fromChainId && settlement.tokenAddress === transaction.fromToken);
|
|
3073
3389
|
};
|
|
3074
3390
|
|
|
3391
|
+
//#endregion
|
|
3392
|
+
//#region src/modules/deviceRegistration/clearDeviceRegistrationRedirectParams/clearDeviceRegistrationRedirectParams.native.ts
|
|
3393
|
+
/**
|
|
3394
|
+
* Clearing device registration redirect parameters is not supported on React
|
|
3395
|
+
* Native. There is no browser address bar to clean because the device
|
|
3396
|
+
* registration token arrives via a deep link rather than a URL redirect.
|
|
3397
|
+
*
|
|
3398
|
+
* @returns Never. Always throws on React Native.
|
|
3399
|
+
*
|
|
3400
|
+
* @throws {MethodNotImplementedError} Always on React Native.
|
|
3401
|
+
*
|
|
3402
|
+
* @example
|
|
3403
|
+
* ```ts
|
|
3404
|
+
* // On web only:
|
|
3405
|
+
* clearDeviceRegistrationRedirectParams();
|
|
3406
|
+
* ```
|
|
3407
|
+
*
|
|
3408
|
+
* @see {@link completeDeviceRegistration} to finish the registration flow.
|
|
3409
|
+
* @see {@link detectDeviceRegistrationRedirect} to check whether a URL is a
|
|
3410
|
+
* device registration callback.
|
|
3411
|
+
*
|
|
3412
|
+
* @notInstrumented
|
|
3413
|
+
*/
|
|
3414
|
+
const clearDeviceRegistrationRedirectParams = () => {
|
|
3415
|
+
throw new MethodNotImplementedError("clearDeviceRegistrationRedirectParams (not needed on React Native — the device registration token arrives via a deep link, not a URL redirect)");
|
|
3416
|
+
};
|
|
3417
|
+
|
|
3075
3418
|
//#endregion
|
|
3076
3419
|
//#region src/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.ts
|
|
3077
3420
|
const DEVICE_REGISTRATION_TOKEN_HEADER = "x-dynamic-device-registration-token";
|
|
3078
|
-
/**
|
|
3421
|
+
/**
|
|
3422
|
+
* Completes device registration using the token from a device registration
|
|
3423
|
+
* redirect, authenticating the current device against the user's account.
|
|
3424
|
+
*
|
|
3425
|
+
* @see detectDeviceRegistrationRedirect
|
|
3426
|
+
* @see clearDeviceRegistrationRedirectParams
|
|
3427
|
+
* @instrumented
|
|
3428
|
+
*/
|
|
3079
3429
|
const completeDeviceRegistration = async ({ deviceToken }, client = getDefaultClient()) => {
|
|
3080
3430
|
assertDefined(deviceToken, "deviceToken is required");
|
|
3081
3431
|
const core = getCore(client);
|
|
3432
|
+
const currentUser = core.state.get().user;
|
|
3082
3433
|
const response = await createApiClient({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
|
|
3434
|
+
if (currentUser && response.user?.id !== currentUser.id) throw new DeviceRegistrationIdentityMismatchError();
|
|
3083
3435
|
updateAuthFromVerifyResponse({ response }, client);
|
|
3084
3436
|
emitEvent({ event: "deviceRegistrationCompleted" }, client);
|
|
3085
3437
|
return response;
|
|
@@ -3260,6 +3612,22 @@ const withFlowSessionTokenCleanupOn401 = async ({ call, flowId }, client) => {
|
|
|
3260
3612
|
}
|
|
3261
3613
|
};
|
|
3262
3614
|
|
|
3615
|
+
//#endregion
|
|
3616
|
+
//#region src/modules/flow/attachFlowSource/attachFlowSource.instrumentation.ts
|
|
3617
|
+
/**
|
|
3618
|
+
* Explicit instrumentation payload for attachFlowSource. Reads the nested
|
|
3619
|
+
* `flow` and logs non-sensitive volume and routing dimensions only — never the
|
|
3620
|
+
* wallet address, and never the response's session token.
|
|
3621
|
+
*/
|
|
3622
|
+
const attachFlowSourceInstrumentation = { resolved: ({ flow }) => ({
|
|
3623
|
+
amount: flow.amount ?? null,
|
|
3624
|
+
currency: flow.currency ?? null,
|
|
3625
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3626
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3627
|
+
mode: flow.mode ?? null,
|
|
3628
|
+
sourceType: flow.sourceType ?? null
|
|
3629
|
+
}) };
|
|
3630
|
+
|
|
3263
3631
|
//#endregion
|
|
3264
3632
|
//#region src/modules/flow/attachFlowSource/attachFlowSource.ts
|
|
3265
3633
|
/**
|
|
@@ -3312,7 +3680,8 @@ const __attachFlowSource_wrapped = instrumentFunction({
|
|
|
3312
3680
|
} catch {
|
|
3313
3681
|
return;
|
|
3314
3682
|
}
|
|
3315
|
-
}
|
|
3683
|
+
},
|
|
3684
|
+
selectors: attachFlowSourceInstrumentation
|
|
3316
3685
|
});
|
|
3317
3686
|
|
|
3318
3687
|
//#endregion
|
|
@@ -3330,6 +3699,22 @@ const createFlowApiClient = async ({ flowId }, client) => {
|
|
|
3330
3699
|
};
|
|
3331
3700
|
};
|
|
3332
3701
|
|
|
3702
|
+
//#endregion
|
|
3703
|
+
//#region src/modules/flow/broadcastFlow/broadcastFlow.instrumentation.ts
|
|
3704
|
+
/**
|
|
3705
|
+
* Explicit instrumentation payload for broadcastFlow. Logs non-sensitive
|
|
3706
|
+
* volume and routing dimensions only — never the wallet address or any
|
|
3707
|
+
* session token — so we can understand volume moved through the flow product.
|
|
3708
|
+
*/
|
|
3709
|
+
const broadcastFlowInstrumentation = { resolved: (flow) => ({
|
|
3710
|
+
amount: flow.amount ?? null,
|
|
3711
|
+
currency: flow.currency ?? null,
|
|
3712
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3713
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3714
|
+
mode: flow.mode ?? null,
|
|
3715
|
+
sourceType: flow.sourceType ?? null
|
|
3716
|
+
}) };
|
|
3717
|
+
|
|
3333
3718
|
//#endregion
|
|
3334
3719
|
//#region src/modules/flow/broadcastFlow/broadcastFlow.ts
|
|
3335
3720
|
/**
|
|
@@ -3366,17 +3751,40 @@ const __broadcastFlow_wrapped = instrumentFunction({
|
|
|
3366
3751
|
} catch {
|
|
3367
3752
|
return;
|
|
3368
3753
|
}
|
|
3369
|
-
}
|
|
3754
|
+
},
|
|
3755
|
+
selectors: broadcastFlowInstrumentation
|
|
3370
3756
|
});
|
|
3371
3757
|
|
|
3758
|
+
//#endregion
|
|
3759
|
+
//#region src/modules/flow/cancelFlow/cancelFlow.instrumentation.ts
|
|
3760
|
+
/**
|
|
3761
|
+
* Explicit instrumentation payload for cancelFlow. Logs non-sensitive volume
|
|
3762
|
+
* and routing dimensions only — never the wallet address or any session token.
|
|
3763
|
+
*/
|
|
3764
|
+
const cancelFlowInstrumentation = { resolved: (flow) => ({
|
|
3765
|
+
amount: flow.amount ?? null,
|
|
3766
|
+
currency: flow.currency ?? null,
|
|
3767
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3768
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3769
|
+
mode: flow.mode ?? null,
|
|
3770
|
+
sourceType: flow.sourceType ?? null
|
|
3771
|
+
}) };
|
|
3772
|
+
|
|
3372
3773
|
//#endregion
|
|
3373
3774
|
//#region src/modules/flow/cancelFlow/cancelFlow.ts
|
|
3374
3775
|
/**
|
|
3375
|
-
* Cancels a flow before it has been broadcasted
|
|
3776
|
+
* Cancels a flow before it has been broadcasted.
|
|
3777
|
+
*
|
|
3778
|
+
* @example
|
|
3779
|
+
* ```ts
|
|
3780
|
+
* const cancelledFlow = await cancelFlow({ flowId: 'flow-abc123' });
|
|
3781
|
+
* ```
|
|
3376
3782
|
*
|
|
3377
|
-
* @param params
|
|
3783
|
+
* @param params.flowId - The unique identifier of the flow to cancel.
|
|
3378
3784
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3379
|
-
* @returns
|
|
3785
|
+
* @returns A promise that resolves to the cancelled flow.
|
|
3786
|
+
* @see getFlow
|
|
3787
|
+
* @see getFlowQuote
|
|
3380
3788
|
* @instrumented
|
|
3381
3789
|
*/
|
|
3382
3790
|
const cancelFlow = async ({ flowId }, client = getDefaultClient()) => {
|
|
@@ -3402,17 +3810,26 @@ const __cancelFlow_wrapped = instrumentFunction({
|
|
|
3402
3810
|
} catch {
|
|
3403
3811
|
return;
|
|
3404
3812
|
}
|
|
3405
|
-
}
|
|
3813
|
+
},
|
|
3814
|
+
selectors: cancelFlowInstrumentation
|
|
3406
3815
|
});
|
|
3407
3816
|
|
|
3408
3817
|
//#endregion
|
|
3409
3818
|
//#region src/modules/flow/getFlow/getFlow.ts
|
|
3410
3819
|
/**
|
|
3411
|
-
* Fetches a flow by its ID
|
|
3820
|
+
* Fetches a flow by its ID.
|
|
3821
|
+
*
|
|
3822
|
+
* @example
|
|
3823
|
+
* ```ts
|
|
3824
|
+
* const flow = await getFlow({ flowId: 'flow-abc123' });
|
|
3825
|
+
* console.log('Flow status:', flow.status);
|
|
3826
|
+
* ```
|
|
3412
3827
|
*
|
|
3413
|
-
* @param params
|
|
3828
|
+
* @param params.flowId - The unique identifier of the flow to fetch.
|
|
3414
3829
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3415
|
-
* @returns
|
|
3830
|
+
* @returns A promise that resolves to the flow object.
|
|
3831
|
+
* @see cancelFlow
|
|
3832
|
+
* @see getFlowQuote
|
|
3416
3833
|
* @notInstrumented
|
|
3417
3834
|
*/
|
|
3418
3835
|
const getFlow = async ({ flowId }, client = getDefaultClient()) => {
|
|
@@ -3426,11 +3843,24 @@ const getFlow = async ({ flowId }, client = getDefaultClient()) => {
|
|
|
3426
3843
|
//#endregion
|
|
3427
3844
|
//#region src/modules/flow/getFlowQuote/getFlowQuote.ts
|
|
3428
3845
|
/**
|
|
3429
|
-
* Fetches a quote for a flow
|
|
3846
|
+
* Fetches a quote for a flow.
|
|
3430
3847
|
*
|
|
3431
|
-
* @
|
|
3848
|
+
* @example
|
|
3849
|
+
* ```ts
|
|
3850
|
+
* const flow = await getFlowQuote({
|
|
3851
|
+
* flowId: 'flow-abc123',
|
|
3852
|
+
* slippage: 0.5,
|
|
3853
|
+
* });
|
|
3854
|
+
* ```
|
|
3855
|
+
*
|
|
3856
|
+
* @param params.flowId - The unique identifier of the flow.
|
|
3857
|
+
* @param [params.fromChainId] - Optional chain ID overriding the one set at attachFlowSource time.
|
|
3858
|
+
* @param [params.fromTokenAddress] - Optional token address (defaults to native token).
|
|
3859
|
+
* @param [params.slippage] - Acceptable slippage percentage.
|
|
3432
3860
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3433
|
-
* @returns
|
|
3861
|
+
* @returns A promise that resolves to the updated flow with quote data.
|
|
3862
|
+
* @see getFlow
|
|
3863
|
+
* @see cancelFlow
|
|
3434
3864
|
* @notInstrumented
|
|
3435
3865
|
*/
|
|
3436
3866
|
const getFlowQuote = async ({ flowId, fromChainId, fromTokenAddress, slippage }, client = getDefaultClient()) => {
|
|
@@ -3450,6 +3880,22 @@ const getFlowQuote = async ({ flowId, fromChainId, fromTokenAddress, slippage },
|
|
|
3450
3880
|
}, client);
|
|
3451
3881
|
};
|
|
3452
3882
|
|
|
3883
|
+
//#endregion
|
|
3884
|
+
//#region src/modules/flow/prepareFlowSigning/prepareFlowSigning.instrumentation.ts
|
|
3885
|
+
/**
|
|
3886
|
+
* Explicit instrumentation payload for prepareFlowSigning. Logs non-sensitive
|
|
3887
|
+
* volume and routing dimensions only — never the wallet address or any
|
|
3888
|
+
* session token.
|
|
3889
|
+
*/
|
|
3890
|
+
const prepareFlowSigningInstrumentation = { resolved: (flow) => ({
|
|
3891
|
+
amount: flow.amount ?? null,
|
|
3892
|
+
currency: flow.currency ?? null,
|
|
3893
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3894
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3895
|
+
mode: flow.mode ?? null,
|
|
3896
|
+
sourceType: flow.sourceType ?? null
|
|
3897
|
+
}) };
|
|
3898
|
+
|
|
3453
3899
|
//#endregion
|
|
3454
3900
|
//#region src/modules/flow/prepareFlowSigning/prepareFlowSigning.ts
|
|
3455
3901
|
/**
|
|
@@ -3487,9 +3933,26 @@ const __prepareFlowSigning_wrapped = instrumentFunction({
|
|
|
3487
3933
|
} catch {
|
|
3488
3934
|
return;
|
|
3489
3935
|
}
|
|
3490
|
-
}
|
|
3936
|
+
},
|
|
3937
|
+
selectors: prepareFlowSigningInstrumentation
|
|
3491
3938
|
});
|
|
3492
3939
|
|
|
3940
|
+
//#endregion
|
|
3941
|
+
//#region src/modules/flow/submitFlowTransaction/submitFlowTransaction.instrumentation.ts
|
|
3942
|
+
/**
|
|
3943
|
+
* Explicit instrumentation payload for submitFlowTransaction. Logs
|
|
3944
|
+
* non-sensitive volume and routing dimensions only — never the wallet address
|
|
3945
|
+
* or any session token — so executed flow volume is measurable.
|
|
3946
|
+
*/
|
|
3947
|
+
const submitFlowTransactionInstrumentation = { resolved: (flow) => ({
|
|
3948
|
+
amount: flow.amount ?? null,
|
|
3949
|
+
currency: flow.currency ?? null,
|
|
3950
|
+
fromChainId: flow.fromChainId ?? null,
|
|
3951
|
+
fromChainName: flow.fromChainName ?? null,
|
|
3952
|
+
mode: flow.mode ?? null,
|
|
3953
|
+
sourceType: flow.sourceType ?? null
|
|
3954
|
+
}) };
|
|
3955
|
+
|
|
3493
3956
|
//#endregion
|
|
3494
3957
|
//#region src/modules/flow/submitFlowTransaction/submitFlowTransaction.ts
|
|
3495
3958
|
/**
|
|
@@ -3533,7 +3996,8 @@ const __submitFlowTransaction_wrapped = instrumentFunction({
|
|
|
3533
3996
|
} catch {
|
|
3534
3997
|
return;
|
|
3535
3998
|
}
|
|
3536
|
-
}
|
|
3999
|
+
},
|
|
4000
|
+
selectors: submitFlowTransactionInstrumentation
|
|
3537
4001
|
});
|
|
3538
4002
|
|
|
3539
4003
|
//#endregion
|
|
@@ -3765,18 +4229,6 @@ const createKrakenExchangeTransfer = async (transferParams, client = getDefaultC
|
|
|
3765
4229
|
exchangeKey: ExchangeKeyEnum.Kraken
|
|
3766
4230
|
});
|
|
3767
4231
|
};
|
|
3768
|
-
const __createKrakenExchangeTransfer_impl = createKrakenExchangeTransfer;
|
|
3769
|
-
const __createKrakenExchangeTransfer_wrapped = instrumentFunction({
|
|
3770
|
-
fn: __createKrakenExchangeTransfer_impl,
|
|
3771
|
-
functionName: "createKrakenExchangeTransfer",
|
|
3772
|
-
getCore: () => {
|
|
3773
|
-
try {
|
|
3774
|
-
return getCore(getDefaultClient());
|
|
3775
|
-
} catch {
|
|
3776
|
-
return;
|
|
3777
|
-
}
|
|
3778
|
-
}
|
|
3779
|
-
});
|
|
3780
4232
|
|
|
3781
4233
|
//#endregion
|
|
3782
4234
|
//#region src/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.ts
|
|
@@ -3888,10 +4340,6 @@ var MoonPayProviderNotAvailableError = class extends BaseError {
|
|
|
3888
4340
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3889
4341
|
* @returns The signed MoonPay URL.
|
|
3890
4342
|
* @instrumented
|
|
3891
|
-
* @redact-params - the return is a bare signed onramp URL whose query string
|
|
3892
|
-
* carries the provider signature plus the user's wallet address; a bare-string
|
|
3893
|
-
* return is logged under the synthetic `result` key, which no key-based rule
|
|
3894
|
-
* covers, so redact the whole event.
|
|
3895
4343
|
*/
|
|
3896
4344
|
const getMoonPayUrl = async (params, client = getDefaultClient()) => {
|
|
3897
4345
|
const core = getCore(client);
|
|
@@ -3925,8 +4373,7 @@ const __getMoonPayUrl_wrapped = instrumentFunction({
|
|
|
3925
4373
|
} catch {
|
|
3926
4374
|
return;
|
|
3927
4375
|
}
|
|
3928
|
-
}
|
|
3929
|
-
redactAll: true
|
|
4376
|
+
}
|
|
3930
4377
|
});
|
|
3931
4378
|
|
|
3932
4379
|
//#endregion
|
|
@@ -3935,7 +4382,17 @@ const __getMoonPayUrl_wrapped = instrumentFunction({
|
|
|
3935
4382
|
* Allows waiting until all modules of the client have been properly initialized
|
|
3936
4383
|
* and are ready for use.
|
|
3937
4384
|
*
|
|
3938
|
-
* @
|
|
4385
|
+
* @example
|
|
4386
|
+
* ```ts
|
|
4387
|
+
* const client = createDynamicClient({ environmentId: 'env-id' });
|
|
4388
|
+
* await waitForClientInitialized(client);
|
|
4389
|
+
* // Client is now fully ready
|
|
4390
|
+
* ```
|
|
4391
|
+
*
|
|
4392
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4393
|
+
* @returns A promise that resolves once the client is fully initialized.
|
|
4394
|
+
* @see initializeClient
|
|
4395
|
+
* @see createDynamicClient
|
|
3939
4396
|
* @notInstrumented
|
|
3940
4397
|
* @noHook Client lifecycle management is not exposed as a hook; use useInitStatus.
|
|
3941
4398
|
*/
|
|
@@ -4510,7 +4967,6 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
4510
4967
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4511
4968
|
* @returns A promise that resolves to OTP verification details if verification is required, or undefined.
|
|
4512
4969
|
* @instrumented
|
|
4513
|
-
* @redact-params
|
|
4514
4970
|
*/
|
|
4515
4971
|
const updateUser = async ({ userFields }, client = getDefaultClient()) => {
|
|
4516
4972
|
const core = getCore(client);
|
|
@@ -4540,8 +4996,7 @@ const __updateUser_wrapped = instrumentFunction({
|
|
|
4540
4996
|
} catch {
|
|
4541
4997
|
return;
|
|
4542
4998
|
}
|
|
4543
|
-
}
|
|
4544
|
-
redactAll: true
|
|
4999
|
+
}
|
|
4545
5000
|
});
|
|
4546
5001
|
|
|
4547
5002
|
//#endregion
|
|
@@ -4755,7 +5210,6 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4755
5210
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4756
5211
|
* @returns A promise that resolves to the newly generated recovery codes.
|
|
4757
5212
|
* @instrumented
|
|
4758
|
-
* @redact-params
|
|
4759
5213
|
*/
|
|
4760
5214
|
const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
4761
5215
|
const core = getCore(client);
|
|
@@ -4771,8 +5225,7 @@ const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
|
4771
5225
|
} catch {
|
|
4772
5226
|
return;
|
|
4773
5227
|
}
|
|
4774
|
-
}
|
|
4775
|
-
redactAll: true
|
|
5228
|
+
}
|
|
4776
5229
|
});
|
|
4777
5230
|
|
|
4778
5231
|
//#endregion
|
|
@@ -4866,9 +5319,6 @@ const getMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
|
4866
5319
|
* @returns A promise that resolves to the TOTP registration response containing setup information,
|
|
4867
5320
|
* like the secret key and the OTP Auth URI.
|
|
4868
5321
|
* @instrumented
|
|
4869
|
-
* @redact-params - the response embeds the TOTP shared secret in both `secret`
|
|
4870
|
-
* and the `uri` (`otpauth://...?secret=...`); redact the whole event so the
|
|
4871
|
-
* seed never reaches logs via the un-keyed `uri` field.
|
|
4872
5322
|
*/
|
|
4873
5323
|
const registerTotpMfaDevice = async (client = getDefaultClient()) => {
|
|
4874
5324
|
const core = getCore(client);
|
|
@@ -4884,8 +5334,7 @@ const __registerTotpMfaDevice_wrapped = instrumentFunction({
|
|
|
4884
5334
|
} catch {
|
|
4885
5335
|
return;
|
|
4886
5336
|
}
|
|
4887
|
-
}
|
|
4888
|
-
redactAll: true
|
|
5337
|
+
}
|
|
4889
5338
|
});
|
|
4890
5339
|
|
|
4891
5340
|
//#endregion
|
|
@@ -4930,11 +5379,24 @@ const __setDefaultMfaDevice_wrapped = instrumentFunction({
|
|
|
4930
5379
|
*
|
|
4931
5380
|
* Once you have the OTP code, you should then use `verifyOTP` to verify it and complete the authentication process.
|
|
4932
5381
|
*
|
|
5382
|
+
* @example
|
|
5383
|
+
* ```ts
|
|
5384
|
+
* const { verificationUUID } = await sendEmailOTP({
|
|
5385
|
+
* email: 'user@example.com',
|
|
5386
|
+
* });
|
|
5387
|
+
* // Then verify with the code the user received
|
|
5388
|
+
* await verifyOTP({
|
|
5389
|
+
* otpVerification: { email: 'user@example.com', verificationUUID },
|
|
5390
|
+
* verificationToken: '123456',
|
|
5391
|
+
* });
|
|
5392
|
+
* ```
|
|
5393
|
+
*
|
|
4933
5394
|
* @param params.email - The email address to send the OTP to.
|
|
4934
5395
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4935
5396
|
* @returns A promise that resolves to an OTPVerification object containing the email and verification UUID.
|
|
5397
|
+
* @see verifyOTP
|
|
5398
|
+
* @see sendSmsOTP
|
|
4936
5399
|
* @instrumented
|
|
4937
|
-
* @redact-params
|
|
4938
5400
|
*/
|
|
4939
5401
|
const sendEmailOTP = async ({ email }, client = getDefaultClient()) => {
|
|
4940
5402
|
const core = getCore(client);
|
|
@@ -4962,8 +5424,7 @@ const __sendEmailOTP_wrapped = instrumentFunction({
|
|
|
4962
5424
|
} catch {
|
|
4963
5425
|
return;
|
|
4964
5426
|
}
|
|
4965
|
-
}
|
|
4966
|
-
redactAll: true
|
|
5427
|
+
}
|
|
4967
5428
|
});
|
|
4968
5429
|
|
|
4969
5430
|
//#endregion
|
|
@@ -5892,12 +6353,23 @@ const supportedCountries = {
|
|
|
5892
6353
|
/**
|
|
5893
6354
|
* Sends a one-time password (OTP) via SMS to the specified phone number.
|
|
5894
6355
|
*
|
|
6356
|
+
* @example
|
|
6357
|
+
* ```ts
|
|
6358
|
+
* const { verificationUUID } = await sendSmsOTP({
|
|
6359
|
+
* isoCountryCode: 'US',
|
|
6360
|
+
* phoneNumber: '5551234567',
|
|
6361
|
+
* });
|
|
6362
|
+
* // Then verify with the code the user received
|
|
6363
|
+
* await verifyOTP({ otpVerification: { phoneNumber: '5551234567', verificationUUID }, verificationToken: '123456' });
|
|
6364
|
+
* ```
|
|
6365
|
+
*
|
|
5895
6366
|
* @param params.isoCountryCode - The ISO country code for the phone number (e.g., 'US', 'CA', 'GB').
|
|
5896
6367
|
* @param params.phoneNumber - The phone number to send the OTP to.
|
|
5897
6368
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5898
6369
|
* @returns A promise that resolves to an OTPVerification object containing the phone details and verification UUID.
|
|
6370
|
+
* @see verifyOTP
|
|
6371
|
+
* @see sendEmailOTP
|
|
5899
6372
|
* @instrumented
|
|
5900
|
-
* @redact-params
|
|
5901
6373
|
*/
|
|
5902
6374
|
const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = getDefaultClient()) => {
|
|
5903
6375
|
const core = getCore(client);
|
|
@@ -5930,17 +6402,17 @@ const __sendSmsOTP_wrapped = instrumentFunction({
|
|
|
5930
6402
|
} catch {
|
|
5931
6403
|
return;
|
|
5932
6404
|
}
|
|
5933
|
-
}
|
|
5934
|
-
redactAll: true
|
|
6405
|
+
}
|
|
5935
6406
|
});
|
|
5936
6407
|
|
|
5937
6408
|
//#endregion
|
|
5938
6409
|
//#region src/modules/otp/verifyOTP/verifyOTPForUserSignIn/verifyOTPForUserSignIn.ts
|
|
5939
6410
|
/** @notInstrumented */
|
|
5940
|
-
const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, client) => {
|
|
6411
|
+
const verifyOTPForUserSignIn = async ({ allowNewMFALinking, otpVerification, verificationToken }, client) => {
|
|
5941
6412
|
const core = getCore(client);
|
|
5942
6413
|
const apiClient = createApiClient({}, client);
|
|
5943
6414
|
const verifyRequest = {
|
|
6415
|
+
...allowNewMFALinking !== void 0 && { allowNewMFALinking },
|
|
5944
6416
|
verificationToken,
|
|
5945
6417
|
verificationUUID: otpVerification.verificationUUID
|
|
5946
6418
|
};
|
|
@@ -5983,14 +6455,26 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
5983
6455
|
* This function validates the OTP code provided by the user and completes
|
|
5984
6456
|
* the verification process for either sign-in or account updates.
|
|
5985
6457
|
*
|
|
6458
|
+
* @example
|
|
6459
|
+
* ```ts
|
|
6460
|
+
* const { verificationUUID } = await sendEmailOTP({ email: 'user@example.com' });
|
|
6461
|
+
* const response = await verifyOTP({
|
|
6462
|
+
* otpVerification: { email: 'user@example.com', verificationUUID },
|
|
6463
|
+
* verificationToken: '123456',
|
|
6464
|
+
* });
|
|
6465
|
+
* ```
|
|
6466
|
+
*
|
|
6467
|
+
* @param [params.allowNewMFALinking] - Whether sign-in may return a credential-link elevated token for users without MFA.
|
|
5986
6468
|
* @param params.otpVerification - The OTP verification object containing verification details.
|
|
5987
6469
|
* @param params.verificationToken - The token received from the OTP verification process.
|
|
6470
|
+
* @param [params.requestedScopes] - Optional token scopes to request during verification.
|
|
5988
6471
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5989
6472
|
* @returns A promise that resolves to the verify response object upon successful verification.
|
|
6473
|
+
* @see sendEmailOTP
|
|
6474
|
+
* @see sendSmsOTP
|
|
5990
6475
|
* @instrumented
|
|
5991
|
-
* @redact-params
|
|
5992
6476
|
*/
|
|
5993
|
-
const verifyOTP = async ({
|
|
6477
|
+
const verifyOTP = async ({ allowNewMFALinking, otpVerification, requestedScopes, verificationToken }, client = getDefaultClient()) => {
|
|
5994
6478
|
preconnectWaasIframe(client);
|
|
5995
6479
|
let response;
|
|
5996
6480
|
if (client.user) response = await verifyOTPForUserUpdate({
|
|
@@ -5999,6 +6483,7 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
|
|
|
5999
6483
|
verificationToken
|
|
6000
6484
|
}, client);
|
|
6001
6485
|
else response = await verifyOTPForUserSignIn({
|
|
6486
|
+
allowNewMFALinking,
|
|
6002
6487
|
otpVerification,
|
|
6003
6488
|
verificationToken
|
|
6004
6489
|
}, client);
|
|
@@ -6015,8 +6500,7 @@ const __verifyOTP_wrapped = instrumentFunction({
|
|
|
6015
6500
|
} catch {
|
|
6016
6501
|
return;
|
|
6017
6502
|
}
|
|
6018
|
-
}
|
|
6019
|
-
redactAll: true
|
|
6503
|
+
}
|
|
6020
6504
|
});
|
|
6021
6505
|
|
|
6022
6506
|
//#endregion
|
|
@@ -6098,6 +6582,33 @@ const getSwapStatus = async (params, client = getDefaultClient()) => {
|
|
|
6098
6582
|
}
|
|
6099
6583
|
};
|
|
6100
6584
|
|
|
6585
|
+
//#endregion
|
|
6586
|
+
//#region src/modules/user/checkUserScopes/checkUserScopes.ts
|
|
6587
|
+
/**
|
|
6588
|
+
* Checks whether the given user has all the specified scopes.
|
|
6589
|
+
*
|
|
6590
|
+
* The user's `scope` field is a whitespace-separated string of granted
|
|
6591
|
+
* permissions (per RFC 8693 §4.2). This helper splits it and verifies that
|
|
6592
|
+
* every entry in `scopes` is present.
|
|
6593
|
+
*
|
|
6594
|
+
* @example
|
|
6595
|
+
* const user = getDefaultClient().user;
|
|
6596
|
+
* if (user && checkUserScopes({ user, scopes: ['wallets:read'] })) {
|
|
6597
|
+
* showWalletBalances();
|
|
6598
|
+
* }
|
|
6599
|
+
*
|
|
6600
|
+
* @param params.user - The authenticated user to check.
|
|
6601
|
+
* @param params.scopes - The scope strings the user must have.
|
|
6602
|
+
* @returns `true` if the user has every scope in `scopes`, `false` otherwise.
|
|
6603
|
+
* @see User
|
|
6604
|
+
* @see updateUser
|
|
6605
|
+
* @notInstrumented
|
|
6606
|
+
*/
|
|
6607
|
+
const checkUserScopes = ({ scopes, user }) => {
|
|
6608
|
+
const grantedScopes = user.scope?.split(/\s+/).filter(Boolean) ?? [];
|
|
6609
|
+
return scopes.every((requiredScope) => grantedScopes.includes(requiredScope));
|
|
6610
|
+
};
|
|
6611
|
+
|
|
6101
6612
|
//#endregion
|
|
6102
6613
|
//#region src/modules/user/deleteUser/deleteUser.ts
|
|
6103
6614
|
/**
|
|
@@ -6106,8 +6617,16 @@ const getSwapStatus = async (params, client = getDefaultClient()) => {
|
|
|
6106
6617
|
* This function performs a hard delete of the user account. Upon successful deletion,
|
|
6107
6618
|
* the user will be automatically logged out and all authentication data will be cleared.
|
|
6108
6619
|
*
|
|
6620
|
+
* @example
|
|
6621
|
+
* ```ts
|
|
6622
|
+
* // Permanently delete the user's account
|
|
6623
|
+
* await deleteUser();
|
|
6624
|
+
* ```
|
|
6625
|
+
*
|
|
6109
6626
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6110
6627
|
* @returns A promise that resolves when the user account is successfully deleted.
|
|
6628
|
+
* @see logout
|
|
6629
|
+
* @see refreshUser
|
|
6111
6630
|
* @instrumented
|
|
6112
6631
|
*/
|
|
6113
6632
|
const deleteUser = async (client = getDefaultClient()) => {
|
|
@@ -7441,8 +7960,14 @@ const getAddressesWithTypesFromConnectionResult = (connectionResult) => {
|
|
|
7441
7960
|
*
|
|
7442
7961
|
* Note: This function will not verify the wallet account, use the verifyWalletAccount function to do that
|
|
7443
7962
|
* or connectAndVerifyWithWalletProvider to do that in a single step.
|
|
7444
|
-
*
|
|
7445
|
-
* @
|
|
7963
|
+
*
|
|
7964
|
+
* @example
|
|
7965
|
+
* ```ts
|
|
7966
|
+
* const walletAccount = await connectWithWalletProvider({
|
|
7967
|
+
* walletProviderKey: 'metamaskevm',
|
|
7968
|
+
* });
|
|
7969
|
+
* console.log(walletAccount.address);
|
|
7970
|
+
* ```
|
|
7446
7971
|
*
|
|
7447
7972
|
* @param params.walletProviderKey - The unique key identifying the wallet provider to connect to (e.g. 'metamaskevm', 'phantomsol').
|
|
7448
7973
|
* @param [params.addToDynamicWalletAccounts] - Whether to add the connected wallet account to the user's wallet accounts. Defaults to true.
|
|
@@ -7450,7 +7975,9 @@ const getAddressesWithTypesFromConnectionResult = (connectionResult) => {
|
|
|
7450
7975
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7451
7976
|
* @returns A promise that resolves to the connected wallet account.
|
|
7452
7977
|
* @throws NoAddressFoundError If the request to connect was successful but no address is connected to your app.
|
|
7453
|
-
*
|
|
7978
|
+
* @see verifyWalletAccount
|
|
7979
|
+
* @see connectAndVerifyWithWalletProvider
|
|
7980
|
+
* @instrumented
|
|
7454
7981
|
*/
|
|
7455
7982
|
const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWalletAccounts = true, hardwareWalletVendor }, client = getDefaultClient()) => {
|
|
7456
7983
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
@@ -7587,9 +8114,19 @@ const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client)
|
|
|
7587
8114
|
* This function generates a sign-in message and requires the user to sign it
|
|
7588
8115
|
* with their wallet's private key, proving they control the wallet address.
|
|
7589
8116
|
*
|
|
8117
|
+
* @example
|
|
8118
|
+
* ```ts
|
|
8119
|
+
* const { messageToSign, signature } = await proveWalletAccountOwnership({
|
|
8120
|
+
* walletAccount: wallets[0],
|
|
8121
|
+
* });
|
|
8122
|
+
* // Send signature to your backend for verification
|
|
8123
|
+
* ```
|
|
8124
|
+
*
|
|
7590
8125
|
* @param params.walletAccount - The wallet account to prove ownership of.
|
|
7591
8126
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7592
8127
|
* @returns A promise that resolves to an object containing the message and signature.
|
|
8128
|
+
* @see signMessage
|
|
8129
|
+
* @see verifyWalletAccount
|
|
7593
8130
|
* @instrumented
|
|
7594
8131
|
*/
|
|
7595
8132
|
const proveWalletAccountOwnership = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
@@ -7693,11 +8230,22 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
|
|
|
7693
8230
|
* This function requires the user to sign a message to prove wallet ownership,
|
|
7694
8231
|
* then sets the wallet account as verified.
|
|
7695
8232
|
*
|
|
8233
|
+
* @example
|
|
8234
|
+
* ```ts
|
|
8235
|
+
* const walletAccount = await connectWithWalletProvider({
|
|
8236
|
+
* walletProviderKey: 'metamaskevm',
|
|
8237
|
+
* });
|
|
8238
|
+
* const verified = await verifyWalletAccount({ walletAccount });
|
|
8239
|
+
* ```
|
|
8240
|
+
*
|
|
7696
8241
|
* @param params.walletAccount - The wallet account to verify ownership of.
|
|
8242
|
+
* @param [params.requestedScopes] - Optional token scopes to request during verification.
|
|
7697
8243
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7698
8244
|
* @returns A promise that resolves to the verified wallet account.
|
|
7699
8245
|
* @throws WalletAccountAlreadyVerifiedError If the wallet is already verified.
|
|
7700
8246
|
* @throws WalletAlreadyLinkedToAnotherUserError If the wallet is linked to another user.
|
|
8247
|
+
* @see connectWithWalletProvider
|
|
8248
|
+
* @see connectAndVerifyWithWalletProvider
|
|
7701
8249
|
* @instrumented
|
|
7702
8250
|
*/
|
|
7703
8251
|
const verifyWalletAccount = async ({ walletAccount, requestedScopes }, client = getDefaultClient()) => {
|
|
@@ -7747,10 +8295,20 @@ const isDeeplinkWalletProvider = ({ walletProvider }) => walletProvider.walletPr
|
|
|
7747
8295
|
* `verifyWalletAccount` separately from a new user gesture (e.g. a "Verify
|
|
7748
8296
|
* Ownership" button).
|
|
7749
8297
|
*
|
|
8298
|
+
* @example
|
|
8299
|
+
* ```ts
|
|
8300
|
+
* const walletAccount = await connectAndVerifyWithWalletProvider({
|
|
8301
|
+
* walletProviderKey: 'metamaskevm',
|
|
8302
|
+
* });
|
|
8303
|
+
* console.log('Verified address:', walletAccount.address);
|
|
8304
|
+
* ```
|
|
8305
|
+
*
|
|
7750
8306
|
* @param params.walletProviderKey - The unique key identifying the wallet provider to connect to.
|
|
7751
8307
|
* @param [params.hardwareWalletVendor] - The hardware wallet vendor, if connecting via a hardware wallet (e.g. 'ledger').
|
|
7752
8308
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7753
8309
|
* @returns A promise that resolves to the connected and verified wallet account.
|
|
8310
|
+
* @see connectWithWalletProvider
|
|
8311
|
+
* @see verifyWalletAccount
|
|
7754
8312
|
* @instrumented
|
|
7755
8313
|
*/
|
|
7756
8314
|
const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareWalletVendor }, client = getDefaultClient()) => {
|
|
@@ -7812,9 +8370,17 @@ const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
|
7812
8370
|
* This function returns the list of wallet addresses that are currently
|
|
7813
8371
|
* connected and available through the specified wallet provider.
|
|
7814
8372
|
*
|
|
8373
|
+
* @example
|
|
8374
|
+
* ```ts
|
|
8375
|
+
* const addresses = getConnectedAddresses({ walletProviderKey: 'metamaskevm' });
|
|
8376
|
+
* console.log('Connected:', addresses);
|
|
8377
|
+
* ```
|
|
8378
|
+
*
|
|
7815
8379
|
* @param params.walletProviderKey - The unique key of the wallet provider to query.
|
|
7816
8380
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7817
8381
|
* @returns An array of connected wallet addresses.
|
|
8382
|
+
* @see connectWithWalletProvider
|
|
8383
|
+
* @see getWalletAccounts
|
|
7818
8384
|
* @notInstrumented
|
|
7819
8385
|
*/
|
|
7820
8386
|
const getConnectedAddresses = ({ walletProviderKey }, client = getDefaultClient()) => {
|
|
@@ -7846,6 +8412,7 @@ const getWalletAccountAddressByType = ({ type, walletAccount }) => {
|
|
|
7846
8412
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7847
8413
|
* @returns The data for the wallet provider.
|
|
7848
8414
|
* @notInstrumented
|
|
8415
|
+
* @hook Exposed as a hook so consumers get reactive wallet provider data, updated when the wallet provider registry changes.
|
|
7849
8416
|
*/
|
|
7850
8417
|
const getWalletProviderDataByKey = ({ walletProviderKey }, client = getDefaultClient()) => {
|
|
7851
8418
|
const { chain, groupKey, key, metadata, walletProviderType } = getWalletProviderByKey({ walletProviderKey }, client);
|
|
@@ -7894,8 +8461,17 @@ const isHardwareWalletAccount = ({ walletAccount }) => walletAccount.hardwareWal
|
|
|
7894
8461
|
* else your app considers "signed in" (e.g. `client.user`, completed onboarding,
|
|
7895
8462
|
* a required embedded wallet, …).
|
|
7896
8463
|
*
|
|
8464
|
+
* @example
|
|
8465
|
+
* ```ts
|
|
8466
|
+
* if (isAnyWalletAccountConnected()) {
|
|
8467
|
+
* console.log('At least one wallet is connected');
|
|
8468
|
+
* }
|
|
8469
|
+
* ```
|
|
8470
|
+
*
|
|
7897
8471
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7898
8472
|
* @returns True if the session has at least one wallet account, false otherwise.
|
|
8473
|
+
* @see getWalletAccounts
|
|
8474
|
+
* @see isWalletAccountVerified
|
|
7899
8475
|
* @notInstrumented
|
|
7900
8476
|
*/
|
|
7901
8477
|
const isAnyWalletAccountConnected = (client = getDefaultClient()) => getWalletAccounts(client).length > 0;
|
|
@@ -7905,8 +8481,16 @@ const isAnyWalletAccountConnected = (client = getDefaultClient()) => getWalletAc
|
|
|
7905
8481
|
/**
|
|
7906
8482
|
* Checks if a wallet account has been verified by a user.
|
|
7907
8483
|
*
|
|
7908
|
-
* @
|
|
8484
|
+
* @example
|
|
8485
|
+
* ```ts
|
|
8486
|
+
* const wallets = getWalletAccounts();
|
|
8487
|
+
* const verified = wallets.filter(w => isWalletAccountVerified({ walletAccount: w }));
|
|
8488
|
+
* ```
|
|
8489
|
+
*
|
|
8490
|
+
* @param params.walletAccount - The wallet account to check.
|
|
7909
8491
|
* @returns True if the wallet account has been verified, false otherwise.
|
|
8492
|
+
* @see verifyWalletAccount
|
|
8493
|
+
* @see getWalletAccounts
|
|
7910
8494
|
* @notInstrumented
|
|
7911
8495
|
*/
|
|
7912
8496
|
const isWalletAccountVerified = ({ walletAccount }) => {
|
|
@@ -7996,9 +8580,17 @@ const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
|
|
|
7996
8580
|
* {@link getTokenBalances}; for a multi-chain portfolio snapshot, use
|
|
7997
8581
|
* {@link getMultichainTokenBalances}.
|
|
7998
8582
|
*
|
|
8583
|
+
* @example
|
|
8584
|
+
* ```ts
|
|
8585
|
+
* const { balance } = await getNativeBalance({ walletAccount: wallets[0] });
|
|
8586
|
+
* console.log('Native balance:', balance);
|
|
8587
|
+
* ```
|
|
8588
|
+
*
|
|
7999
8589
|
* @param params.walletAccount - The wallet account to get the balance for.
|
|
8000
8590
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8001
8591
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
8592
|
+
* @see getMultichainTokenBalances
|
|
8593
|
+
* @see switchActiveNetwork
|
|
8002
8594
|
* @notInstrumented
|
|
8003
8595
|
*/
|
|
8004
8596
|
const getNativeBalance = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
@@ -8018,6 +8610,14 @@ const getNativeBalance = async ({ walletAccount }, client = getDefaultClient())
|
|
|
8018
8610
|
* with the token-balance fetchers (`getTokenBalances` /
|
|
8019
8611
|
* `getMultichainTokenBalances`).
|
|
8020
8612
|
*
|
|
8613
|
+
* @example
|
|
8614
|
+
* ```ts
|
|
8615
|
+
* // Prefer getNativeBalance instead
|
|
8616
|
+
* const balance = await getNativeBalance({ walletAccount });
|
|
8617
|
+
* ```
|
|
8618
|
+
*
|
|
8619
|
+
* @see getNativeBalance
|
|
8620
|
+
* @see getMultichainBalances
|
|
8021
8621
|
* @notInstrumented
|
|
8022
8622
|
* @noHook Deprecated; the replacement is exposed via its own hook.
|
|
8023
8623
|
*/
|
|
@@ -8103,11 +8703,21 @@ const isProgrammaticNetworkSwitchAvailable = ({ walletAccount }, client = getDef
|
|
|
8103
8703
|
* This function programmatically changes the network
|
|
8104
8704
|
* that the wallet is currently connected to.
|
|
8105
8705
|
*
|
|
8706
|
+
* @example
|
|
8707
|
+
* ```ts
|
|
8708
|
+
* await switchActiveNetwork({
|
|
8709
|
+
* walletAccount: wallets[0],
|
|
8710
|
+
* networkId: '137', // Polygon
|
|
8711
|
+
* });
|
|
8712
|
+
* ```
|
|
8713
|
+
*
|
|
8106
8714
|
* @param params.networkId - The identifier of the network to switch to. Should match the networkId of the network data.
|
|
8107
8715
|
* @param params.walletAccount - The wallet account to switch networks for.
|
|
8108
8716
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8109
8717
|
* @returns A promise that resolves when the network switch is complete.
|
|
8110
8718
|
* @throws NetworkSwitchingUnavailableError If the wallet provider doesn't support network switching.
|
|
8719
|
+
* @see getNativeBalance
|
|
8720
|
+
* @see isProgrammaticNetworkSwitchAvailable
|
|
8111
8721
|
* @instrumented
|
|
8112
8722
|
*/
|
|
8113
8723
|
const switchActiveNetwork = async ({ networkId, walletAccount }, client = getDefaultClient()) => {
|
|
@@ -8133,15 +8743,37 @@ const __switchActiveNetwork_wrapped = instrumentFunction({
|
|
|
8133
8743
|
});
|
|
8134
8744
|
|
|
8135
8745
|
//#endregion
|
|
8136
|
-
//#region src/modules/wallets/
|
|
8746
|
+
//#region src/modules/wallets/selectedWalletAccount/setSelectedWalletAccount/setSelectedWalletAccount.ts
|
|
8137
8747
|
/**
|
|
8138
|
-
*
|
|
8748
|
+
* Set the wallet account that is currently selected for the user.
|
|
8749
|
+
*
|
|
8750
|
+
* The SDK itself does not use or care about which wallet is "selected" — this
|
|
8751
|
+
* only records the selection (updating the backend `lastSelectedAt` and, for
|
|
8752
|
+
* verified wallets, persisting it server-side) so it can later be read back via
|
|
8753
|
+
* `getSelectedWalletAccount`. It has no bearing on authentication or signing.
|
|
8754
|
+
* Applications that need a notion of an active/current wallet should own that
|
|
8755
|
+
* selection state themselves.
|
|
8756
|
+
*
|
|
8757
|
+
* The one exception is the wagmi integration (`@dynamic-labs-sdk/wagmi`), which
|
|
8758
|
+
* relies on the selected EVM wallet.
|
|
8759
|
+
*
|
|
8760
|
+
* @example
|
|
8761
|
+
* ```ts
|
|
8762
|
+
* const wallets = getWalletAccounts();
|
|
8763
|
+
* await setSelectedWalletAccount({ walletAccount: wallets[1] });
|
|
8764
|
+
* ```
|
|
8765
|
+
*
|
|
8766
|
+
* @param params.walletAccount - The wallet account to mark as selected.
|
|
8767
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8768
|
+
* @returns A promise that resolves when the selection is persisted.
|
|
8769
|
+
* @see getSelectedWalletAccount
|
|
8770
|
+
* @see getWalletAccounts
|
|
8139
8771
|
* @instrumented
|
|
8140
|
-
* @noHook The
|
|
8772
|
+
* @noHook The selected-wallet concept is not exposed as a hook.
|
|
8141
8773
|
*/
|
|
8142
|
-
const
|
|
8774
|
+
const setSelectedWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
8143
8775
|
const core = getCore(client);
|
|
8144
|
-
if (
|
|
8776
|
+
if (getSelectedWalletAccount(client)?.id === walletAccount.id) return;
|
|
8145
8777
|
if (walletAccount.verifiedCredentialId) updateAuthFromVerifyResponse({ response: await createApiClient({}, client).selectUserWallet({
|
|
8146
8778
|
environmentId: core.environmentId,
|
|
8147
8779
|
userWalletSelectionRequest: { walletId: walletAccount.verifiedCredentialId }
|
|
@@ -8151,6 +8783,68 @@ const selectPrimaryWalletAccount = async ({ walletAccount }, client = getDefault
|
|
|
8151
8783
|
lastSelectedAt: /* @__PURE__ */ new Date()
|
|
8152
8784
|
}] }, client);
|
|
8153
8785
|
};
|
|
8786
|
+
const __setSelectedWalletAccount_impl = setSelectedWalletAccount;
|
|
8787
|
+
const __setSelectedWalletAccount_wrapped = instrumentFunction({
|
|
8788
|
+
fn: __setSelectedWalletAccount_impl,
|
|
8789
|
+
functionName: "setSelectedWalletAccount",
|
|
8790
|
+
getCore: () => {
|
|
8791
|
+
try {
|
|
8792
|
+
return getCore(getDefaultClient());
|
|
8793
|
+
} catch {
|
|
8794
|
+
return;
|
|
8795
|
+
}
|
|
8796
|
+
}
|
|
8797
|
+
});
|
|
8798
|
+
|
|
8799
|
+
//#endregion
|
|
8800
|
+
//#region src/modules/wallets/selectedWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.ts
|
|
8801
|
+
/**
|
|
8802
|
+
* Get the primary wallet account.
|
|
8803
|
+
*
|
|
8804
|
+
* @deprecated Renamed to `getSelectedWalletAccount`. The "primary wallet" naming was
|
|
8805
|
+
* misleading — the SDK does not use or care about which wallet is selected; it
|
|
8806
|
+
* only lets you *read* the user's most recently selected wallet. Migrate to
|
|
8807
|
+
* `getSelectedWalletAccount`, and own your own wallet-selection state in your
|
|
8808
|
+
* application rather than relying on the SDK's selected wallet.
|
|
8809
|
+
*
|
|
8810
|
+
* @example
|
|
8811
|
+
* ```ts
|
|
8812
|
+
* const primary = getPrimaryWalletAccount();
|
|
8813
|
+
* if (primary) {
|
|
8814
|
+
* console.log('Primary wallet:', primary.address);
|
|
8815
|
+
* }
|
|
8816
|
+
* ```
|
|
8817
|
+
*
|
|
8818
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8819
|
+
* @returns The primary wallet account, or null if no wallet has been selected.
|
|
8820
|
+
* @notInstrumented
|
|
8821
|
+
*/
|
|
8822
|
+
const getPrimaryWalletAccount = (client = getDefaultClient()) => getSelectedWalletAccount(client);
|
|
8823
|
+
|
|
8824
|
+
//#endregion
|
|
8825
|
+
//#region src/modules/wallets/selectedWalletAccount/selectPrimaryWalletAccount/selectPrimaryWalletAccount.ts
|
|
8826
|
+
/**
|
|
8827
|
+
* Make the wallet account provided as the primary wallet account.
|
|
8828
|
+
*
|
|
8829
|
+
* @deprecated Renamed to `setSelectedWalletAccount`. The "primary wallet" naming was
|
|
8830
|
+
* misleading — the SDK does not use or care about which wallet is selected;
|
|
8831
|
+
* this only records the selection so it can later be read back. Migrate to
|
|
8832
|
+
* `setSelectedWalletAccount`, and own your own wallet-selection state in your
|
|
8833
|
+
* application rather than relying on the SDK's selected wallet.
|
|
8834
|
+
*
|
|
8835
|
+
* @example
|
|
8836
|
+
* ```ts
|
|
8837
|
+
* const wallets = getWalletAccounts();
|
|
8838
|
+
* await selectPrimaryWalletAccount({ walletAccount: wallets[1] });
|
|
8839
|
+
* ```
|
|
8840
|
+
*
|
|
8841
|
+
* @param params.walletAccount - The wallet account to set as primary.
|
|
8842
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8843
|
+
* @returns A promise that resolves when the selection is persisted.
|
|
8844
|
+
* @instrumented
|
|
8845
|
+
* @noHook The selected-wallet concept is not exposed as a hook.
|
|
8846
|
+
*/
|
|
8847
|
+
const selectPrimaryWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => __setSelectedWalletAccount_wrapped({ walletAccount }, client);
|
|
8154
8848
|
const __selectPrimaryWalletAccount_impl = selectPrimaryWalletAccount;
|
|
8155
8849
|
const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
8156
8850
|
fn: __selectPrimaryWalletAccount_impl,
|
|
@@ -8167,10 +8861,23 @@ const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
|
8167
8861
|
//#endregion
|
|
8168
8862
|
//#region src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts
|
|
8169
8863
|
/**
|
|
8170
|
-
*
|
|
8864
|
+
* Disconnects the specified wallet account from its wallet provider.
|
|
8171
8865
|
*
|
|
8172
|
-
* The wallet account is not removed from the user's profile or from
|
|
8866
|
+
* The wallet account is not removed from the user's profile or from Dynamic's state,
|
|
8173
8867
|
* it is only responsible for terminating the connection with the wallet provider.
|
|
8868
|
+
* Use `removeWalletAccount` to fully remove a wallet from the user's session.
|
|
8869
|
+
*
|
|
8870
|
+
* @example
|
|
8871
|
+
* ```ts
|
|
8872
|
+
* const wallets = getWalletAccounts();
|
|
8873
|
+
* await disconnectWalletAccount({ walletAccount: wallets[0] }, client);
|
|
8874
|
+
* ```
|
|
8875
|
+
*
|
|
8876
|
+
* @param params.walletAccount - The wallet account to disconnect.
|
|
8877
|
+
* @param client - The Dynamic client instance.
|
|
8878
|
+
* @returns A promise that resolves when the wallet is disconnected from the provider.
|
|
8879
|
+
* @see removeWalletAccount
|
|
8880
|
+
* @see connectWithWalletProvider
|
|
8174
8881
|
* @notInstrumented
|
|
8175
8882
|
*/
|
|
8176
8883
|
const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
@@ -8191,9 +8898,17 @@ const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
|
8191
8898
|
* updating local state and server records (if there is an authenticated user).
|
|
8192
8899
|
* For verified wallets, it will unlink them from the user's account.
|
|
8193
8900
|
*
|
|
8901
|
+
* @example
|
|
8902
|
+
* ```ts
|
|
8903
|
+
* const wallets = getWalletAccounts();
|
|
8904
|
+
* await removeWalletAccount({ walletAccount: wallets[0] });
|
|
8905
|
+
* ```
|
|
8906
|
+
*
|
|
8194
8907
|
* @param params.walletAccount - The wallet account to remove.
|
|
8195
8908
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8196
8909
|
* @returns A promise that resolves when the wallet account is successfully removed.
|
|
8910
|
+
* @see getWalletAccounts
|
|
8911
|
+
* @see disconnectWalletAccount
|
|
8197
8912
|
* @instrumented
|
|
8198
8913
|
*/
|
|
8199
8914
|
const removeWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
@@ -8230,10 +8945,21 @@ const __removeWalletAccount_wrapped = instrumentFunction({
|
|
|
8230
8945
|
* This function uses the wallet's private key to cryptographically sign
|
|
8231
8946
|
* the provided message.
|
|
8232
8947
|
*
|
|
8948
|
+
* @example
|
|
8949
|
+
* ```ts
|
|
8950
|
+
* const wallets = getWalletAccounts();
|
|
8951
|
+
* const { signature } = await signMessage({
|
|
8952
|
+
* walletAccount: wallets[0],
|
|
8953
|
+
* message: 'Hello Dynamic!',
|
|
8954
|
+
* });
|
|
8955
|
+
* ```
|
|
8956
|
+
*
|
|
8233
8957
|
* @param params.walletAccount - The wallet account to use for signing.
|
|
8234
8958
|
* @param params.message - The message to sign.
|
|
8235
8959
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8236
8960
|
* @returns A promise that resolves to an object containing the signature.
|
|
8961
|
+
* @see getWalletAccounts
|
|
8962
|
+
* @see connectWithWalletProvider
|
|
8237
8963
|
* @instrumented
|
|
8238
8964
|
*/
|
|
8239
8965
|
const signMessage = async ({ walletAccount, message }, client = getDefaultClient()) => {
|
|
@@ -8266,13 +8992,24 @@ const __signMessage_wrapped = instrumentFunction({
|
|
|
8266
8992
|
* Supports native token transfers and, where supported by the chain,
|
|
8267
8993
|
* fungible/token transfers via the optional `token` parameter.
|
|
8268
8994
|
*
|
|
8995
|
+
* @example
|
|
8996
|
+
* ```ts
|
|
8997
|
+
* const { transactionHash } = await transferAmount({
|
|
8998
|
+
* walletAccount: wallets[0],
|
|
8999
|
+
* amount: '0.1',
|
|
9000
|
+
* recipient: '0x1234...abcd',
|
|
9001
|
+
* });
|
|
9002
|
+
* ```
|
|
9003
|
+
*
|
|
8269
9004
|
* @param params.walletAccount - The wallet account to transfer from.
|
|
8270
9005
|
* @param params.amount - The amount to transfer as a decimal string (e.g. "1.5").
|
|
8271
9006
|
* @param params.recipient - The recipient address.
|
|
8272
|
-
* @param params.token - Optional token info for non-native transfers.
|
|
9007
|
+
* @param [params.token] - Optional token info for non-native transfers.
|
|
8273
9008
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8274
9009
|
* @returns A promise that resolves to an object containing the transaction hash.
|
|
8275
9010
|
* @throws If the wallet provider does not support the transfer amount method.
|
|
9011
|
+
* @see getWalletAccounts
|
|
9012
|
+
* @see signMessage
|
|
8276
9013
|
* @instrumented
|
|
8277
9014
|
*/
|
|
8278
9015
|
const transferAmount = async ({ walletAccount, amount, recipient, token }, client = getDefaultClient()) => {
|
|
@@ -8307,9 +9044,18 @@ const __transferAmount_wrapped = instrumentFunction({
|
|
|
8307
9044
|
* This function requires the user to sign a message to prove wallet ownership,
|
|
8308
9045
|
* then transfers the wallet account to the current user's account.
|
|
8309
9046
|
*
|
|
9047
|
+
* @example
|
|
9048
|
+
* ```ts
|
|
9049
|
+
* const walletAccount = await transferWalletAccount({
|
|
9050
|
+
* walletProviderKey: 'metamaskevm',
|
|
9051
|
+
* });
|
|
9052
|
+
* ```
|
|
9053
|
+
*
|
|
8310
9054
|
* @param params.walletProviderKey - The key of the wallet provider of the wallet account to transfer.
|
|
8311
9055
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8312
9056
|
* @returns A promise that resolves to the transferred wallet account.
|
|
9057
|
+
* @see connectWithWalletProvider
|
|
9058
|
+
* @see verifyWalletAccount
|
|
8313
9059
|
* @instrumented
|
|
8314
9060
|
*/
|
|
8315
9061
|
const transferWalletAccount = async ({ walletProviderKey }, client = getDefaultClient()) => {
|
|
@@ -8342,10 +9088,20 @@ const __transferWalletAccount_wrapped = instrumentFunction({
|
|
|
8342
9088
|
* This function searches through the current session's wallet accounts
|
|
8343
9089
|
* to find one matching the specified address and chain.
|
|
8344
9090
|
*
|
|
9091
|
+
* @example
|
|
9092
|
+
* ```ts
|
|
9093
|
+
* const account = getWalletAccountFromAddress({
|
|
9094
|
+
* address: '0x1234...abcd',
|
|
9095
|
+
* chain: 'EVM',
|
|
9096
|
+
* });
|
|
9097
|
+
* ```
|
|
9098
|
+
*
|
|
8345
9099
|
* @param params.address - The wallet address to search for.
|
|
8346
9100
|
* @param params.chain - The blockchain the wallet belongs to.
|
|
8347
9101
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8348
9102
|
* @returns The matching wallet account, or undefined if not found.
|
|
9103
|
+
* @see getWalletAccounts
|
|
9104
|
+
* @see isWalletAccountVerified
|
|
8349
9105
|
* @notInstrumented
|
|
8350
9106
|
*/
|
|
8351
9107
|
const getWalletAccountFromAddress = ({ address, chain }, client = getDefaultClient()) => {
|
|
@@ -8504,5 +9260,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
8504
9260
|
assertPackageVersion(name, version);
|
|
8505
9261
|
|
|
8506
9262
|
//#endregion
|
|
8507
|
-
export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenScope, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasOnboardingIncompleteError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient,
|
|
9263
|
+
export { BaseError, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, DeviceRegistrationIdentityMismatchError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MergeAccountsConfirmationError, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenScope, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasOnboardingIncompleteError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, WalletScreeningBlockedError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, checkUserScopes, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainBalances, getMultichainTokenBalances, getNativeBalance, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __setSelectedWalletAccount_wrapped as setSelectedWalletAccount, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, __submitFlowTransaction_wrapped as submitFlowTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized };
|
|
8508
9264
|
//# sourceMappingURL=index.native.esm.js.map
|