@dynamic-labs-sdk/client 1.23.0 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{NativeModuleNotLinkedError-DIpQjh_K.native.esm.js → NativeModuleNotLinkedError-CJy_4-6r.native.esm.js} +3 -3
  2. package/dist/{NativeModuleNotLinkedError-DIpQjh_K.native.esm.js.map → NativeModuleNotLinkedError-CJy_4-6r.native.esm.js.map} +1 -1
  3. package/dist/{consumeMfaTokenIfRequiredForAction-pUcqlY3s.cjs → consumeMfaTokenIfRequiredForAction-B6nFE5IO.cjs} +2 -2
  4. package/dist/{consumeMfaTokenIfRequiredForAction-pUcqlY3s.cjs.map → consumeMfaTokenIfRequiredForAction-B6nFE5IO.cjs.map} +1 -1
  5. package/dist/{consumeMfaTokenIfRequiredForAction-jsAdDyDj.esm.js → consumeMfaTokenIfRequiredForAction-DXTH4qki.esm.js} +2 -2
  6. package/dist/{consumeMfaTokenIfRequiredForAction-jsAdDyDj.esm.js.map → consumeMfaTokenIfRequiredForAction-DXTH4qki.esm.js.map} +1 -1
  7. package/dist/core.cjs +7 -6
  8. package/dist/core.cjs.map +1 -1
  9. package/dist/core.esm.js +7 -7
  10. package/dist/core.esm.js.map +1 -1
  11. package/dist/core.native.esm.js +6 -6
  12. package/dist/core.native.esm.js.map +1 -1
  13. package/dist/exports/core.d.ts +2 -0
  14. package/dist/exports/core.d.ts.map +1 -1
  15. package/dist/exports/waas.d.ts +2 -1
  16. package/dist/exports/waas.d.ts.map +1 -1
  17. package/dist/{getNetworkProviderFromNetworkId-DPFHY3b8.cjs → getNetworkProviderFromNetworkId-CZjFA5G8.cjs} +64 -2
  18. package/dist/getNetworkProviderFromNetworkId-CZjFA5G8.cjs.map +1 -0
  19. package/dist/{getNetworkProviderFromNetworkId-DTNPpR5H.esm.js → getNetworkProviderFromNetworkId-CjdC5HjA.esm.js} +59 -3
  20. package/dist/getNetworkProviderFromNetworkId-CjdC5HjA.esm.js.map +1 -0
  21. package/dist/{getNetworkProviderFromNetworkId-YcalZlDG.native.esm.js → getNetworkProviderFromNetworkId-R8IKGc6s.native.esm.js} +59 -261
  22. package/dist/getNetworkProviderFromNetworkId-R8IKGc6s.native.esm.js.map +1 -0
  23. package/dist/{getSignedSessionId-BjhgfsJD.native.esm.js → getSignedSessionId-B6Eqmue0.native.esm.js} +3 -3
  24. package/dist/{getSignedSessionId-BjhgfsJD.native.esm.js.map → getSignedSessionId-B6Eqmue0.native.esm.js.map} +1 -1
  25. package/dist/{getSignedSessionId-Btl5p_7b.esm.js → getSignedSessionId-BYR70F5w.esm.js} +2 -2
  26. package/dist/{getSignedSessionId-Btl5p_7b.esm.js.map → getSignedSessionId-BYR70F5w.esm.js.map} +1 -1
  27. package/dist/{getSignedSessionId-VX7LkxVJ.cjs → getSignedSessionId-BpUNqL9z.cjs} +2 -2
  28. package/dist/{getSignedSessionId-VX7LkxVJ.cjs.map → getSignedSessionId-BpUNqL9z.cjs.map} +1 -1
  29. package/dist/{getWalletProviderByKey-5sZK6kAJ.esm.js → getWalletProviderByKey-BVVFLnfy.esm.js} +2 -2
  30. package/dist/{getWalletProviderByKey-5sZK6kAJ.esm.js.map → getWalletProviderByKey-BVVFLnfy.esm.js.map} +1 -1
  31. package/dist/getWalletProviderByKey-CqdhcE7y.native.esm.js +279 -0
  32. package/dist/getWalletProviderByKey-CqdhcE7y.native.esm.js.map +1 -0
  33. package/dist/{getWalletProviderByKey--K4N2u-M.cjs → getWalletProviderByKey-D2ElEmJR.cjs} +2 -2
  34. package/dist/{getWalletProviderByKey--K4N2u-M.cjs.map → getWalletProviderByKey-D2ElEmJR.cjs.map} +1 -1
  35. package/dist/index.cjs +17 -67
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.esm.js +16 -66
  38. package/dist/index.esm.js.map +1 -1
  39. package/dist/index.native.esm.js +16 -66
  40. package/dist/index.native.esm.js.map +1 -1
  41. package/dist/{isDynamicWaasEnabled-MtEVK3ov.cjs → isDynamicWaasEnabled-B7_FiTkx.cjs} +2 -2
  42. package/dist/{isDynamicWaasEnabled-MtEVK3ov.cjs.map → isDynamicWaasEnabled-B7_FiTkx.cjs.map} +1 -1
  43. package/dist/{isDynamicWaasEnabled-sI3vpWvA.esm.js → isDynamicWaasEnabled-Ck0VFh7Z.esm.js} +2 -2
  44. package/dist/{isDynamicWaasEnabled-sI3vpWvA.esm.js.map → isDynamicWaasEnabled-Ck0VFh7Z.esm.js.map} +1 -1
  45. package/dist/{isDynamicWaasEnabled-BR_pG4jM.native.esm.js → isDynamicWaasEnabled-yo_LqzH5.native.esm.js} +2 -2
  46. package/dist/{isDynamicWaasEnabled-BR_pG4jM.native.esm.js.map → isDynamicWaasEnabled-yo_LqzH5.native.esm.js.map} +1 -1
  47. package/dist/{isMfaRequiredForAction-BiPVqg49.cjs → isMfaRequiredForAction-B3FO4Zbn.cjs} +2 -2
  48. package/dist/{isMfaRequiredForAction-BiPVqg49.cjs.map → isMfaRequiredForAction-B3FO4Zbn.cjs.map} +1 -1
  49. package/dist/{isMfaRequiredForAction-DJ2UX11y.esm.js → isMfaRequiredForAction-CnO4g-V0.esm.js} +2 -2
  50. package/dist/{isMfaRequiredForAction-DJ2UX11y.esm.js.map → isMfaRequiredForAction-CnO4g-V0.esm.js.map} +1 -1
  51. package/dist/{isMfaRequiredForAction-GWZny7T2.native.esm.js → isMfaRequiredForAction-Zi7_K00W.native.esm.js} +2 -2
  52. package/dist/{isMfaRequiredForAction-GWZny7T2.native.esm.js.map → isMfaRequiredForAction-Zi7_K00W.native.esm.js.map} +1 -1
  53. package/dist/{isUserOnboardingComplete-OvzVH1rg.esm.js → isUserOnboardingComplete-DZk1nVHO.esm.js} +3 -3
  54. package/dist/{isUserOnboardingComplete-OvzVH1rg.esm.js.map → isUserOnboardingComplete-DZk1nVHO.esm.js.map} +1 -1
  55. package/dist/{isUserOnboardingComplete-Hzz6fwTk.native.esm.js → isUserOnboardingComplete-DcRl6Q1f.native.esm.js} +3 -3
  56. package/dist/{isUserOnboardingComplete-Hzz6fwTk.native.esm.js.map → isUserOnboardingComplete-DcRl6Q1f.native.esm.js.map} +1 -1
  57. package/dist/{isUserOnboardingComplete-D1hw1c5_.cjs → isUserOnboardingComplete-Dnx30meW.cjs} +3 -3
  58. package/dist/{isUserOnboardingComplete-D1hw1c5_.cjs.map → isUserOnboardingComplete-Dnx30meW.cjs.map} +1 -1
  59. package/dist/{migrateFromFireblocks-BiLoNIkA.native.esm.js → migrateFromFireblocks-COEK_Acn.native.esm.js} +13 -13
  60. package/dist/migrateFromFireblocks-COEK_Acn.native.esm.js.map +1 -0
  61. package/dist/{migrateFromFireblocks-NRfLh1JL.cjs → migrateFromFireblocks-CdSxWZav.cjs} +13 -13
  62. package/dist/migrateFromFireblocks-CdSxWZav.cjs.map +1 -0
  63. package/dist/{migrateFromFireblocks-Y5pPtmew.esm.js → migrateFromFireblocks-nkmSeZrn.esm.js} +14 -14
  64. package/dist/migrateFromFireblocks-nkmSeZrn.esm.js.map +1 -0
  65. package/dist/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.d.ts +29 -0
  66. package/dist/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.d.ts.map +1 -0
  67. package/dist/modules/auth/getActionAuthorizationTokens/index.d.ts +2 -0
  68. package/dist/modules/auth/getActionAuthorizationTokens/index.d.ts.map +1 -0
  69. package/dist/modules/auth/logoutReason.d.ts +1 -1
  70. package/dist/modules/auth/logoutReason.d.ts.map +1 -1
  71. package/dist/modules/flow/prepareFlowSigning/prepareFlowSigning.d.ts +2 -2
  72. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +13 -12
  73. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
  74. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +4 -4
  75. package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
  76. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +7 -2
  77. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  78. package/dist/modules/waas/businessAccounts/assertTargetIdentity.d.ts +14 -0
  79. package/dist/modules/waas/businessAccounts/assertTargetIdentity.d.ts.map +1 -0
  80. package/dist/modules/waas/businessAccounts/businessAccounts.constants.d.ts +5 -0
  81. package/dist/modules/waas/businessAccounts/businessAccounts.constants.d.ts.map +1 -0
  82. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +15 -1
  83. package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
  84. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
  85. package/dist/modules/waas/businessAccounts/updateBusinessAccount/index.d.ts +2 -0
  86. package/dist/modules/waas/businessAccounts/updateBusinessAccount/index.d.ts.map +1 -0
  87. package/dist/modules/waas/businessAccounts/updateBusinessAccount/updateBusinessAccount.d.ts +26 -0
  88. package/dist/modules/waas/businessAccounts/updateBusinessAccount/updateBusinessAccount.d.ts.map +1 -0
  89. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  90. package/dist/modules/waas/waas.types.d.ts +2 -2
  91. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  92. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts +1 -1
  93. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
  94. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  95. package/dist/{updateAuthFromVerifyResponse-ChnvPY0m.cjs → updateAuthFromVerifyResponse-BSORoVT0.cjs} +3 -3
  96. package/dist/{updateAuthFromVerifyResponse-ChnvPY0m.cjs.map → updateAuthFromVerifyResponse-BSORoVT0.cjs.map} +1 -1
  97. package/dist/{updateAuthFromVerifyResponse-Ct1Y6O_T.esm.js → updateAuthFromVerifyResponse-D0Tt9-Z-.esm.js} +3 -3
  98. package/dist/{updateAuthFromVerifyResponse-Ct1Y6O_T.esm.js.map → updateAuthFromVerifyResponse-D0Tt9-Z-.esm.js.map} +1 -1
  99. package/dist/waas.cjs +123 -41
  100. package/dist/waas.cjs.map +1 -1
  101. package/dist/waas.esm.js +124 -43
  102. package/dist/waas.esm.js.map +1 -1
  103. package/dist/waas.native.esm.js +123 -42
  104. package/dist/waas.native.esm.js.map +1 -1
  105. package/dist/waasCore.cjs +53 -15
  106. package/dist/waasCore.cjs.map +1 -1
  107. package/dist/waasCore.esm.js +53 -15
  108. package/dist/waasCore.esm.js.map +1 -1
  109. package/dist/waasCore.native.esm.js +52 -14
  110. package/dist/waasCore.native.esm.js.map +1 -1
  111. package/ios/DynamicClientScreenshotProtection.mm +11 -0
  112. package/package.json +3 -3
  113. package/dist/getNetworkProviderFromNetworkId-DPFHY3b8.cjs.map +0 -1
  114. package/dist/getNetworkProviderFromNetworkId-DTNPpR5H.esm.js.map +0 -1
  115. package/dist/getNetworkProviderFromNetworkId-YcalZlDG.native.esm.js.map +0 -1
  116. package/dist/getWalletProviderByKey-BhcBoGMW.native.esm.js +0 -20
  117. package/dist/getWalletProviderByKey-BhcBoGMW.native.esm.js.map +0 -1
  118. package/dist/migrateFromFireblocks-BiLoNIkA.native.esm.js.map +0 -1
  119. package/dist/migrateFromFireblocks-NRfLh1JL.cjs.map +0 -1
  120. package/dist/migrateFromFireblocks-Y5pPtmew.esm.js.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as UnauthorizedError, A as isSignedIn, B as retryOnFail, C as getWalletProviderFromWalletAccount, Ct as version, D as NoWalletProviderFoundError, F as CHAINS_INFO_MAP, G as createApiClient, H as offEvent, I as formatWalletAccountId, L as normalizeAddress, O as generateSessionKeys, P as getChainFromVerifiedCredentialChain, Q as createStorageKeySchema, R as splitWalletProviderKey, S as extractSessionId, St as name, T as getWalletProviderRegistry, U as onEvent, V as emitEvent, W as onceEvent, X as fetchAndStoreNonces, Y as getNonce, Z as updateNoncePoolStorage, _ as instrumentFunction, _t as getDefaultClient, a as initializeWaasClientsForEagerRecovery, at as APIError, b as getUserAgent, bt as BaseError, ct as SDK_API_CORE_VERSION, dt as assertDefined, et as SandboxMaximumThresholdReachedError, f as getWalletProviders, ft as ValueMustBeDefinedError, g as __logoutWithReason_wrapped, gt as NONCE_POOL_SIZE, ht as getPlatform, i as InvalidParamError, it as InvalidExternalAuthError, j as getWalletAccounts, k as fetchProjectSettings, m as checkAndRaiseWalletAccountsChangedEvent, mt as randomString, n as upsertElevatedAccessToken, nt as MfaInvalidOtpError, p as isUserMissingMfaAuth, pt as getElevatedAccessToken, r as parseElevatedAccessToken, rt as LinkCredentialError, st as DYNAMIC_ICONIC_SPRITE_URL, t as updateAuthFromVerifyResponse, tt as MfaRateLimitedError, ut as isCookieEnabled, v as scrubParameters, vt as setDefaultClient, w as WalletProviderPriority, x as getOperatingSystem, xt as getCore, y as DEFAULT_PII_FIELDS } from "./updateAuthFromVerifyResponse-Ct1Y6O_T.esm.js";
2
- import { B as isEqualShallow, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as UnavailableInServerSideError, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, 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 getBuffer, S as MergeAccountsConfirmationError, T as createKeychainService, U as createLocalStorageAdapter, V as createStorage, W as isServerSideRendering, _ as consumeCaptchaToken, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as MethodNotImplementedError, h as __setCaptchaToken_wrapped, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as getAppMetadata, m as hasExtension, o as removeUnverifiedWalletAccount, p as createVisit, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as isCaptchaRequired, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as subscribeWithSelector } from "./getNetworkProviderFromNetworkId-DTNPpR5H.esm.js";
3
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-sI3vpWvA.esm.js";
4
- import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-OvzVH1rg.esm.js";
5
- import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-5sZK6kAJ.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DJ2UX11y.esm.js";
1
+ import { $ as UnauthorizedError, A as isSignedIn, B as retryOnFail, C as getWalletProviderFromWalletAccount, Ct as version, D as NoWalletProviderFoundError, F as CHAINS_INFO_MAP, G as createApiClient, H as offEvent, I as formatWalletAccountId, L as normalizeAddress, O as generateSessionKeys, P as getChainFromVerifiedCredentialChain, Q as createStorageKeySchema, R as splitWalletProviderKey, S as extractSessionId, St as name, T as getWalletProviderRegistry, U as onEvent, V as emitEvent, W as onceEvent, X as fetchAndStoreNonces, Y as getNonce, Z as updateNoncePoolStorage, _ as instrumentFunction, _t as getDefaultClient, a as initializeWaasClientsForEagerRecovery, at as APIError, b as getUserAgent, bt as BaseError, ct as SDK_API_CORE_VERSION, dt as assertDefined, et as SandboxMaximumThresholdReachedError, f as getWalletProviders, ft as ValueMustBeDefinedError, g as __logoutWithReason_wrapped, gt as NONCE_POOL_SIZE, ht as getPlatform, i as InvalidParamError, it as InvalidExternalAuthError, j as getWalletAccounts, k as fetchProjectSettings, m as checkAndRaiseWalletAccountsChangedEvent, mt as randomString, n as upsertElevatedAccessToken, nt as MfaInvalidOtpError, p as isUserMissingMfaAuth, pt as getElevatedAccessToken, r as parseElevatedAccessToken, rt as LinkCredentialError, st as DYNAMIC_ICONIC_SPRITE_URL, t as updateAuthFromVerifyResponse, tt as MfaRateLimitedError, ut as isCookieEnabled, v as scrubParameters, vt as setDefaultClient, w as WalletProviderPriority, x as getOperatingSystem, xt as getCore, y as DEFAULT_PII_FIELDS } from "./updateAuthFromVerifyResponse-D0Tt9-Z-.esm.js";
2
+ import { A as createCrossTabBroadcast, B as subscribeWithSelector, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as GENERATE_SESSION_KEYS_TRACKER_KEY, G as isServerSideRendering, H as createStorage, I as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, K as UnavailableInServerSideError, L as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, M as CannotTrackError, N as createDeferredPromise, P as FETCH_PROJECT_SETTINGS_TRACKER_KEY, R as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, V as isEqualShallow, W as createLocalStorageAdapter, _ as consumeCaptchaToken, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as MethodNotImplementedError, h as __setCaptchaToken_wrapped, i as getNetworksData, k as createLogger, l as getAppMetadata, m as hasExtension, o as removeUnverifiedWalletAccount, p as createVisit, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as isCaptchaRequired, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-CjdC5HjA.esm.js";
3
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-Ck0VFh7Z.esm.js";
4
+ import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-DZk1nVHO.esm.js";
5
+ import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-BVVFLnfy.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-CnO4g-V0.esm.js";
7
7
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
8
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";
@@ -762,62 +762,6 @@ const createNavigationHandler = () => {
762
762
  };
763
763
  };
764
764
 
765
- //#endregion
766
- //#region src/errors/UnsafeDeeplinkUrlError.ts
767
- /**
768
- * Thrown when a deeplink is opened with a URL whose scheme can execute script
769
- * in the current origin (`javascript:`, `data:`, `vbscript:`). Unlike
770
- * navigation, deeplinks legitimately use custom app schemes (e.g. `phantom:`,
771
- * `metamask:`), so this guards via a denylist of dangerous schemes rather than
772
- * an `http(s)` allowlist, preventing DOM XSS through the `window.location.assign`
773
- * sink while leaving valid wallet deeplinks untouched.
774
- */
775
- var UnsafeDeeplinkUrlError = class extends BaseError {
776
- constructor({ scheme }) {
777
- super({
778
- cause: null,
779
- code: "unsafe_deeplink_url_error",
780
- docsUrl: null,
781
- name: "UnsafeDeeplinkUrlError",
782
- 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.`
783
- });
784
- }
785
- };
786
-
787
- //#endregion
788
- //#region src/utils/assertSafeDeeplinkUrl/assertSafeDeeplinkUrl.ts
789
- /**
790
- * Schemes that can execute script in the current origin and must never reach a
791
- * deeplink navigation sink. Deeplinks legitimately use arbitrary custom app
792
- * schemes (e.g. `phantom:`, `metamask:`), so a denylist of dangerous schemes is
793
- * used here instead of the `http(s)` allowlist applied to standard navigation.
794
- */
795
- const DANGEROUS_DEEPLINK_SCHEMES = new Set([
796
- "javascript:",
797
- "data:",
798
- "vbscript:",
799
- "blob:"
800
- ]);
801
- /**
802
- * Asserts that the given deeplink URL is safe to open, i.e. its scheme is not
803
- * one that can execute script (`javascript:`, `data:`, `vbscript:`, `blob:`). Used as a
804
- * defense-in-depth guard on the `window.location.assign` deeplink sink to
805
- * prevent DOM XSS, while still permitting custom wallet app schemes.
806
- *
807
- * @param url - The deeplink URL string to validate.
808
- * @throws {UnsafeDeeplinkUrlError} If the URL cannot be parsed or its scheme can execute script.
809
- * @notInstrumented
810
- */
811
- const assertSafeDeeplinkUrl = (url) => {
812
- let parsed;
813
- try {
814
- parsed = new URL(url);
815
- } catch {
816
- throw new UnsafeDeeplinkUrlError({ scheme: "unknown" });
817
- }
818
- if (DANGEROUS_DEEPLINK_SCHEMES.has(parsed.protocol)) throw new UnsafeDeeplinkUrlError({ scheme: parsed.protocol });
819
- };
820
-
821
765
  //#endregion
822
766
  //#region src/services/openDeeplink/createWebDeeplinkOpener/createWebDeeplinkOpener.ts
823
767
  /**
@@ -3899,8 +3843,8 @@ const prepareFlowSigning = async ({ assertBalanceForGasCost, assertBalanceForTra
3899
3843
  environmentId,
3900
3844
  flowId,
3901
3845
  flowPrepareSigningRequest: {
3902
- assertBalanceForGasCost: assertBalanceForGasCost ?? false,
3903
- assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? false
3846
+ assertBalanceForGasCost: assertBalanceForGasCost ?? true,
3847
+ assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? true
3904
3848
  },
3905
3849
  xDynamicFlowSessionToken: sessionToken
3906
3850
  }),
@@ -8157,7 +8101,13 @@ const isSameAddress = ({ chain, left, right }) => normalizeAddress({
8157
8101
  //#region src/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.ts
8158
8102
  /** @notInstrumented */
8159
8103
  const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfer, requestedScopes }, client) => {
8160
- if (walletAccount.verifiedCredentialId) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
8104
+ /**
8105
+ * A wallet that is already verified can still be used for step-up
8106
+ * authentication: the user proves ownership again to mint an elevated
8107
+ * access token for the requested scope. Skip the already-verified guard
8108
+ * when scopes are provided so the call reaches walletsVerify.
8109
+ */
8110
+ if (walletAccount.verifiedCredentialId && !requestedScopes) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
8161
8111
  const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
8162
8112
  const { messageToSign, signature } = await __proveWalletAccountOwnership_wrapped({ walletAccount }, client);
8163
8113
  const formattedSignature = walletAccount.hardwareWalletVendor ? formatSignatureForHardwareWallet({
@@ -8226,7 +8176,7 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
8226
8176
  * @param [params.requestedScopes] - Optional token scopes to request during verification.
8227
8177
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
8228
8178
  * @returns A promise that resolves to the verified wallet account.
8229
- * @throws WalletAccountAlreadyVerifiedError If the wallet is already verified.
8179
+ * @throws WalletAccountAlreadyVerifiedError If the wallet is already verified and no requestedScopes are provided.
8230
8180
  * @throws WalletAlreadyLinkedToAnotherUserError If the wallet is linked to another user.
8231
8181
  * @see connectWithWalletProvider
8232
8182
  * @see connectAndVerifyWithWalletProvider