@dynamic-labs-sdk/client 1.31.1 → 1.32.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 (163) hide show
  1. package/dist/{apiClient-BZfdx9fH.native.esm.js → apiClient-Bwd6cllS.native.esm.js} +2 -2
  2. package/dist/{apiClient-BZfdx9fH.native.esm.js.map → apiClient-Bwd6cllS.native.esm.js.map} +1 -1
  3. package/dist/core.cjs +7 -5
  4. package/dist/core.cjs.map +1 -1
  5. package/dist/core.esm.js +6 -6
  6. package/dist/core.esm.js.map +1 -1
  7. package/dist/core.native.esm.js +8 -8
  8. package/dist/core.native.esm.js.map +1 -1
  9. package/dist/errors/AmbiguousWalletChainError.d.ts +30 -0
  10. package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -0
  11. package/dist/errors/ConnectionUriHandlerMissingError.d.ts +35 -0
  12. package/dist/errors/ConnectionUriHandlerMissingError.d.ts.map +1 -0
  13. package/dist/errors/NoConnectionOptionAvailableError.d.ts +39 -0
  14. package/dist/errors/NoConnectionOptionAvailableError.d.ts.map +1 -0
  15. package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts +39 -0
  16. package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts.map +1 -0
  17. package/dist/errors/WalletOptionNotFoundError.d.ts +30 -0
  18. package/dist/errors/WalletOptionNotFoundError.d.ts.map +1 -0
  19. package/dist/exports/core.d.ts +4 -0
  20. package/dist/exports/core.d.ts.map +1 -1
  21. package/dist/exports/index.d.ts +12 -1
  22. package/dist/exports/index.d.ts.map +1 -1
  23. package/dist/{getNetworkProviderFromNetworkId-DNIuJp20.cjs → getNetworkProviderFromNetworkId-5UBZwUg2.cjs} +78 -2
  24. package/dist/getNetworkProviderFromNetworkId-5UBZwUg2.cjs.map +1 -0
  25. package/dist/{getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js → getNetworkProviderFromNetworkId-DSsGkava.native.esm.js} +79 -9
  26. package/dist/getNetworkProviderFromNetworkId-DSsGkava.native.esm.js.map +1 -0
  27. package/dist/{getNetworkProviderFromNetworkId-CbMpiSub.esm.js → getNetworkProviderFromNetworkId-TTqmAiJh.esm.js} +73 -3
  28. package/dist/getNetworkProviderFromNetworkId-TTqmAiJh.esm.js.map +1 -0
  29. package/dist/{getSignedSessionId-DKKSCpj9.native.esm.js → getSignedSessionId-BkYhH1zc.native.esm.js} +34 -4
  30. package/dist/getSignedSessionId-BkYhH1zc.native.esm.js.map +1 -0
  31. package/dist/{getSignedSessionId--wpV_VKs.cjs → getSignedSessionId-DBUnRGjt.cjs} +39 -3
  32. package/dist/getSignedSessionId-DBUnRGjt.cjs.map +1 -0
  33. package/dist/{getSignedSessionId-DHn6yhGX.esm.js → getSignedSessionId-DeeDyino.esm.js} +34 -4
  34. package/dist/getSignedSessionId-DeeDyino.esm.js.map +1 -0
  35. package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs} +2 -2
  36. package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs.map → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs.map} +1 -1
  37. package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js} +2 -2
  38. package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js.map → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js.map} +1 -1
  39. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts +55 -0
  40. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts.map +1 -0
  41. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts +46 -0
  42. package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts.map +1 -0
  43. package/dist/highLevelFunctions/connectWalletOption/index.d.ts +2 -0
  44. package/dist/highLevelFunctions/connectWalletOption/index.d.ts.map +1 -0
  45. package/dist/index.cjs +802 -57
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.esm.js +795 -58
  48. package/dist/index.esm.js.map +1 -1
  49. package/dist/index.native.esm.js +755 -60
  50. package/dist/index.native.esm.js.map +1 -1
  51. package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs → isMfaRequiredForAction-62zh3W-2.cjs} +2 -2
  52. package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs.map → isMfaRequiredForAction-62zh3W-2.cjs.map} +1 -1
  53. package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js → isMfaRequiredForAction-BPEXPqSt.esm.js} +2 -2
  54. package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js.map → isMfaRequiredForAction-BPEXPqSt.esm.js.map} +1 -1
  55. package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js → isMfaRequiredForAction-DfrEFvU2.native.esm.js} +2 -2
  56. package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js.map → isMfaRequiredForAction-DfrEFvU2.native.esm.js.map} +1 -1
  57. package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js → isUserOnboardingComplete-BWrCHXXO.native.esm.js} +3 -3
  58. package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js.map → isUserOnboardingComplete-BWrCHXXO.native.esm.js.map} +1 -1
  59. package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js → isUserOnboardingComplete-Dmck83_2.esm.js} +3 -3
  60. package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js.map → isUserOnboardingComplete-Dmck83_2.esm.js.map} +1 -1
  61. package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs → isUserOnboardingComplete-DtxIznZD.cjs} +3 -3
  62. package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs.map → isUserOnboardingComplete-DtxIznZD.cjs.map} +1 -1
  63. package/dist/{logoutWithReason-BcWQGREO.native.esm.js → logoutWithReason-DIc7cC6T.native.esm.js} +2 -2
  64. package/dist/{logoutWithReason-BcWQGREO.native.esm.js.map → logoutWithReason-DIc7cC6T.native.esm.js.map} +1 -1
  65. package/dist/{logoutWithReason-BqsgA8gI.esm.js → logoutWithReason-x8mE7EAy.esm.js} +2 -2
  66. package/dist/{logoutWithReason-BqsgA8gI.esm.js.map → logoutWithReason-x8mE7EAy.esm.js.map} +1 -1
  67. package/dist/{logoutWithReason-D6ruPOvJ.cjs → logoutWithReason-yDqQ0UIt.cjs} +2 -2
  68. package/dist/{logoutWithReason-D6ruPOvJ.cjs.map → logoutWithReason-yDqQ0UIt.cjs.map} +1 -1
  69. package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js → migrateFromFireblocks-BUhWQCqm.native.esm.js} +2 -2
  70. package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js.map → migrateFromFireblocks-BUhWQCqm.native.esm.js.map} +1 -1
  71. package/dist/{migrateFromFireblocks-zazAx6WV.esm.js → migrateFromFireblocks-BapjEhra.esm.js} +2 -2
  72. package/dist/{migrateFromFireblocks-zazAx6WV.esm.js.map → migrateFromFireblocks-BapjEhra.esm.js.map} +1 -1
  73. package/dist/{migrateFromFireblocks-CCNTDCmW.cjs → migrateFromFireblocks-qYPrnWF8.cjs} +2 -2
  74. package/dist/{migrateFromFireblocks-CCNTDCmW.cjs.map → migrateFromFireblocks-qYPrnWF8.cjs.map} +1 -1
  75. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts +7 -1
  76. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts.map +1 -1
  77. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.types.d.ts +4 -0
  78. package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.types.d.ts.map +1 -0
  79. package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts +9 -0
  80. package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts.map +1 -1
  81. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +2 -1
  82. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
  83. package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +53 -0
  84. package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map +1 -0
  85. package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.d.ts +34 -0
  86. package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.d.ts.map +1 -0
  87. package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/index.d.ts +2 -0
  88. package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/index.d.ts.map +1 -0
  89. package/dist/modules/wallets/connectWithUriConnectionOption/index.d.ts +2 -0
  90. package/dist/modules/wallets/connectWithUriConnectionOption/index.d.ts.map +1 -0
  91. package/dist/modules/wallets/redirectToInAppBrowser/index.d.ts +2 -0
  92. package/dist/modules/wallets/redirectToInAppBrowser/index.d.ts.map +1 -0
  93. package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts +60 -0
  94. package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts.map +1 -0
  95. package/dist/modules/wallets/resolveWalletConnectionOption/index.d.ts +3 -0
  96. package/dist/modules/wallets/resolveWalletConnectionOption/index.d.ts.map +1 -0
  97. package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts +36 -0
  98. package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map +1 -0
  99. package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/createUriConnectionStarterRegistry.d.ts +22 -0
  100. package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/createUriConnectionStarterRegistry.d.ts.map +1 -0
  101. package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/index.d.ts +2 -0
  102. package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/index.d.ts.map +1 -0
  103. package/dist/modules/wallets/uriConnectionStarterRegistry/events.d.ts +18 -0
  104. package/dist/modules/wallets/uriConnectionStarterRegistry/events.d.ts.map +1 -0
  105. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/getUriConnectionStarterRegistry.d.ts +22 -0
  106. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/getUriConnectionStarterRegistry.d.ts.map +1 -0
  107. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/index.d.ts +2 -0
  108. package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/index.d.ts.map +1 -0
  109. package/dist/modules/wallets/uriConnectionStarterRegistry/index.d.ts +3 -0
  110. package/dist/modules/wallets/uriConnectionStarterRegistry/index.d.ts.map +1 -0
  111. package/dist/modules/wallets/uriConnectionStarterRegistry/uriConnectionStarterRegistry.types.d.ts +32 -0
  112. package/dist/modules/wallets/uriConnectionStarterRegistry/uriConnectionStarterRegistry.types.d.ts.map +1 -0
  113. package/dist/modules/wallets/walletConnectionHandlers.types.d.ts +62 -0
  114. package/dist/modules/wallets/walletConnectionHandlers.types.d.ts.map +1 -0
  115. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +19 -0
  116. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -1
  117. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  118. package/dist/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.d.ts +32 -0
  119. package/dist/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.d.ts.map +1 -0
  120. package/dist/utils/buildInAppBrowserUrl/index.d.ts +2 -0
  121. package/dist/utils/buildInAppBrowserUrl/index.d.ts.map +1 -0
  122. package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts +15 -0
  123. package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts.map +1 -0
  124. package/dist/utils/getCurrentPageUrl/index.d.ts +2 -0
  125. package/dist/utils/getCurrentPageUrl/index.d.ts.map +1 -0
  126. package/dist/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts +33 -0
  127. package/dist/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts.map +1 -0
  128. package/dist/utils/getPreferredWalletDeepLink/index.d.ts +2 -0
  129. package/dist/utils/getPreferredWalletDeepLink/index.d.ts.map +1 -0
  130. package/dist/utils/isAndroid/index.d.ts +2 -0
  131. package/dist/utils/isAndroid/index.d.ts.map +1 -0
  132. package/dist/utils/isAndroid/isAndroid.d.ts +20 -0
  133. package/dist/utils/isAndroid/isAndroid.d.ts.map +1 -0
  134. package/dist/utils/isIOS/index.d.ts +2 -0
  135. package/dist/utils/isIOS/index.d.ts.map +1 -0
  136. package/dist/utils/isIOS/isIOS.d.ts +23 -0
  137. package/dist/utils/isIOS/isIOS.d.ts.map +1 -0
  138. package/dist/utils/isMobile/isMobile.d.ts +17 -36
  139. package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
  140. package/dist/utils/userAgentChecks/userAgentChecks.d.ts +35 -0
  141. package/dist/utils/userAgentChecks/userAgentChecks.d.ts.map +1 -0
  142. package/dist/{waas-DidjjQjB.native.esm.js → waas-CyUrvkQr.native.esm.js} +4 -4
  143. package/dist/{waas-DidjjQjB.native.esm.js.map → waas-CyUrvkQr.native.esm.js.map} +1 -1
  144. package/dist/{waas-C2PbR02F.esm.js → waas-DzcYsWU8.esm.js} +4 -4
  145. package/dist/{waas-C2PbR02F.esm.js.map → waas-DzcYsWU8.esm.js.map} +1 -1
  146. package/dist/{waas-ZWlJHeXc.cjs → waas-WID2Fy_N.cjs} +4 -4
  147. package/dist/{waas-ZWlJHeXc.cjs.map → waas-WID2Fy_N.cjs.map} +1 -1
  148. package/dist/waas.cjs +4 -4
  149. package/dist/waas.esm.js +4 -4
  150. package/dist/waas.native.esm.js +4 -4
  151. package/dist/waasCore.cjs +10 -40
  152. package/dist/waasCore.cjs.map +1 -1
  153. package/dist/waasCore.esm.js +5 -35
  154. package/dist/waasCore.esm.js.map +1 -1
  155. package/dist/waasCore.native.esm.js +5 -35
  156. package/dist/waasCore.native.esm.js.map +1 -1
  157. package/package.json +2 -2
  158. package/dist/getNetworkProviderFromNetworkId-CbMpiSub.esm.js.map +0 -1
  159. package/dist/getNetworkProviderFromNetworkId-DNIuJp20.cjs.map +0 -1
  160. package/dist/getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js.map +0 -1
  161. package/dist/getSignedSessionId--wpV_VKs.cjs.map +0 -1
  162. package/dist/getSignedSessionId-DHn6yhGX.esm.js.map +0 -1
  163. package/dist/getSignedSessionId-DKKSCpj9.native.esm.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { $ as NONCE_POOL_SIZE, A as onEvent, B as splitWalletProviderKey, D as getWalletProviderRegistry, E as WalletProviderPriority, Et as version, H as isUserMissingMfaAuth, I as getChainFromVerifiedCredentialChain, J as getNonce, L as CHAINS_INFO_MAP, N as getWalletAccounts, O as emitEvent, Q as createLocalStorageAdapter, R as formatWalletAccountId, St as BaseError, T as getWalletProviders, Tt as name, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _t as getPlatform, a as instrumentFunction, at as InvalidExternalAuthError, c as getUserAgent, d as updateAuthFromVerifyResponse, et as UnauthorizedError, f as upsertElevatedAccessToken, ft as isCookieEnabled, g as checkAndRaiseWalletAccountsChangedEvent, gt as randomString, h as InvalidParamError, ht as getElevatedAccessToken, i as __refreshAuth_wrapped, it as LinkCredentialError, j as onceEvent, k as offEvent, l as getOperatingSystem, lt as DYNAMIC_ICONIC_SPRITE_URL, m as decodeJwt, mt as ValueMustBeDefinedError, n as NoWalletProviderFoundError, nt as MfaRateLimitedError, o as scrubParameters, ot as APIError, p as parseElevatedAccessToken, pt as assertDefined, r as createApiClient, rt as MfaInvalidOtpError, s as DEFAULT_PII_FIELDS, t as getWalletProviderFromWalletAccount, tt as SandboxMaximumThresholdReachedError, u as extractSessionId, ut as SDK_API_CORE_VERSION, v as initializeWaasClientsForEagerRecovery, vt as getDefaultClient, wt as TokenScope, xt as getCore, yt as setDefaultClient, z as normalizeAddress } from "./apiClient-BZfdx9fH.native.esm.js";
2
- import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-BxPgqhbu.native.esm.js";
3
- import { Q as WaasChainEnum } from "./waas-DidjjQjB.native.esm.js";
4
- import { A as createEventEmitter, B as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as createAppForegroundSubscriber, G as createStorage, H as getBuffer, I as FETCH_PROJECT_SETTINGS_TRACKER_KEY, L as GENERATE_SESSION_KEYS_TRACKER_KEY, N as CannotTrackError, P as createDeferredPromise, R as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as subscribeWithSelector, V as isServerSideRendering, W as isEqualShallow, _ as getAppMetadata, a as removeUnverifiedWalletAccount, b as WalletAlreadyLinkedToAnotherUserError, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getNetworkProviderBuilderRegistry, g as isCaptchaRequired, h as consumeCaptchaToken, i as verifyMessageSignatureOwnership, j as createCrossTabBroadcast, k as createLogger, l as updateWalletProviderKeysForVerifiedCredentials, m as __setCaptchaToken_wrapped, o as createSignInMessageStatement, p as hasExtension, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js";
5
- import { a as retryOnFail, i as isSignedIn, n as generateSessionKeys, o as getVerifiedCredentialForWalletAccount, r as fetchProjectSettings, s as getWalletProviderByKey, t as __logoutWithReason_wrapped } from "./logoutWithReason-BcWQGREO.native.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-CC7bjhqy.native.esm.js";
7
- import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-BIjk67vX.native.esm.js";
1
+ import { $ as NONCE_POOL_SIZE, A as onEvent, B as splitWalletProviderKey, D as getWalletProviderRegistry, E as WalletProviderPriority, Et as version, H as isUserMissingMfaAuth, I as getChainFromVerifiedCredentialChain, J as getNonce, L as CHAINS_INFO_MAP, N as getWalletAccounts, O as emitEvent, Q as createLocalStorageAdapter, R as formatWalletAccountId, St as BaseError, T as getWalletProviders, Tt as name, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _t as getPlatform, a as instrumentFunction, at as InvalidExternalAuthError, c as getUserAgent, d as updateAuthFromVerifyResponse, et as UnauthorizedError, f as upsertElevatedAccessToken, ft as isCookieEnabled, g as checkAndRaiseWalletAccountsChangedEvent, gt as randomString, h as InvalidParamError, ht as getElevatedAccessToken, i as __refreshAuth_wrapped, it as LinkCredentialError, j as onceEvent, k as offEvent, l as getOperatingSystem, lt as DYNAMIC_ICONIC_SPRITE_URL, m as decodeJwt, mt as ValueMustBeDefinedError, n as NoWalletProviderFoundError, nt as MfaRateLimitedError, o as scrubParameters, ot as APIError, p as parseElevatedAccessToken, pt as assertDefined, r as createApiClient, rt as MfaInvalidOtpError, s as DEFAULT_PII_FIELDS, t as getWalletProviderFromWalletAccount, tt as SandboxMaximumThresholdReachedError, u as extractSessionId, ut as SDK_API_CORE_VERSION, v as initializeWaasClientsForEagerRecovery, vt as getDefaultClient, wt as TokenScope, xt as getCore, yt as setDefaultClient, z as normalizeAddress } from "./apiClient-Bwd6cllS.native.esm.js";
2
+ import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-BUhWQCqm.native.esm.js";
3
+ import { Q as WaasChainEnum } from "./waas-CyUrvkQr.native.esm.js";
4
+ import { A as createLogger, B as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, C as MergeAccountsConfirmationError, D as createKeychainService, E as assertSafeDeeplinkUrl, F as createDeferredPromise, G as isEqualShallow, H as isServerSideRendering, I as createAppForegroundSubscriber, K as createStorage, L as FETCH_PROJECT_SETTINGS_TRACKER_KEY, M as createCrossTabBroadcast, O as assertSafeNavigationUrl, P as CannotTrackError, R as GENERATE_SESSION_KEYS_TRACKER_KEY, S as NoNetworkProvidersError, T as createRealtimeService, U as getBuffer, V as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, W as subscribeWithSelector, _ as isCaptchaRequired, a as verifyMessageSignatureOwnership, b as WalletScreeningBlockedError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as consumeCaptchaToken, h as __setCaptchaToken_wrapped, i as getUriConnectionStarterRegistry, j as createEventEmitter, l as reconcileWalletAccountsAgainstClient, m as hasExtension, o as removeUnverifiedWalletAccount, p as getNetworkProviderBuilderRegistry, r as getNetworksData, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as getAppMetadata, w as getKeychainIndexedDBName, x as WalletAlreadyLinkedToAnotherUserError, y as MethodNotImplementedError, z as INITIALIZE_STORAGE_SYNC_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-DSsGkava.native.esm.js";
5
+ import { a as retryOnFail, i as isSignedIn, n as generateSessionKeys, o as getVerifiedCredentialForWalletAccount, r as fetchProjectSettings, s as getWalletProviderByKey, t as __logoutWithReason_wrapped } from "./logoutWithReason-DIc7cC6T.native.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DfrEFvU2.native.esm.js";
7
+ import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-BWrCHXXO.native.esm.js";
8
8
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
9
9
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ChainEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction as MFAAction$1, MfaBackupCodeAcknowledgement, ProviderEnum as ProviderEnum$1, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
10
10
  import * as z from "zod/mini";
11
11
  import { Linking } from "react-native";
12
- import { EventEmitter } from "eventemitter3";
12
+ import { EventEmitter as EventEmitter$1 } from "eventemitter3";
13
13
  import { Passkey } from "react-native-passkey";
14
14
 
15
15
  //#region src/modules/state/raiseStateEvents/events.ts
@@ -557,7 +557,7 @@ const initializeClient = async (client = getDefaultClient()) => {
557
557
  */
558
558
  if (isCookieEnabled(client)) await __refreshAuth_wrapped(client).catch(async (error) => {
559
559
  if (error.status === 401) {
560
- core.logger.error("Session expired during initialization", error);
560
+ core.logger.warn("Session expired during initialization", error);
561
561
  if (client.user) await __logoutWithReason_wrapped({ reason: "session-refresh-unauthorized" }, client);
562
562
  } else throw error;
563
563
  });
@@ -632,7 +632,7 @@ const createAsyncTrack = () => {
632
632
  * This ensures no process is missed (as it would throw when tracked on a different node tick).
633
633
  */
634
634
  let isTrackEnabled = true;
635
- const eventEmitter = new EventEmitter();
635
+ const eventEmitter = new EventEmitter$1();
636
636
  const allSettledPromise = createDeferredPromise();
637
637
  const tracker = /* @__PURE__ */ new Map();
638
638
  /**
@@ -1284,6 +1284,44 @@ const __createDynamicClient_wrapped = instrumentFunction({
1284
1284
  }
1285
1285
  });
1286
1286
 
1287
+ //#endregion
1288
+ //#region src/errors/AmbiguousWalletChainError.ts
1289
+ /**
1290
+ * Thrown when a wallet can be connected on more than one of the client's
1291
+ * enabled chains and no chain was passed to `connectWalletOption`.
1292
+ *
1293
+ * Multi-chain wallets such as MetaMask or Phantom connect to a different
1294
+ * account per chain, so the chain has to be an explicit choice rather than one
1295
+ * Dynamic makes on the customer's behalf.
1296
+ *
1297
+ * @example
1298
+ * ```ts
1299
+ * // Throws, since Phantom connects on both SOL and EVM
1300
+ * await connectWalletOption({ walletKey: 'phantom' });
1301
+ *
1302
+ * // Connects the wallet's Solana account
1303
+ * await connectWalletOption({ chain: 'SOL', walletKey: 'phantom' });
1304
+ * ```
1305
+ * @see connectWalletOption
1306
+ * @see getWalletOptionsCatalogue
1307
+ */
1308
+ var AmbiguousWalletChainError = class extends BaseError {
1309
+ constructor({ chains, walletKey }) {
1310
+ super({
1311
+ cause: null,
1312
+ code: "ambiguous_wallet_chain",
1313
+ docsUrl: null,
1314
+ metaMessages: [
1315
+ `Wallet key: ${walletKey}`,
1316
+ `Available chains: ${chains.join(", ")}`,
1317
+ "Pass the chain param to pick which one to connect on."
1318
+ ],
1319
+ name: "AmbiguousWalletChainError",
1320
+ shortMessage: `Wallet ${walletKey} can be connected on more than one chain, so the chain param is required.`
1321
+ });
1322
+ }
1323
+ };
1324
+
1287
1325
  //#endregion
1288
1326
  //#region src/errors/CheckoutSessionTokenMissingError.ts
1289
1327
  var CheckoutSessionTokenMissingError = class extends BaseError {
@@ -1442,6 +1480,48 @@ var CoinbaseTravelRuleRequiredError = class extends BaseError {
1442
1480
  }
1443
1481
  };
1444
1482
 
1483
+ //#endregion
1484
+ //#region src/errors/ConnectionUriHandlerMissingError.ts
1485
+ /**
1486
+ * Thrown when the only connection path for a wallet is a URI pairing and no
1487
+ * `onConnectionUri` handler was passed to `connectWalletOption`.
1488
+ *
1489
+ * The pairing URI has to reach the user — as a QR code on desktop, or by opening
1490
+ * the wallet's deeplink on mobile — for the wallet to be able to
1491
+ * approve the connection.
1492
+ *
1493
+ * @example
1494
+ * ```ts
1495
+ * // Throws, since the wallet can only be reached through a URI pairing
1496
+ * await connectWalletOption({ walletKey: 'trust' });
1497
+ *
1498
+ * // Connects, once the user approves the pairing
1499
+ * await connectWalletOption({
1500
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
1501
+ * walletKey: 'trust',
1502
+ * });
1503
+ * ```
1504
+ * @see connectWalletOption
1505
+ * @see ConnectionUriHandlerParams
1506
+ */
1507
+ var ConnectionUriHandlerMissingError = class extends BaseError {
1508
+ constructor({ chain, type, walletKey }) {
1509
+ super({
1510
+ cause: null,
1511
+ code: "connection_uri_handler_missing",
1512
+ docsUrl: null,
1513
+ metaMessages: [
1514
+ `Wallet key: ${walletKey}`,
1515
+ `Chain: ${chain}`,
1516
+ `URI connection type: ${type}`,
1517
+ "Pass onConnectionUri to render the pairing URI it hands you as a QR code, or to open it as a link on mobile."
1518
+ ],
1519
+ name: "ConnectionUriHandlerMissingError",
1520
+ shortMessage: `Connecting to ${walletKey} requires a URI pairing, so the onConnectionUri param is required.`
1521
+ });
1522
+ }
1523
+ };
1524
+
1445
1525
  //#endregion
1446
1526
  //#region src/errors/DeeplinkConnectAndVerifyUnsupportedError.ts
1447
1527
  var DeeplinkConnectAndVerifyUnsupportedError = class extends BaseError {
@@ -1683,6 +1763,54 @@ var NoAddressFoundError = class extends BaseError {
1683
1763
  }
1684
1764
  };
1685
1765
 
1766
+ //#endregion
1767
+ //#region src/errors/NoConnectionOptionAvailableError.ts
1768
+ /**
1769
+ * Thrown when a wallet exists in the catalogue but has no connection option
1770
+ * this client can drive.
1771
+ *
1772
+ * Happens when the wallet is not installed on the device and no URI pairing is
1773
+ * available for it — either the wallet does not support one, or the chain
1774
+ * extension providing that pairing was not added to the client.
1775
+ *
1776
+ * @example
1777
+ * ```ts
1778
+ * try {
1779
+ * await connectWalletOption({ walletKey: 'rainbow' });
1780
+ * } catch (error) {
1781
+ * if (error instanceof NoConnectionOptionAvailableError) {
1782
+ * promptWalletInstall(error.installationUrls);
1783
+ * }
1784
+ * }
1785
+ * ```
1786
+ * @see connectWalletOption
1787
+ * @see getWalletOptionsCatalogue
1788
+ */
1789
+ var NoConnectionOptionAvailableError = class extends BaseError {
1790
+ /**
1791
+ * Install / download links for the wallet, when the wallet book carries any
1792
+ * for this device. Prompt the user to install the wallet with these.
1793
+ */
1794
+ installationUrls;
1795
+ constructor({ chain, installationUrls, walletKey }) {
1796
+ super({
1797
+ cause: null,
1798
+ code: "no_connection_option_available",
1799
+ docsUrl: null,
1800
+ metaMessages: [
1801
+ `Wallet key: ${walletKey}`,
1802
+ ...chain ? [`Chain: ${chain}`] : [],
1803
+ "The wallet is not installed and no URI pairing is available for it on this client.",
1804
+ "URI pairing requires the chain extension that provides it — addWalletConnect<Chain>Extension for WalletConnect, addMetaMask<Chain>Extension for MetaMask.",
1805
+ "Use this error's installationUrls to prompt the user to install the wallet."
1806
+ ],
1807
+ name: "NoConnectionOptionAvailableError",
1808
+ shortMessage: `No connection option available for wallet: ${walletKey}`
1809
+ });
1810
+ this.installationUrls = installationUrls;
1811
+ }
1812
+ };
1813
+
1686
1814
  //#endregion
1687
1815
  //#region src/errors/NoPasskeyCredentialsFoundError.ts
1688
1816
  var NoPasskeyCredentialsFoundError = class extends BaseError {
@@ -1877,6 +2005,93 @@ var WalletAccountNotSelectedError = class extends BaseError {
1877
2005
  }
1878
2006
  };
1879
2007
 
2008
+ //#endregion
2009
+ //#region src/errors/WalletBrowserRedirectHandlerMissingError.ts
2010
+ /**
2011
+ * Thrown when the connection option resolved for a wallet is its in-app
2012
+ * browser, no `handleWalletBrowserRedirect` handler was passed to
2013
+ * `connectWalletOption`, and there is no current page URL to redirect into
2014
+ * that browser — as on React Native and during server-side rendering.
2015
+ *
2016
+ * That path connects by reloading your app inside the wallet's own browser,
2017
+ * so it needs the URL of the page to reload.
2018
+ *
2019
+ * @example
2020
+ * ```ts
2021
+ * // Throws on React Native, where there is no page URL to reuse
2022
+ * await connectWalletOption({ walletKey: 'coinbase' });
2023
+ *
2024
+ * // Connects, redirecting into the wallet's browser
2025
+ * await connectWalletOption({
2026
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
2027
+ * redirectToInAppBrowser({
2028
+ * appUrl: 'https://mydapp.xyz/login',
2029
+ * chain,
2030
+ * walletKey,
2031
+ * }),
2032
+ * walletKey: 'coinbase',
2033
+ * });
2034
+ * ```
2035
+ * @see connectWalletOption
2036
+ * @see redirectToInAppBrowser
2037
+ */
2038
+ var WalletBrowserRedirectHandlerMissingError = class extends BaseError {
2039
+ constructor({ chain, walletKey }) {
2040
+ super({
2041
+ cause: null,
2042
+ code: "wallet_browser_redirect_handler_missing",
2043
+ docsUrl: null,
2044
+ metaMessages: [
2045
+ `Wallet key: ${walletKey}`,
2046
+ `Chain: ${chain}`,
2047
+ "Pass handleWalletBrowserRedirect and call redirectToInAppBrowser from it with the URL of the page to reload inside the wallet's browser."
2048
+ ],
2049
+ name: "WalletBrowserRedirectHandlerMissingError",
2050
+ shortMessage: `Connecting to ${walletKey} requires opening its in-app browser, so the handleWalletBrowserRedirect param is required where there is no page URL to redirect.`
2051
+ });
2052
+ }
2053
+ };
2054
+
2055
+ //#endregion
2056
+ //#region src/errors/WalletOptionNotFoundError.ts
2057
+ /**
2058
+ * Thrown when `connectWalletOption` is given a wallet key that no wallet option in
2059
+ * the catalogue matches.
2060
+ *
2061
+ * A wallet is only surfaced for the chains this client has an extension for, so
2062
+ * this also covers keys that are valid in the wallet book but not reachable
2063
+ * with the client's current chain extensions.
2064
+ *
2065
+ * @example
2066
+ * ```ts
2067
+ * try {
2068
+ * await connectWalletOption({ walletKey: 'metmask' });
2069
+ * } catch (error) {
2070
+ * if (error instanceof WalletOptionNotFoundError) {
2071
+ * showUnknownWalletMessage();
2072
+ * }
2073
+ * }
2074
+ * ```
2075
+ * @see connectWalletOption
2076
+ * @see getWalletOptionsCatalogue
2077
+ */
2078
+ var WalletOptionNotFoundError = class extends BaseError {
2079
+ constructor({ walletKey }) {
2080
+ super({
2081
+ cause: null,
2082
+ code: "wallet_option_not_found",
2083
+ docsUrl: null,
2084
+ metaMessages: [
2085
+ `Wallet key: ${walletKey}`,
2086
+ "The key must match a wallet option surfaced by getWalletOptionsCatalogue (e.g. \"metamask\", \"phantom\").",
2087
+ "A wallet is only surfaced on chains this client has an extension for, so make sure the relevant chain extension is added."
2088
+ ],
2089
+ name: "WalletOptionNotFoundError",
2090
+ shortMessage: `No wallet option found for key: ${walletKey}`
2091
+ });
2092
+ }
2093
+ };
2094
+
1880
2095
  //#endregion
1881
2096
  //#region src/errors/WalletProviderMethodUnavailableError.ts
1882
2097
  var WalletProviderMethodUnavailableError = class extends BaseError {
@@ -2427,7 +2642,7 @@ const __authenticateWithSocial_wrapped = instrumentFunction({
2427
2642
  * @throws MethodNotImplementedError Always on React Native.
2428
2643
  * @notInstrumented
2429
2644
  */
2430
- const clearSocialRedirectParams = () => {
2645
+ const clearSocialRedirectParams = ({ expectedState } = {}) => {
2431
2646
  throw new MethodNotImplementedError("clearSocialRedirectParams (not needed on React Native — signInWithSocialPopUp processes the callback inline)");
2432
2647
  };
2433
2648
 
@@ -7268,20 +7483,37 @@ const hasAllGoogleDriveBackupScopes = (grantedScopes) => findMissingGoogleDriveB
7268
7483
  const isInsufficientGoogleDriveScopesError = (err) => err instanceof Error && err.message.includes(ACCESS_DENIED_PHRASE);
7269
7484
 
7270
7485
  //#endregion
7271
- //#region src/utils/isMobile/isMobile.ts
7486
+ //#region src/utils/isAndroid/isAndroid.ts
7272
7487
  /**
7273
- * Sourced from http://detectmobilebrowsers.com/
7488
+ * Tells whether the SDK is running on Android.
7489
+ *
7490
+ * The operating system comes from {@link getOperatingSystem}, which reads
7491
+ * `Platform.OS` in React Native and the user agent on web.
7492
+ *
7493
+ * @example
7494
+ * ```ts
7495
+ * if (isAndroid()) {
7496
+ * return installationUrls.android;
7497
+ * }
7498
+ * ```
7499
+ *
7500
+ * @returns `true` when the current device runs Android.
7501
+ * @see getOperatingSystem
7502
+ * @see isIOS
7274
7503
  * @notInstrumented
7275
7504
  */
7276
- const userAgentRegex1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ios|ipad|playbook|silk/i;
7277
- const userAgentRegex2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;
7278
- /** @notInstrumented */
7279
- const isMobile = (maxTouchPointsOverride) => {
7280
- if (typeof window === "undefined" || typeof navigator === "undefined") return false;
7281
- return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
7282
- };
7283
- /** @notInstrumented */
7284
- const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
7505
+ const isAndroid = () => getOperatingSystem() === "android";
7506
+
7507
+ //#endregion
7508
+ //#region src/utils/userAgentChecks/userAgentChecks.ts
7509
+ /**
7510
+ * Matches the device names Apple's handhelds report, plus the standalone `ios`
7511
+ * token that embedded web views and custom in-app browsers use in place of a
7512
+ * device name. The token must stand alone so that unrelated words containing
7513
+ * `ios` (`kiosk`, for instance) don't match.
7514
+ * @notInstrumented
7515
+ */
7516
+ const isIOSUserAgent = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|iPod|(?:^|[^a-z])ios(?:[^a-z]|$)/i.test(navigator.userAgent);
7285
7517
  /**
7286
7518
  * @param [optional] maxTouchPointsOverride - this is used for testing since
7287
7519
  * it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
@@ -7294,13 +7526,6 @@ const isIPad = (maxTouchPointsOverride) => {
7294
7526
  return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
7295
7527
  };
7296
7528
  /** @notInstrumented */
7297
- const isIOS = (maxTouchPointsOverride) => {
7298
- if (typeof window === "undefined" || typeof navigator === "undefined") return false;
7299
- return isIPhone() || isIPad(maxTouchPointsOverride);
7300
- };
7301
- /** @notInstrumented */
7302
- const isAndroid = () => isMobile() && !isIOS();
7303
- /** @notInstrumented */
7304
7529
  const isSafariBrowser = () => {
7305
7530
  if (typeof window === "undefined" || typeof navigator === "undefined") return false;
7306
7531
  const { userAgent } = navigator;
@@ -7327,6 +7552,31 @@ const isChromeBrowser = () => {
7327
7552
  return /\bChrome\//.test(navigator.userAgent) && !isEdgeBrowser() && !isOperaBrowser();
7328
7553
  };
7329
7554
 
7555
+ //#endregion
7556
+ //#region src/utils/isIOS/isIOS.ts
7557
+ /**
7558
+ * Tells whether the SDK is running on iOS or iPadOS.
7559
+ *
7560
+ * The operating system comes from {@link getOperatingSystem}, which reads
7561
+ * `Platform.OS` in React Native and the user agent on web. Two user agents
7562
+ * escape it: an iPad in desktop mode announces itself as macOS, and embedded
7563
+ * web views may carry a lowercase `ios` token instead of a device name.
7564
+ *
7565
+ * @example
7566
+ * ```ts
7567
+ * if (isIOS()) {
7568
+ * return installationUrls.ios;
7569
+ * }
7570
+ * ```
7571
+ *
7572
+ * @returns `true` when the current device runs iOS or iPadOS.
7573
+ * @see getOperatingSystem
7574
+ * @see isIPad
7575
+ * @see isIOSUserAgent
7576
+ * @notInstrumented
7577
+ */
7578
+ const isIOS = () => getOperatingSystem() === "ios" || isIOSUserAgent() || isIPad();
7579
+
7330
7580
  //#endregion
7331
7581
  //#region src/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.ts
7332
7582
  /**
@@ -8473,6 +8723,30 @@ const __confirmTransaction_wrapped = instrumentFunction({
8473
8723
  }
8474
8724
  });
8475
8725
 
8726
+ //#endregion
8727
+ //#region src/utils/isMobile/isMobile.native.ts
8728
+ /**
8729
+ * React Native variant — always returns `true`.
8730
+ *
8731
+ * Metro resolves `.native.ts` over the plain `.ts` counterpart, so this file
8732
+ * is used exclusively in RN builds. The web implementation sniffs
8733
+ * `navigator.userAgent`, which React Native does not have, so it would report
8734
+ * every phone as a desktop.
8735
+ *
8736
+ * @example
8737
+ * ```ts
8738
+ * if (isMobile()) {
8739
+ * // hand the pairing to the wallet app instead of rendering a QR code
8740
+ * }
8741
+ * ```
8742
+ *
8743
+ * @returns Always `true`.
8744
+ * @see getPlatform
8745
+ * @see getOperatingSystem
8746
+ * @notInstrumented
8747
+ */
8748
+ const isMobile = () => true;
8749
+
8476
8750
  //#endregion
8477
8751
  //#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
8478
8752
  /** @notInstrumented */
@@ -8872,6 +9146,457 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
8872
9146
  }
8873
9147
  });
8874
9148
 
9149
+ //#endregion
9150
+ //#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
9151
+ /**
9152
+ * Appends a wallet connection URI to a deeplink URL.
9153
+ *
9154
+ * Generic across URI-deeplink connection options — works for both
9155
+ * WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
9156
+ * appropriate query parameter separator based on whether the deeplink
9157
+ * already contains query parameters.
9158
+ *
9159
+ * @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
9160
+ * @param params.connectionUri - The connection URI to append.
9161
+ * @returns The deeplink URL with the connection URI appended as a query parameter.
9162
+ *
9163
+ * @example
9164
+ * ```ts
9165
+ * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
9166
+ * // Returns: 'walletapp://wc?uri=wc%3A123-456'
9167
+ *
9168
+ * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
9169
+ * // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
9170
+ * ```
9171
+ * @notInstrumented
9172
+ */
9173
+ const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
9174
+ const url = new URL(deeplinkUrl);
9175
+ url.searchParams.set("uri", connectionUri);
9176
+ return url.href;
9177
+ };
9178
+
9179
+ //#endregion
9180
+ //#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
9181
+ /**
9182
+ * Picks the most appropriate deep link variant for the current platform.
9183
+ *
9184
+ * Mobile (Android, iOS, tablets) prefers `native` because the OS treats
9185
+ * custom URL schemes as first-class app links and gives the wallet a faster
9186
+ * round-trip back to the dApp. Desktop prefers `universal` because browsers
9187
+ * cannot resolve mobile-only custom schemes and need an `https://` link
9188
+ * that opens the wallet's web flow.
9189
+ *
9190
+ * In either case, the alternative is used as a fallback when the preferred
9191
+ * variant is missing. Returns `undefined` only when both variants are
9192
+ * absent.
9193
+ *
9194
+ * @example
9195
+ * ```ts
9196
+ * const deepLink = getPreferredWalletDeepLink({
9197
+ * deeplinks: wallet.deeplinks,
9198
+ * });
9199
+ * ```
9200
+ *
9201
+ * @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
9202
+ * @returns The preferred deep link URL, or `undefined` if neither variant is available.
9203
+ * @see appendConnectionUriToDeeplink
9204
+ * @see getConnectionUriDeeplink
9205
+ * @notInstrumented
9206
+ */
9207
+ const getPreferredWalletDeepLink = ({ deeplinks }) => {
9208
+ const { native, universal } = deeplinks;
9209
+ if (isMobile()) return native ?? universal;
9210
+ return universal ?? native;
9211
+ };
9212
+
9213
+ //#endregion
9214
+ //#region src/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.ts
9215
+ /**
9216
+ * Builds the single deeplink that hands a pairing URI to the wallet, picking
9217
+ * the shape the URI's protocol expects.
9218
+ *
9219
+ * A WalletConnect URI travels as the `uri` query parameter of the wallet's own
9220
+ * deeplink, whereas the MetaMask SDK mints a launch link that already targets
9221
+ * MetaMask, so it is handed over untouched.
9222
+ *
9223
+ * @example
9224
+ * ```ts
9225
+ * const deeplink = getConnectionUriDeeplink({
9226
+ * deeplinks: connectionOption.deeplinks,
9227
+ * type: connectionOption.type,
9228
+ * uri,
9229
+ * });
9230
+ * ```
9231
+ *
9232
+ * @param params.deeplinks - The wallet's deeplink variants, as carried by the wallet book.
9233
+ * @param params.type - The URI connection type that minted the URI.
9234
+ * @param params.uri - The pairing URI.
9235
+ * @returns The deeplink to open, or `undefined` when the wallet publishes no deeplink to carry the URI.
9236
+ * @see getPreferredWalletDeepLink
9237
+ * @see appendConnectionUriToDeeplink
9238
+ * @notInstrumented
9239
+ */
9240
+ const getConnectionUriDeeplink = ({ deeplinks, type, uri }) => {
9241
+ if (type === "metamaskSdkUri") return uri;
9242
+ const deeplinkUrl = getPreferredWalletDeepLink({ deeplinks });
9243
+ if (!deeplinkUrl) return;
9244
+ return appendConnectionUriToDeeplink({
9245
+ connectionUri: uri,
9246
+ deeplinkUrl
9247
+ });
9248
+ };
9249
+
9250
+ //#endregion
9251
+ //#region src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts
9252
+ /**
9253
+ * Connects to a wallet through a URI pairing and returns the connected wallet
9254
+ * account.
9255
+ *
9256
+ * Mints the pairing URI with the starter the chain extension registered for
9257
+ * the option's chain and URI type, hands it to `onConnectionUri` as the
9258
+ * wallet's deeplink carrying the pairing so the customer can render a QR code
9259
+ * or open the wallet app, then waits for the user to approve the pairing on
9260
+ * the wallet side.
9261
+ *
9262
+ * The handler is awaited, so an async handler that fails to open the wallet
9263
+ * rejects the connection rather than letting the pairing resolve into an
9264
+ * account nobody asked for.
9265
+ *
9266
+ * @example
9267
+ * ```ts
9268
+ * const walletAccount = await connectWithUriConnectionOption(
9269
+ * {
9270
+ * addToDynamicWalletAccounts: true,
9271
+ * connectionOption,
9272
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
9273
+ * walletKey: 'trust',
9274
+ * },
9275
+ * client
9276
+ * );
9277
+ * ```
9278
+ *
9279
+ * @param params.addToDynamicWalletAccounts - Whether the connected wallet account should be added to the client's wallet accounts.
9280
+ * @param params.connectionOption - The URI deeplink connection option to drive.
9281
+ * @param params.onConnectionUri - Called with the pairing URI once it is minted. Awaited before the approval is waited on.
9282
+ * @param params.walletKey - The wallet being connected, keyed as in the wallet options catalogue.
9283
+ * @param client - The Dynamic client instance.
9284
+ * @returns A promise that resolves to the connected wallet account.
9285
+ * @throws ConnectionUriHandlerMissingError If no onConnectionUri handler was passed.
9286
+ * @throws NoConnectionOptionAvailableError If no URI connection starter is registered for the option's chain and type.
9287
+ * @throws NoAddressFoundError If the pairing was approved but no address was shared with your app.
9288
+ * @see getUriConnectionStarterRegistry
9289
+ * @see getWalletOptionsCatalogue
9290
+ * @notInstrumented
9291
+ */
9292
+ const connectWithUriConnectionOption = async ({ addToDynamicWalletAccounts, connectionOption, onConnectionUri, walletKey }, client) => {
9293
+ const { chain, deeplinks, type } = connectionOption;
9294
+ if (!onConnectionUri) throw new ConnectionUriHandlerMissingError({
9295
+ chain,
9296
+ type,
9297
+ walletKey
9298
+ });
9299
+ const starter = getUriConnectionStarterRegistry(client).get({
9300
+ chain,
9301
+ type
9302
+ });
9303
+ if (!starter) throw new NoConnectionOptionAvailableError({
9304
+ chain,
9305
+ walletKey
9306
+ });
9307
+ const { approval, uri } = await starter.start({ addToDynamicWalletAccounts });
9308
+ const walletAccountsPromise = approval();
9309
+ walletAccountsPromise.catch(() => void 0);
9310
+ await onConnectionUri({ uri: getConnectionUriDeeplink({
9311
+ deeplinks,
9312
+ type,
9313
+ uri
9314
+ }) ?? uri });
9315
+ const { walletAccounts } = await walletAccountsPromise;
9316
+ const [walletAccount] = walletAccounts;
9317
+ if (!walletAccount) throw new NoAddressFoundError();
9318
+ return walletAccount;
9319
+ };
9320
+
9321
+ //#endregion
9322
+ //#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
9323
+ /**
9324
+ * Placeholder the wallet book leaves in in-app-browser URLs for the app URL
9325
+ * the wallet should open.
9326
+ */
9327
+ const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
9328
+ /**
9329
+ * Fills a wallet's in-app-browser URL template with the app URL to open.
9330
+ *
9331
+ * Wallet book entries carry the entry point as a template (e.g.
9332
+ * `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
9333
+ * usable once every occurrence of the placeholder is substituted in,
9334
+ * percent-encoded. Templates without the placeholder are returned untouched —
9335
+ * some wallets open a fixed landing page.
9336
+ *
9337
+ * @example
9338
+ * ```ts
9339
+ * buildInAppBrowserUrl({
9340
+ * appUrl: 'https://myapp.xyz/login',
9341
+ * inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
9342
+ * });
9343
+ * // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
9344
+ * ```
9345
+ *
9346
+ * @param params.appUrl - The URL of your app for the wallet's browser to open.
9347
+ * @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
9348
+ * @returns The in-app-browser URL to open.
9349
+ * @see redirectToInAppBrowser
9350
+ * @see getWalletOptionsCatalogue
9351
+ * @notInstrumented
9352
+ */
9353
+ const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
9354
+
9355
+ //#endregion
9356
+ //#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
9357
+ /**
9358
+ * Leaves your app for a wallet's in-app browser, which reloads `appUrl`
9359
+ * inside it.
9360
+ *
9361
+ * Call this from `handleWalletBrowserRedirect` with the URL of the page the
9362
+ * wallet should reload. The wallet's in-app-browser entry point is read from
9363
+ * the wallet options catalogue, so you only need the wallet's key. The wallet
9364
+ * is only injected on that reload, so the connection is made on the next page
9365
+ * load rather than in the current one.
9366
+ *
9367
+ * @example
9368
+ * ```ts
9369
+ * await connectWalletOption({
9370
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
9371
+ * redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
9372
+ * walletKey: 'coinbase',
9373
+ * });
9374
+ * ```
9375
+ *
9376
+ * @param params.appUrl - The URL of your app for the wallet's browser to open.
9377
+ * @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
9378
+ * @param [params.chain] - The chain to open the wallet's browser for. Required only when the wallet exposes an in-app browser on more than one enabled chain.
9379
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9380
+ * @returns A promise that resolves once the redirect is triggered.
9381
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9382
+ * @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
9383
+ * @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
9384
+ * @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
9385
+ * @see connectWalletOption
9386
+ * @see WalletBrowserRedirectHandlerParams
9387
+ * @instrumented
9388
+ */
9389
+ const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
9390
+ const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
9391
+ if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
9392
+ const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
9393
+ if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
9394
+ chain,
9395
+ installationUrls: walletOption.installationUrls,
9396
+ walletKey
9397
+ });
9398
+ const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
9399
+ if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
9400
+ chains: availableChains,
9401
+ walletKey
9402
+ });
9403
+ const [inAppBrowserOption] = inAppBrowserOptions;
9404
+ const urlToOpen = buildInAppBrowserUrl({
9405
+ appUrl,
9406
+ inAppBrowserUrl: inAppBrowserOption.url
9407
+ });
9408
+ assertSafeDeeplinkUrl(urlToOpen);
9409
+ await getCore(client).openDeeplink(urlToOpen);
9410
+ };
9411
+ const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
9412
+ const __redirectToInAppBrowser_wrapped = instrumentFunction({
9413
+ fn: __redirectToInAppBrowser_impl,
9414
+ functionName: "redirectToInAppBrowser",
9415
+ getCore: () => {
9416
+ try {
9417
+ return getCore(getDefaultClient());
9418
+ } catch {
9419
+ return;
9420
+ }
9421
+ }
9422
+ });
9423
+
9424
+ //#endregion
9425
+ //#region src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts
9426
+ /**
9427
+ * Picks the connection option `connectWalletOption` should drive for a wallet.
9428
+ *
9429
+ * Reads the wallet options catalogue, keeps the options this client can
9430
+ * actually drive — a registered wallet provider, an in-app-browser entry, or
9431
+ * a URI pairing whose starter a chain extension has registered — and returns
9432
+ * the best one by the catalogue's ordering.
9433
+ *
9434
+ * @example
9435
+ * ```ts
9436
+ * const connectionOption = await resolveWalletConnectionOption(
9437
+ * { walletKey: 'metamask' },
9438
+ * client
9439
+ * );
9440
+ * ```
9441
+ *
9442
+ * @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue.
9443
+ * @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
9444
+ * @param client - The Dynamic client instance.
9445
+ * @returns A promise that resolves to the connection option to drive.
9446
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9447
+ * @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
9448
+ * @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
9449
+ * @see connectWalletOption
9450
+ * @see getWalletOptionsCatalogue
9451
+ * @notInstrumented
9452
+ */
9453
+ const resolveWalletConnectionOption = async ({ walletKey, chain }, client) => {
9454
+ const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
9455
+ if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
9456
+ const uriConnectionStarterRegistry = getUriConnectionStarterRegistry(client);
9457
+ const availableOptions = walletOption.connectionOptions.filter((option) => !chain || option.chain === chain).filter((option) => {
9458
+ if (option.type !== "walletConnect" && option.type !== "metamaskSdkUri") return true;
9459
+ const starter = uriConnectionStarterRegistry.get({
9460
+ chain: option.chain,
9461
+ type: option.type
9462
+ });
9463
+ return Boolean(starter);
9464
+ });
9465
+ if (availableOptions.length === 0) throw new NoConnectionOptionAvailableError({
9466
+ chain,
9467
+ installationUrls: walletOption.installationUrls,
9468
+ walletKey
9469
+ });
9470
+ const availableChains = [...new Set(availableOptions.map((option) => option.chain))];
9471
+ if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
9472
+ chains: availableChains,
9473
+ walletKey
9474
+ });
9475
+ const [connectionOption] = availableOptions;
9476
+ return connectionOption;
9477
+ };
9478
+
9479
+ //#endregion
9480
+ //#region src/utils/getCurrentPageUrl/getCurrentPageUrl.ts
9481
+ /**
9482
+ * Returns the URL of the page the app is running in.
9483
+ *
9484
+ * @example
9485
+ * ```ts
9486
+ * const appUrl = getCurrentPageUrl() ?? 'https://mydapp.xyz';
9487
+ * ```
9488
+ *
9489
+ * @returns The current page URL, or null where there is no page to read it from, such as on React Native and during server-side rendering.
9490
+ * @see isServerSideRendering
9491
+ * @see redirectToInAppBrowser
9492
+ * @notInstrumented
9493
+ */
9494
+ const getCurrentPageUrl = () => {
9495
+ if (typeof window === "undefined") return null;
9496
+ const href = window.location?.href;
9497
+ if (typeof href !== "string") return null;
9498
+ return href;
9499
+ };
9500
+
9501
+ //#endregion
9502
+ //#region src/highLevelFunctions/connectWalletOption/connectWalletOption.ts
9503
+ /**
9504
+ * Connects to an external wallet by its wallet options catalogue key and
9505
+ * returns the connected wallet account.
9506
+ *
9507
+ * Picks the connection path for the wallet so the customer does not have to:
9508
+ * a registered wallet provider when the user has the wallet installed,
9509
+ * otherwise a URI pairing (WalletConnect or the MetaMask SDK), with the
9510
+ * pairing URI handed to `onConnectionUri` while the returned promise waits for
9511
+ * the user to approve on the wallet side.
9512
+ *
9513
+ * Wallets that can only be reached through their own in-app browser — no
9514
+ * extension, no URI pairing — resolve to a redirect instead: the wallet and
9515
+ * chain are handed to `handleWalletBrowserRedirect`, which leaves for that
9516
+ * browser with `redirectToInAppBrowser`. Without that handler, the current
9517
+ * page is redirected into the wallet's browser directly, so the handler is
9518
+ * only needed to pick a different page to come back to, or where there is no
9519
+ * page URL to reuse (React Native, server-side rendering). The returned
9520
+ * promise never settles either way, since the connection completes on the
9521
+ * next page load inside the wallet's browser.
9522
+ *
9523
+ * Note: This function does not verify the wallet account — use
9524
+ * `verifyWalletAccount` afterwards to link it to the user.
9525
+ *
9526
+ * @example
9527
+ * ```ts
9528
+ * const walletAccount = await connectWalletOption({
9529
+ * handleWalletBrowserRedirect: ({ chain, walletKey }) =>
9530
+ * redirectToInAppBrowser({ appUrl: 'https://mydapp.xyz', chain, walletKey }),
9531
+ * onConnectionUri: ({ uri }) => renderQrCode(uri),
9532
+ * walletKey: 'metamask',
9533
+ * });
9534
+ * console.log(walletAccount.address);
9535
+ * ```
9536
+ *
9537
+ * @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue (e.g. 'metamask', 'phantom').
9538
+ * @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
9539
+ * @param [params.onConnectionUri] - Called with the pairing URI when the connection runs through a URI pairing.
9540
+ * @param [params.handleWalletBrowserRedirect] - Called with the wallet and chain when the wallet can only be connected through its own in-app browser. Defaults to redirecting the current page into that browser.
9541
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
9542
+ * @returns A promise that resolves to the connected wallet account, or that never settles on the in-app-browser path.
9543
+ * @throws WalletOptionNotFoundError If no wallet option matches the key.
9544
+ * @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
9545
+ * @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
9546
+ * @throws ConnectionUriHandlerMissingError If the wallet resolves to a URI pairing and no onConnectionUri handler was passed.
9547
+ * @throws WalletBrowserRedirectHandlerMissingError If the wallet resolves to its in-app browser, no handleWalletBrowserRedirect handler was passed, and there is no current page URL to redirect.
9548
+ * @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
9549
+ * @see verifyWalletAccount
9550
+ * @see redirectToInAppBrowser
9551
+ * @see getWalletOptionsCatalogue
9552
+ * @instrumented
9553
+ */
9554
+ const connectWalletOption = async ({ walletKey, chain, handleWalletBrowserRedirect, onConnectionUri }, client = getDefaultClient()) => {
9555
+ const connectionOption = await resolveWalletConnectionOption({
9556
+ chain,
9557
+ walletKey
9558
+ }, client);
9559
+ if (connectionOption.type === "withWalletProvider") return __connectWithWalletProvider_wrapped({ walletProviderKey: connectionOption.walletProviderKey }, client);
9560
+ if (connectionOption.type === "inAppBrowser") {
9561
+ const { chain: inAppBrowserChain } = connectionOption;
9562
+ if (handleWalletBrowserRedirect) handleWalletBrowserRedirect({
9563
+ chain: inAppBrowserChain,
9564
+ walletKey
9565
+ });
9566
+ else {
9567
+ const currentPageUrl = getCurrentPageUrl();
9568
+ if (!currentPageUrl) throw new WalletBrowserRedirectHandlerMissingError({
9569
+ chain: inAppBrowserChain,
9570
+ walletKey
9571
+ });
9572
+ await __redirectToInAppBrowser_wrapped({
9573
+ appUrl: currentPageUrl,
9574
+ chain: inAppBrowserChain,
9575
+ walletKey
9576
+ }, client);
9577
+ }
9578
+ return new Promise(() => void 0);
9579
+ }
9580
+ return connectWithUriConnectionOption({
9581
+ addToDynamicWalletAccounts: true,
9582
+ connectionOption,
9583
+ onConnectionUri,
9584
+ walletKey
9585
+ }, client);
9586
+ };
9587
+ const __connectWalletOption_impl = connectWalletOption;
9588
+ const __connectWalletOption_wrapped = instrumentFunction({
9589
+ fn: __connectWalletOption_impl,
9590
+ functionName: "connectWalletOption",
9591
+ getCore: () => {
9592
+ try {
9593
+ return getCore(getDefaultClient());
9594
+ } catch {
9595
+ return;
9596
+ }
9597
+ }
9598
+ });
9599
+
8875
9600
  //#endregion
8876
9601
  //#region src/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.ts
8877
9602
  /**
@@ -10070,36 +10795,6 @@ const __withdrawFromYieldVault_wrapped = instrumentFunction({
10070
10795
  }
10071
10796
  });
10072
10797
 
10073
- //#endregion
10074
- //#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
10075
- /**
10076
- * Appends a wallet connection URI to a deeplink URL.
10077
- *
10078
- * Generic across URI-deeplink connection options — works for both
10079
- * WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
10080
- * appropriate query parameter separator based on whether the deeplink
10081
- * already contains query parameters.
10082
- *
10083
- * @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
10084
- * @param params.connectionUri - The connection URI to append.
10085
- * @returns The deeplink URL with the connection URI appended as a query parameter.
10086
- *
10087
- * @example
10088
- * ```ts
10089
- * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
10090
- * // Returns: 'walletapp://wc?uri=wc%3A123-456'
10091
- *
10092
- * appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
10093
- * // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
10094
- * ```
10095
- * @notInstrumented
10096
- */
10097
- const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
10098
- const url = new URL(deeplinkUrl);
10099
- url.searchParams.set("uri", connectionUri);
10100
- return url.href;
10101
- };
10102
-
10103
10798
  //#endregion
10104
10799
  //#region src/utils/parseUserAgent/parseUserAgent.ts
10105
10800
  const browserMatchers = [
@@ -10181,5 +10876,5 @@ const parseUserAgent = ({ userAgent }) => {
10181
10876
  assertPackageVersion(name, version);
10182
10877
 
10183
10878
  //#endregion
10184
- export { BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, 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, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, 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, __claimYieldRewards_wrapped as claimYieldRewards, 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, createCoinbaseExchangeTransfer, __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, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, 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, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, 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, screenTransaction, __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, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
10879
+ export { AmbiguousWalletChainError, BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, ConnectionUriHandlerMissingError, 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, NoConnectionOptionAvailableError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletBrowserRedirectHandlerMissingError, WalletOptionNotFoundError, 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, __claimYieldRewards_wrapped as claimYieldRewards, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWalletOption_wrapped as connectWalletOption, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, createCoinbaseExchangeTransfer, __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, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, 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, getPreferredWalletDeepLink, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __redirectToInAppBrowser_wrapped as redirectToInAppBrowser, __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, screenTransaction, __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, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
10185
10880
  //# sourceMappingURL=index.native.esm.js.map