@dynamic-labs-sdk/client 1.2.1 → 1.3.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 (139) hide show
  1. package/dist/{InvalidParamError-BYnLW_9s.native.esm.js → InvalidParamError-9kQBK3sP.native.esm.js} +2 -2
  2. package/dist/{InvalidParamError-BYnLW_9s.native.esm.js.map → InvalidParamError-9kQBK3sP.native.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-CEykJlaG.cjs → InvalidParamError-DQvZQdQ9.cjs} +3 -3
  4. package/dist/{InvalidParamError-CEykJlaG.cjs.map → InvalidParamError-DQvZQdQ9.cjs.map} +1 -1
  5. package/dist/{InvalidParamError-uluG140m.esm.js → InvalidParamError-Za4cvW7K.esm.js} +2 -2
  6. package/dist/{InvalidParamError-uluG140m.esm.js.map → InvalidParamError-Za4cvW7K.esm.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-33QOxTKa.native.esm.js → NotWaasWalletAccountError-BTMvHTA8.native.esm.js} +3 -3
  8. package/dist/{NotWaasWalletAccountError-33QOxTKa.native.esm.js.map → NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map} +1 -1
  9. package/dist/{NotWaasWalletAccountError-DmlwWvy0.esm.js → NotWaasWalletAccountError-By3Y4taq.esm.js} +3 -3
  10. package/dist/{NotWaasWalletAccountError-DmlwWvy0.esm.js.map → NotWaasWalletAccountError-By3Y4taq.esm.js.map} +1 -1
  11. package/dist/{NotWaasWalletAccountError-BNdbbGX7.cjs → NotWaasWalletAccountError-Ciq7b-Y6.cjs} +3 -3
  12. package/dist/{NotWaasWalletAccountError-BNdbbGX7.cjs.map → NotWaasWalletAccountError-Ciq7b-Y6.cjs.map} +1 -1
  13. package/dist/core.cjs +5 -5
  14. package/dist/core.esm.js +5 -5
  15. package/dist/core.native.esm.js +5 -5
  16. package/dist/exports/index.d.ts +3 -0
  17. package/dist/exports/index.d.ts.map +1 -1
  18. package/dist/{getNetworkProviderFromNetworkId-BOCwNNMm.cjs → getNetworkProviderFromNetworkId-BA0CHZzu.cjs} +3 -3
  19. package/dist/{getNetworkProviderFromNetworkId-BOCwNNMm.cjs.map → getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map} +1 -1
  20. package/dist/{getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js → getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js} +3 -3
  21. package/dist/{getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js.map → getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map} +1 -1
  22. package/dist/{getNetworkProviderFromNetworkId-CS1GXEp6.esm.js → getNetworkProviderFromNetworkId-RWcIZDgC.esm.js} +3 -3
  23. package/dist/{getNetworkProviderFromNetworkId-CS1GXEp6.esm.js.map → getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map} +1 -1
  24. package/dist/{getSignedSessionId-B42gT4xk.cjs → getSignedSessionId-BCU987hO.cjs} +3 -3
  25. package/dist/{getSignedSessionId-B42gT4xk.cjs.map → getSignedSessionId-BCU987hO.cjs.map} +1 -1
  26. package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js → getSignedSessionId-DzNCj6g_.native.esm.js} +3 -3
  27. package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js.map → getSignedSessionId-DzNCj6g_.native.esm.js.map} +1 -1
  28. package/dist/{getSignedSessionId-D1Oh4604.esm.js → getSignedSessionId-la6RXITX.esm.js} +3 -3
  29. package/dist/{getSignedSessionId-D1Oh4604.esm.js.map → getSignedSessionId-la6RXITX.esm.js.map} +1 -1
  30. package/dist/{getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js → getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js} +3 -2
  31. package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +1 -0
  32. package/dist/{getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs → getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs} +4 -3
  33. package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +1 -0
  34. package/dist/{getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js → getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js} +3 -2
  35. package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +1 -0
  36. package/dist/index.cjs +854 -19
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.esm.js +854 -20
  39. package/dist/index.esm.js.map +1 -1
  40. package/dist/index.native.esm.js +854 -20
  41. package/dist/index.native.esm.js.map +1 -1
  42. package/dist/{isMfaRequiredForAction-G7SXCZ5L.esm.js → isMfaRequiredForAction-C1u4Z__n.esm.js} +2 -2
  43. package/dist/{isMfaRequiredForAction-G7SXCZ5L.esm.js.map → isMfaRequiredForAction-C1u4Z__n.esm.js.map} +1 -1
  44. package/dist/{isMfaRequiredForAction-CJvFP4oN.cjs → isMfaRequiredForAction-CMClgbT0.cjs} +2 -2
  45. package/dist/{isMfaRequiredForAction-CJvFP4oN.cjs.map → isMfaRequiredForAction-CMClgbT0.cjs.map} +1 -1
  46. package/dist/{isMfaRequiredForAction-BfabCDxI.native.esm.js → isMfaRequiredForAction-DSX-TV2z.native.esm.js} +2 -2
  47. package/dist/{isMfaRequiredForAction-BfabCDxI.native.esm.js.map → isMfaRequiredForAction-DSX-TV2z.native.esm.js.map} +1 -1
  48. package/dist/modules/balances/getBalances/getBalances.d.ts +22 -10
  49. package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
  50. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +6 -2
  51. package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
  52. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.d.ts +2 -0
  53. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/{shouldFilterWallet → shouldFilterWalletForWalletConnect}/index.d.ts.map +1 -1
  54. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts +13 -0
  55. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts.map +1 -0
  56. package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts +10 -0
  57. package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts.map +1 -0
  58. package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts +3 -0
  59. package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts.map +1 -0
  60. package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts +34 -0
  61. package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts.map +1 -0
  62. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts +22 -0
  63. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts.map +1 -0
  64. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts +18 -0
  65. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts.map +1 -0
  66. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts +2 -0
  67. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts.map +1 -0
  68. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts +2 -0
  69. package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts.map +1 -0
  70. package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts +21 -0
  71. package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts.map +1 -0
  72. package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts +27 -0
  73. package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts.map +1 -0
  74. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +23 -0
  75. package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -0
  76. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +39 -0
  77. package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -0
  78. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts +54 -0
  79. package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -0
  80. package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts +31 -0
  81. package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts.map +1 -0
  82. package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts +18 -0
  83. package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts.map +1 -0
  84. package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts +15 -0
  85. package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts.map +1 -0
  86. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts +21 -0
  87. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts.map +1 -0
  88. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts +44 -0
  89. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts.map +1 -0
  90. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts +20 -0
  91. package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts.map +1 -0
  92. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts +15 -0
  93. package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -0
  94. package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts +16 -0
  95. package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts.map +1 -0
  96. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +24 -0
  97. package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -0
  98. package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts +49 -0
  99. package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts.map +1 -0
  100. package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts +18 -0
  101. package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts.map +1 -0
  102. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +18 -0
  103. package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +1 -0
  104. package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts +23 -0
  105. package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts.map +1 -0
  106. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +22 -0
  107. package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts.map +1 -0
  108. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +20 -0
  109. package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts.map +1 -0
  110. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +34 -0
  111. package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts.map +1 -0
  112. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +164 -0
  113. package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -0
  114. package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts +20 -0
  115. package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts.map +1 -0
  116. package/dist/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.d.ts.map +1 -1
  117. package/dist/modules/wallets/walletProviderRegistry/index.d.ts +1 -1
  118. package/dist/modules/wallets/walletProviderRegistry/index.d.ts.map +1 -1
  119. package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts +19 -0
  120. package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts.map +1 -1
  121. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +23 -0
  122. package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -0
  123. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  124. package/dist/waas.cjs +6 -5
  125. package/dist/waas.cjs.map +1 -1
  126. package/dist/waas.esm.js +5 -4
  127. package/dist/waas.esm.js.map +1 -1
  128. package/dist/waas.native.esm.js +5 -4
  129. package/dist/waas.native.esm.js.map +1 -1
  130. package/dist/waasCore.cjs +4 -4
  131. package/dist/waasCore.esm.js +3 -3
  132. package/dist/waasCore.native.esm.js +3 -3
  133. package/package.json +3 -3
  134. package/dist/getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs.map +0 -1
  135. package/dist/getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js.map +0 -1
  136. package/dist/getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js.map +0 -1
  137. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/index.d.ts +0 -2
  138. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +0 -21
  139. package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts.map +0 -1
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as extractSessionId, B as name, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as getDefaultClient, I as setDefaultClient, O as DEFAULT_PII_FIELDS, P as NONCE_POOL_SIZE, R as BaseError, T as ValueMustBeDefinedError, V as version, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as getNonce, j as randomString, k as getUserAgent, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as MfaInvalidOtpError, w as assertDefined, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-uluG140m.esm.js";
2
- import { A as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, C as createLogger, D as createDeferredPromise, E as CannotTrackError, F as __logoutWithReason_wrapped, G as isEqualShallow, H as isSignedIn, I as generateSessionKeys, L as fetchProjectSettings, M as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, N as isServerSideRendering, O as FETCH_PROJECT_SETTINGS_TRACKER_KEY, P as getBuffer, R as createStorageKeySchema, S as createKeychainService, U as retryOnFail, V as createLocalStorageAdapter, W as subscribeWithSelector, _ as MethodNotImplementedError, a as updateWalletProviderKeysForVerifiedCredentials, b as getKeychainIndexedDBName, c as createSignInMessageStatement, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, k as GENERATE_SESSION_KEYS_TRACKER_KEY, l as formatSignInMessage, m as __setCaptchaToken_wrapped, o as verifyMessageSignatureOwnership, p as hasExtension, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as getAppMetadata, v as WalletAlreadyLinkedToAnotherUserError, w as createCrossTabBroadcast, x as createRealtimeService, y as NoNetworkProvidersError, z as createStorage } from "./getNetworkProviderFromNetworkId-CS1GXEp6.esm.js";
3
- import { A as onceEvent, C as formatWalletAccountId, D as emitEvent, O as offEvent, T as splitWalletProviderKey, a as parseElevatedAccessToken, b as getWalletAccounts, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, h as getWalletProviderFromWalletAccount, i as upsertElevatedAccessToken, k as onEvent, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as emitWalletAccountsChangedEvent, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, w as normalizeAddress, y as NoWalletProviderFoundError } from "./getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js";
4
- import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-DmlwWvy0.esm.js";
5
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-G7SXCZ5L.esm.js";
1
+ import { A as extractSessionId, B as name, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as getDefaultClient, I as setDefaultClient, O as DEFAULT_PII_FIELDS, P as NONCE_POOL_SIZE, R as BaseError, T as ValueMustBeDefinedError, V as version, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as getNonce, j as randomString, k as getUserAgent, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as MfaInvalidOtpError, w as assertDefined, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-Za4cvW7K.esm.js";
2
+ import { A as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, C as createLogger, D as createDeferredPromise, E as CannotTrackError, F as __logoutWithReason_wrapped, G as isEqualShallow, H as isSignedIn, I as generateSessionKeys, L as fetchProjectSettings, M as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, N as isServerSideRendering, O as FETCH_PROJECT_SETTINGS_TRACKER_KEY, P as getBuffer, R as createStorageKeySchema, S as createKeychainService, U as retryOnFail, V as createLocalStorageAdapter, W as subscribeWithSelector, _ as MethodNotImplementedError, a as updateWalletProviderKeysForVerifiedCredentials, b as getKeychainIndexedDBName, c as createSignInMessageStatement, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, k as GENERATE_SESSION_KEYS_TRACKER_KEY, l as formatSignInMessage, m as __setCaptchaToken_wrapped, o as verifyMessageSignatureOwnership, p as hasExtension, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as getAppMetadata, v as WalletAlreadyLinkedToAnotherUserError, w as createCrossTabBroadcast, x as createRealtimeService, y as NoNetworkProvidersError, z as createStorage } from "./getNetworkProviderFromNetworkId-RWcIZDgC.esm.js";
3
+ import { A as onceEvent, C as formatWalletAccountId, D as emitEvent, O as offEvent, T as splitWalletProviderKey, _ as getWalletProviderRegistry, a as parseElevatedAccessToken, b as getWalletAccounts, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, g as WalletProviderPriority, h as getWalletProviderFromWalletAccount, i as upsertElevatedAccessToken, k as onEvent, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as emitWalletAccountsChangedEvent, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, w as normalizeAddress, y as NoWalletProviderFoundError } from "./getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js";
4
+ import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-By3Y4taq.esm.js";
5
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-C1u4Z__n.esm.js";
6
6
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
7
7
  import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, TokenScope, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
8
8
  import * as z from "zod/mini";
@@ -2288,10 +2288,10 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
2288
2288
  * @returns A promise that resolves to an array of token balances.
2289
2289
  * @not-instrumented
2290
2290
  */
2291
- const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
2291
+ const getBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
2292
2292
  const core = getCore(client);
2293
2293
  const apiClient = createApiClient({}, client);
2294
- if (!networkId) {
2294
+ if (!networkId && !networkIds) {
2295
2295
  const activeNetworkId = await getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
2296
2296
  networkId = Number(activeNetworkId.networkId);
2297
2297
  }
@@ -2304,6 +2304,7 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
2304
2304
  includeNative,
2305
2305
  includePrices,
2306
2306
  networkId,
2307
+ networkIds,
2307
2308
  whitelistedContracts
2308
2309
  });
2309
2310
  };
@@ -3373,10 +3374,12 @@ const fetchLegacyWalletBook = async (client) => {
3373
3374
  };
3374
3375
 
3375
3376
  //#endregion
3376
- //#region src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.ts
3377
+ //#region src/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.ts
3377
3378
  /**
3378
- * Embedded wallet keys that should be filtered out from the WalletConnect catalog.
3379
- * These wallets are not meant to be displayed in wallet selection lists.
3379
+ * Embedded wallet keys that should be filtered out from any external-wallet
3380
+ * catalogue. These wallets are not products the user "connects" to from the
3381
+ * wallet selection list — they are embedded sign-in methods that live behind
3382
+ * different SDK entry points.
3380
3383
  * @not-instrumented
3381
3384
  */
3382
3385
  const EMBEDDED_WALLET_KEYS = [
@@ -3392,19 +3395,48 @@ const EMBEDDED_WALLET_KEYS = [
3392
3395
  "mpcwallet"
3393
3396
  ];
3394
3397
  /**
3395
- * Checks if a wallet should be filtered out from the WalletConnect catalog.
3398
+ * Generic "is this wallet eligible for an external-wallet catalogue" check.
3399
+ * Filters out:
3400
+ *
3401
+ * 1. Embedded sign-in methods (see {@link EMBEDDED_WALLET_KEYS}).
3402
+ * 2. Wallets that only ship a browser-extension injection (`injectedConfig`)
3403
+ * with no mobile or desktop links — these have no surface a customer
3404
+ * catalogue UI can drive to.
3405
+ *
3406
+ * Channel-specific eligibility (WalletConnect support, in-app browser URL,
3407
+ * installation links, …) is the caller's responsibility — wrap this helper
3408
+ * with an additional check, e.g.
3409
+ * {@link shouldFilterWalletForWalletConnect}.
3396
3410
  *
3397
3411
  * @returns True if the wallet should be filtered out, false otherwise.
3398
3412
  * @not-instrumented
3399
3413
  */
3400
3414
  const shouldFilterWallet = ({ wallet, walletKey }) => {
3401
3415
  if (EMBEDDED_WALLET_KEYS.includes(walletKey)) return true;
3402
- if (!wallet.walletConnect || !wallet.walletConnect.sdks.includes("sign_v2")) return true;
3403
3416
  const hasInjectedConfig = wallet.injectedConfig && wallet.injectedConfig.length > 0;
3404
3417
  const hasMobileLinks = Boolean(wallet.mobile?.androidId || wallet.mobile?.iosId || wallet.mobile?.native || wallet.mobile?.universal);
3405
3418
  const hasDesktopLinks = Boolean(wallet.desktop?.chromeId || wallet.desktop?.edgeId || wallet.desktop?.firefoxId || wallet.desktop?.operaId || wallet.desktop?.safariId || wallet.desktop?.universal);
3406
- if (hasInjectedConfig && !hasMobileLinks && !hasDesktopLinks) return true;
3407
- return false;
3419
+ return Boolean(hasInjectedConfig && !hasMobileLinks && !hasDesktopLinks);
3420
+ };
3421
+
3422
+ //#endregion
3423
+ //#region src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.ts
3424
+ /**
3425
+ * WalletConnect-specific filter. Applies the generic
3426
+ * {@link shouldFilterWallet} eligibility rules and additionally drops
3427
+ * wallets that do not advertise WalletConnect `sign_v2` support — the
3428
+ * protocol version Dynamic pairs against.
3429
+ *
3430
+ * @returns True if the wallet should be excluded from the WalletConnect
3431
+ * catalog, false otherwise.
3432
+ * @not-instrumented
3433
+ */
3434
+ const shouldFilterWalletForWalletConnect = ({ wallet, walletKey }) => {
3435
+ if (shouldFilterWallet({
3436
+ wallet,
3437
+ walletKey
3438
+ })) return true;
3439
+ return !wallet.walletConnect?.sdks.includes("sign_v2");
3408
3440
  };
3409
3441
 
3410
3442
  //#endregion
@@ -3612,7 +3644,7 @@ const transformWalletBook = ({ walletBook }) => {
3612
3644
  for (const [groupKey, group] of Object.entries(walletBook.groups)) groups[groupKey] = transformGroup({ group });
3613
3645
  const wallets = {};
3614
3646
  for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
3615
- if (shouldFilterWallet({
3647
+ if (shouldFilterWalletForWalletConnect({
3616
3648
  wallet,
3617
3649
  walletKey
3618
3650
  })) continue;
@@ -3646,7 +3678,7 @@ const getWalletConnectCatalog = async (client = getDefaultClient()) => {
3646
3678
 
3647
3679
  //#endregion
3648
3680
  //#region src/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.ts
3649
- const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
3681
+ const normalize$1 = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
3650
3682
  /**
3651
3683
  * Returns the wallet providers that belong to the same wallet group as the
3652
3684
  * given WalletConnect catalog entry. Useful for de-duplicating "installed"
@@ -3665,10 +3697,10 @@ const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wa
3665
3697
  * @not-instrumented
3666
3698
  */
3667
3699
  const matchWalletProvidersToCatalogGroup = ({ catalogGroupKey, catalogGroupName, walletProviders }) => {
3668
- const targets = new Set([normalize(catalogGroupKey)]);
3669
- if (catalogGroupName) targets.add(normalize(catalogGroupName));
3700
+ const targets = new Set([normalize$1(catalogGroupKey)]);
3701
+ if (catalogGroupName) targets.add(normalize$1(catalogGroupName));
3670
3702
  return walletProviders.filter((provider) => {
3671
- return [normalize(provider.groupKey), normalize(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
3703
+ return [normalize$1(provider.groupKey), normalize$1(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
3672
3704
  });
3673
3705
  };
3674
3706
 
@@ -3802,6 +3834,808 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
3802
3834
  }
3803
3835
  };
3804
3836
 
3837
+ //#endregion
3838
+ //#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
3839
+ /**
3840
+ * Resolves which wallet option (group) a wallet book entry belongs to. Used
3841
+ * by the catalogue's wallet-book-driven transformers (`walletConnect`,
3842
+ * `inAppBrowser`, `installation`) to bucket their emitted options.
3843
+ *
3844
+ * Wallet book entries inconsistently use `group` / `chainGroup` /
3845
+ * `walletGroup` for the same idea. The wallet key itself acts as the wallet
3846
+ * option key when no group field is set.
3847
+ *
3848
+ * @param params.wallet - The wallet entry.
3849
+ * @param params.walletKey - The wallet's key in `walletBook.wallets`.
3850
+ * @returns The wallet option key.
3851
+ * @not-instrumented
3852
+ */
3853
+ const resolveWalletBookWalletOptionKey = ({ wallet, walletKey }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? walletKey;
3854
+
3855
+ //#endregion
3856
+ //#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts
3857
+ /**
3858
+ * Returns the wallet's in-app browser URL template, preferring the v2
3859
+ * field. `inAppBrowser` is deprecated but some wallet book entries
3860
+ * still carry only the v1 value, so it acts as a fallback. Trailing
3861
+ * `?? undefined` collapses the schema's `string | null` typing down to
3862
+ * the `string | undefined` return contract.
3863
+ *
3864
+ * @param params.wallet - The wallet book wallet entry.
3865
+ * @returns The in-app browser URL, or `undefined` if neither field is set.
3866
+ * @not-instrumented
3867
+ */
3868
+ const getInAppBrowserUrl = ({ wallet }) => wallet.mobile?.inAppBrowserV2 ?? wallet.mobile?.inAppBrowser ?? void 0;
3869
+
3870
+ //#endregion
3871
+ //#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts
3872
+ /**
3873
+ * Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
3874
+ * qualifies when it exposes a mobile in-app-browser URL — typically a
3875
+ * `cb_url={{encodedDappURI}}`-style template the customer fills in with the
3876
+ * current page URL before opening.
3877
+ *
3878
+ * Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
3879
+ * and injected-only wallets are dropped — so the catalogue's notion of
3880
+ * "external wallet" stays consistent across option types.
3881
+ *
3882
+ * @param params.walletBook - The fetched wallet book.
3883
+ * @returns Tagged `inAppBrowser` options paired with their wallet option keys.
3884
+ * @not-instrumented
3885
+ */
3886
+ const buildInAppBrowserOptions = ({ walletBook }) => {
3887
+ const result = [];
3888
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
3889
+ if (shouldFilterWallet({
3890
+ wallet,
3891
+ walletKey
3892
+ })) continue;
3893
+ const url = getInAppBrowserUrl({ wallet });
3894
+ if (!url) continue;
3895
+ result.push({
3896
+ option: {
3897
+ chain: getChainFromWalletSchema({
3898
+ wallet,
3899
+ walletKey
3900
+ }),
3901
+ type: "inAppBrowser",
3902
+ url
3903
+ },
3904
+ walletOptionKey: resolveWalletBookWalletOptionKey({
3905
+ wallet,
3906
+ walletKey
3907
+ })
3908
+ });
3909
+ }
3910
+ return result;
3911
+ };
3912
+
3913
+ //#endregion
3914
+ //#region src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts
3915
+ const PLAY_STORE_URL_TEMPLATE = "https://play.google.com/store/apps/details?id=";
3916
+ const APP_STORE_URL_TEMPLATE = "https://apps.apple.com/app/";
3917
+ const CHROME_WEB_STORE_URL_TEMPLATE = "https://chrome.google.com/webstore/detail/";
3918
+ const FIREFOX_ADDONS_URL_TEMPLATE = "https://addons.mozilla.org/firefox/addon/";
3919
+ const EDGE_ADDONS_URL_TEMPLATE = "https://microsoftedge.microsoft.com/addons/detail/";
3920
+ /**
3921
+ * Builds the install/download URL bag for a wallet book entry. Returns the
3922
+ * concrete URLs assembled from each store's ID field — Play Store, App
3923
+ * Store, Chrome Web Store, Firefox Add-ons, Edge Add-ons — plus the wallet's
3924
+ * own `desktop.universal` / `desktop.native` URLs when set.
3925
+ *
3926
+ * Fields the wallet book does not carry are left undefined; callers should
3927
+ * skip emitting an installation option for a wallet whose URL bag is empty.
3928
+ *
3929
+ * @param params.wallet - The wallet book entry.
3930
+ * @returns The URL bag, omitting fields the wallet does not provide.
3931
+ * @not-instrumented
3932
+ */
3933
+ const buildInstallationUrls = ({ wallet }) => {
3934
+ const androidId = wallet.mobile?.androidId;
3935
+ const iosId = wallet.mobile?.iosId;
3936
+ const chromeId = wallet.desktop?.chromeId;
3937
+ const firefoxId = wallet.desktop?.firefoxId;
3938
+ const edgeId = wallet.desktop?.edgeId;
3939
+ const native = wallet.desktop?.universal ?? wallet.desktop?.native;
3940
+ return {
3941
+ android: androidId ? `${PLAY_STORE_URL_TEMPLATE}${androidId}` : void 0,
3942
+ chrome: chromeId ? `${CHROME_WEB_STORE_URL_TEMPLATE}${chromeId}` : void 0,
3943
+ edge: edgeId ? `${EDGE_ADDONS_URL_TEMPLATE}${edgeId}` : void 0,
3944
+ firefox: firefoxId ? `${FIREFOX_ADDONS_URL_TEMPLATE}${firefoxId}` : void 0,
3945
+ ios: iosId ? `${APP_STORE_URL_TEMPLATE}${iosId}` : void 0,
3946
+ native: native || void 0
3947
+ };
3948
+ };
3949
+
3950
+ //#endregion
3951
+ //#region src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts
3952
+ /**
3953
+ * `buildInstallationUrls` always returns an object, but it can be fully
3954
+ * `undefined`-valued when the wallet book entry has no installable surface.
3955
+ * Skip those wallets — emitting an empty URL bag helps nobody.
3956
+ */
3957
+ const hasAnyInstallationUrl = ({ urls }) => Object.values(urls).some(Boolean);
3958
+ /**
3959
+ * Collects install / download URLs for every wallet book entry that has
3960
+ * at least one installable surface, keyed by the wallet option key the
3961
+ * wallet groups under. The catalogue assembly step merges this map into
3962
+ * the per-key wallet option shell so `WalletOption.installationUrls` is
3963
+ * populated alongside (or instead of) `connectionOptions`.
3964
+ *
3965
+ * First-seen URLs win when multiple wallet book entries resolve to the
3966
+ * same wallet option key — wallet book authors put the most accurate
3967
+ * install links on the canonical entry, so the first-seen one is the
3968
+ * right pick.
3969
+ *
3970
+ * Reuses the generic `shouldFilterWallet` rules so embedded wallets do
3971
+ * not appear here either — they're not user-installable products.
3972
+ *
3973
+ * @param params.walletBook - The fetched wallet book.
3974
+ * @returns A map from wallet option key to its install URL bag.
3975
+ * @not-instrumented
3976
+ */
3977
+ const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
3978
+ const map = /* @__PURE__ */ new Map();
3979
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
3980
+ if (shouldFilterWallet({
3981
+ wallet,
3982
+ walletKey
3983
+ })) continue;
3984
+ const urls = buildInstallationUrls({ wallet });
3985
+ if (!hasAnyInstallationUrl({ urls })) continue;
3986
+ const walletOptionKey = resolveWalletBookWalletOptionKey({
3987
+ wallet,
3988
+ walletKey
3989
+ });
3990
+ if (!map.has(walletOptionKey)) map.set(walletOptionKey, urls);
3991
+ }
3992
+ return map;
3993
+ };
3994
+
3995
+ //#endregion
3996
+ //#region src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts
3997
+ /**
3998
+ * A wallet only deserves a `walletConnect` catalogue option if it has at
3999
+ * least one mobile deeplink — that's the value-add the option provides over
4000
+ * the bare WC pairing URI. Wallets that exist in the wallet book but don't
4001
+ * expose a deeplink (rare, but present) are silently skipped.
4002
+ */
4003
+ const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
4004
+ /**
4005
+ * Builds the `walletConnect` catalogue options from a fetched wallet book.
4006
+ * Applies the WalletConnect-specific eligibility filter
4007
+ * (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
4008
+ * without `sign_v2` support are excluded — same surface as
4009
+ * `getWalletConnectCatalog`.
4010
+ *
4011
+ * Each emitted option carries the wallet's mobile deeplinks. Customers
4012
+ * combine these with their chain's `connectWithWalletConnect<Chain>` URI via
4013
+ * `appendWalletConnectUriToDeepLink` to open the wallet's app.
4014
+ *
4015
+ * @param params.walletBook - The fetched wallet book.
4016
+ * @returns Tagged `walletConnect` options paired with their wallet option keys.
4017
+ * @not-instrumented
4018
+ */
4019
+ const buildWalletConnectOptions = ({ walletBook }) => {
4020
+ const result = [];
4021
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
4022
+ if (shouldFilterWalletForWalletConnect({
4023
+ wallet,
4024
+ walletKey
4025
+ })) continue;
4026
+ if (!hasUsableDeeplink({ wallet })) continue;
4027
+ const walletOptionKey = resolveWalletBookWalletOptionKey({
4028
+ wallet,
4029
+ walletKey
4030
+ });
4031
+ const chain = getChainFromWalletSchema({
4032
+ wallet,
4033
+ walletKey
4034
+ });
4035
+ result.push({
4036
+ option: {
4037
+ chain,
4038
+ deeplinks: {
4039
+ native: wallet.mobile?.native,
4040
+ universal: wallet.mobile?.universal
4041
+ },
4042
+ type: "walletConnect"
4043
+ },
4044
+ walletOptionKey
4045
+ });
4046
+ }
4047
+ return result;
4048
+ };
4049
+
4050
+ //#endregion
4051
+ //#region src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts
4052
+ /**
4053
+ * Assembles a `WalletOption` for a resolved wallet option key, populated
4054
+ * with the connection options the transformers produced for it plus an
4055
+ * optional install / download URL bag.
4056
+ *
4057
+ * Display merge rules (provider self-announced metadata wins where set):
4058
+ *
4059
+ * - `name`: `displayOverride.name` ?? wallet book group name ?? bare key.
4060
+ * - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL ?? `''`.
4061
+ * - `primaryColor`: wallet book group brand color only (providers do not
4062
+ * ship a primary color in their announcement metadata).
4063
+ * - `installationUrls`: copied through if present.
4064
+ *
4065
+ * Why provider precedence: a registered wallet provider knows its own
4066
+ * brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
4067
+ * wallet authoring its own identity). The wallet book fills in fields the
4068
+ * announcement does not carry — currently only `primaryColor`.
4069
+ *
4070
+ * @param params.connectionOptions - The connections to attach to this wallet option.
4071
+ * @param [params.displayOverride] - Provider-announced display info that overrides the wallet book's name and iconUrl.
4072
+ * @param [params.installationUrls] - Install/download URL bag for this wallet.
4073
+ * @param params.walletBook - The fetched wallet book.
4074
+ * @param params.walletOptionKey - The wallet option key.
4075
+ * @returns The constructed wallet option.
4076
+ * @not-instrumented
4077
+ */
4078
+ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrls, walletBook, walletOptionKey }) => {
4079
+ const group = walletBook.groups[walletOptionKey];
4080
+ const groupSpriteId = group?.brand?.spriteId;
4081
+ const groupIconUrl = groupSpriteId ? getSpriteUrl({ spriteId: groupSpriteId }) : void 0;
4082
+ return {
4083
+ connectionOptions,
4084
+ iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
4085
+ installationUrls,
4086
+ key: walletOptionKey,
4087
+ name: displayOverride?.name ?? group?.name ?? walletOptionKey,
4088
+ primaryColor: group?.brand?.primaryColor
4089
+ };
4090
+ };
4091
+
4092
+ //#endregion
4093
+ //#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
4094
+ /**
4095
+ * Maps a registered wallet provider's registration priority to the
4096
+ * `WithWalletProviderSource` value that should appear on its catalogue option.
4097
+ *
4098
+ * Priority mapping (set by each chain extension when it calls
4099
+ * `registry.register`):
4100
+ *
4101
+ * - `WALLET_SDK` → `'sdk'` — branded SDKs wrapped by chain extensions
4102
+ * (Base Account via `@base-org/account`, MetaMask Connect, …).
4103
+ * - `WALLET_SELF_ANNOUNCEMENT_STANDARD` → `'selfAnnounced'` — in-page
4104
+ * self-announcement standards (EIP-6963 on EVM, Wallet Standard on
4105
+ * Solana / Sui / …).
4106
+ * - `WINDOW_INJECT` → `'windowInjected'` — legacy `window.*` injection.
4107
+ *
4108
+ * Returns `undefined` for providers whose registration priority does not
4109
+ * correspond to a connectable external-wallet source — callers filter these
4110
+ * out before emitting catalogue options.
4111
+ *
4112
+ * @param params.entry - The registry entry to classify.
4113
+ * @returns The matching source, or `undefined` if this entry should not
4114
+ * surface a `withWalletProvider` option.
4115
+ * @not-instrumented
4116
+ */
4117
+ const classifyWithWalletProviderSource = ({ entry }) => {
4118
+ const { priority } = entry;
4119
+ if (priority === WalletProviderPriority.WALLET_SDK) return "sdk";
4120
+ if (priority === WalletProviderPriority.WALLET_SELF_ANNOUNCEMENT_STANDARD) return "selfAnnounced";
4121
+ if (priority === WalletProviderPriority.WINDOW_INJECT) return "windowInjected";
4122
+ };
4123
+
4124
+ //#endregion
4125
+ //#region src/modules/wallets/utils/stripChainSuffix/stripChainSuffix.ts
4126
+ /**
4127
+ * Removes the lowercased chain suffix that `normalizeWalletNameWithChain`
4128
+ * appends. Used by `findWalletOptionKeyForProviderKey` to recover the wallet
4129
+ * book wallet key candidate from a `walletProviderKey`. If the suffix is
4130
+ * not present (some chain extensions already bake the chain into the
4131
+ * display name), the input is returned unchanged.
4132
+ *
4133
+ * @param params.chain - The chain whose suffix should be stripped.
4134
+ * @param params.normalizedName - The normalized wallet-name-with-chain string.
4135
+ * @returns The name with the chain suffix removed, or the input unchanged.
4136
+ * @not-instrumented
4137
+ */
4138
+ const stripChainSuffix = ({ chain, normalizedName }) => {
4139
+ const suffix = chain.toLowerCase();
4140
+ if (normalizedName.endsWith(suffix)) return normalizedName.slice(0, -suffix.length);
4141
+ return normalizedName;
4142
+ };
4143
+
4144
+ //#endregion
4145
+ //#region src/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.ts
4146
+ /**
4147
+ * Normalizes a wallet's self-announced `displayName` into a stable wallet
4148
+ * option key. Used by `findWalletOptionKeyForProviderKey` as the off-book
4149
+ * fallback — registered providers whose `walletProviderKey` does not
4150
+ * resolve to any wallet book entry still surface in the catalogue under a
4151
+ * key derived from the name they ship in their metadata.
4152
+ *
4153
+ * The normalization (lowercase + whitespace-strip) intentionally matches
4154
+ * how the legacy wallet book composes its `wallets.<key>` keys, so a
4155
+ * self-described provider's option will merge cleanly with its book entry
4156
+ * if one ever lands later.
4157
+ *
4158
+ * Multi-chain registrations of the same wallet (e.g. Phantom announced via
4159
+ * EIP-6963 on EVM and via Wallet Standard on Solana) collapse onto the
4160
+ * same wallet option through this normalization, since each registration
4161
+ * announces the same `displayName`.
4162
+ *
4163
+ * @param displayName - The provider's `metadata.displayName`.
4164
+ * @returns The normalized wallet option key (lowercased, no whitespace).
4165
+ * @not-instrumented
4166
+ */
4167
+ const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().replace(/\s+/g, "");
4168
+
4169
+ //#endregion
4170
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
4171
+ const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
4172
+ /**
4173
+ * Looks for a wallet book entry whose `name` or `shortName` normalizes to
4174
+ * the same string as `candidate`. Used as a fallback by
4175
+ * `findWalletOptionKeyForProviderKey` for providers whose
4176
+ * `walletProviderKey` strips down to a value that does not match any
4177
+ * `walletBook.wallets` key directly (e.g. an extension whose display name
4178
+ * happens to match the wallet's `shortName` instead of its book key).
4179
+ *
4180
+ * @param params.candidate - The lowercased, chain-suffix-stripped candidate.
4181
+ * @param params.walletBook - The fetched wallet book.
4182
+ * @returns The matching wallet book wallet key, or `undefined`.
4183
+ * @not-instrumented
4184
+ */
4185
+ const findByNameMatch = ({ candidate, walletBook }) => {
4186
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) if (normalize(wallet.name) === candidate || normalize(wallet.shortName) === candidate) return walletKey;
4187
+ };
4188
+
4189
+ //#endregion
4190
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.ts
4191
+ /**
4192
+ * Picks the wallet option (group) key for a wallet book wallet. The wallet
4193
+ * book carries the group association under a few different field names
4194
+ * (`group`, `chainGroup`, `walletGroup`) depending on the wallet's
4195
+ * provenance — this helper centralises the lookup. When none of those
4196
+ * fields are set, the wallet key itself acts as its own wallet option key.
4197
+ *
4198
+ * @param params.fallback - Wallet key to return if no group field is set.
4199
+ * @param params.wallet - The wallet book wallet entry.
4200
+ * @returns The resolved wallet option key.
4201
+ * @not-instrumented
4202
+ */
4203
+ const resolveWalletOptionKey = ({ fallback, wallet }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? fallback;
4204
+
4205
+ //#endregion
4206
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.ts
4207
+ /**
4208
+ * Resolves a registered wallet provider to the wallet option key it should
4209
+ * be bucketed under. Always returns a key — providers with no wallet book
4210
+ * match fall back to their self-announced `metadata.displayName`, so the
4211
+ * catalogue surfaces them as self-described tiles instead of silently
4212
+ * dropping them.
4213
+ *
4214
+ * Resolution order (each step short-circuits on first hit):
4215
+ *
4216
+ * 1. **Direct wallet book lookup with chain suffix** — try
4217
+ * `walletBook.wallets[normalizedWalletNameWithChain]` as-is. Wallet
4218
+ * book entries are inconsistent about whether they keep the chain
4219
+ * suffix (e.g. `metamaskevm`) or strip it (e.g. `metamask`), so try
4220
+ * the suffixed form first.
4221
+ * 2. **Direct wallet book lookup without chain suffix** — strip the
4222
+ * suffix and retry.
4223
+ * 3. **Name match heuristic with chain suffix** — scan
4224
+ * `walletBook.wallets` for an entry whose normalized `name` or
4225
+ * `shortName` equals the suffixed candidate.
4226
+ * 4. **Name match heuristic without chain suffix** — same scan on the
4227
+ * stripped candidate.
4228
+ * 5. **Display-name fallback** — derive a stable key from
4229
+ * `walletProvider.metadata.displayName` via
4230
+ * {@link normalizeWalletDisplayName}. Multi-chain registrations of the
4231
+ * same self-described wallet (e.g. Phantom on EVM and Solana) collapse
4232
+ * onto the same tile because each announces the same display name.
4233
+ *
4234
+ * @param params.chain - The provider's chain (used to strip the suffix).
4235
+ * @param params.walletBook - The fetched wallet book.
4236
+ * @param params.walletProvider - The registered wallet provider.
4237
+ * @returns The wallet option key for this provider.
4238
+ * @not-instrumented
4239
+ */
4240
+ const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }) => {
4241
+ const { normalizedWalletNameWithChain } = splitWalletProviderKey(walletProvider.key);
4242
+ const candidates = [normalizedWalletNameWithChain, stripChainSuffix({
4243
+ chain,
4244
+ normalizedName: normalizedWalletNameWithChain
4245
+ })];
4246
+ for (const candidate of candidates) {
4247
+ const directHit = walletBook.wallets[candidate];
4248
+ if (directHit) return resolveWalletOptionKey({
4249
+ fallback: candidate,
4250
+ wallet: directHit
4251
+ });
4252
+ }
4253
+ for (const candidate of candidates) {
4254
+ const nameMatchKey = findByNameMatch({
4255
+ candidate,
4256
+ walletBook
4257
+ });
4258
+ if (nameMatchKey) return resolveWalletOptionKey({
4259
+ fallback: nameMatchKey,
4260
+ wallet: walletBook.wallets[nameMatchKey]
4261
+ });
4262
+ }
4263
+ return normalizeWalletDisplayName(walletProvider.metadata.displayName);
4264
+ };
4265
+
4266
+ //#endregion
4267
+ //#region src/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.ts
4268
+ /**
4269
+ * Converts each registered wallet provider entry into a
4270
+ * `WithWalletProviderConnectionOption` paired with its target wallet
4271
+ * option key and the provider's display override. Every classifiable
4272
+ * entry surfaces in the catalogue; the outer transformer uses the
4273
+ * carried `displayOverride` to override any wallet book branding for
4274
+ * that key (provider self-announcement wins over book).
4275
+ *
4276
+ * Entries whose registration priority is not recognised by
4277
+ * `classifyWithWalletProviderSource` are dropped from the catalogue and
4278
+ * an error is logged so Datadog surfaces the unknown registration path —
4279
+ * in production this should never happen, every chain extension is
4280
+ * expected to register with one of the documented priorities.
4281
+ *
4282
+ * @param params.entries - Snapshot of the registry's entries.
4283
+ * @param params.walletBook - The fetched wallet book.
4284
+ * @param client - The Dynamic client (used for logging unclassifiable entries).
4285
+ * @returns An array of tagged options, in input order.
4286
+ * @not-instrumented
4287
+ */
4288
+ const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
4289
+ const result = [];
4290
+ for (const entry of entries) {
4291
+ const source = classifyWithWalletProviderSource({ entry });
4292
+ if (!source) {
4293
+ getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
4294
+ chain: entry.walletProvider.chain,
4295
+ displayName: entry.walletProvider.metadata.displayName,
4296
+ priority: entry.priority,
4297
+ walletProviderKey: entry.walletProvider.key,
4298
+ walletProviderType: entry.walletProvider.walletProviderType
4299
+ });
4300
+ continue;
4301
+ }
4302
+ const walletOptionKey = findWalletOptionKeyForProviderKey({
4303
+ chain: entry.walletProvider.chain,
4304
+ walletBook,
4305
+ walletProvider: entry.walletProvider
4306
+ });
4307
+ result.push({
4308
+ displayOverride: {
4309
+ iconUrl: entry.walletProvider.metadata.icon,
4310
+ name: entry.walletProvider.metadata.displayName
4311
+ },
4312
+ option: {
4313
+ chain: entry.walletProvider.chain,
4314
+ source,
4315
+ type: "withWalletProvider",
4316
+ walletProviderKey: entry.walletProvider.key
4317
+ },
4318
+ walletOptionKey
4319
+ });
4320
+ }
4321
+ return result;
4322
+ };
4323
+
4324
+ //#endregion
4325
+ //#region src/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.ts
4326
+ /**
4327
+ * Wallet option keys `getWalletOptionsCatalogue` drops before returning.
4328
+ * Curated, product-level suppression.
4329
+ *
4330
+ * Example: Base Account SDK is the recommended entry point for
4331
+ * Coinbase-managed users, so the legacy Coinbase Wallet entries are
4332
+ * suppressed in favor of the SDK-backed `baseaccount` tile. Both the
4333
+ * wallet book group key (`coinbase`) and the normalized display-name
4334
+ * key (`coinbasewallet`) are listed so suppression holds regardless of
4335
+ * how the resolver lands on a key.
4336
+ *
4337
+ * Used in: `getWalletOptionsCatalogue`.
4338
+ */
4339
+ const EXCLUDED_WALLET_OPTION_KEYS = new Set(["coinbase", "coinbasewallet"]);
4340
+
4341
+ //#endregion
4342
+ //#region src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts
4343
+ /**
4344
+ * Buckets tagged connection options by their wallet option key. Preserves
4345
+ * first-seen order so that the caller's choice of
4346
+ * `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
4347
+ * order (wallet book order for walletConnect/inAppBrowser/installation,
4348
+ * registry order for withWalletProvider).
4349
+ *
4350
+ * Carries through the first-seen `displayOverride` per wallet option
4351
+ * key, so the shell builder can apply provider-announced metadata on
4352
+ * top of any wallet book entry.
4353
+ *
4354
+ * @param params.options - The tagged options to group.
4355
+ * @returns A map from wallet option key to its grouped option bucket,
4356
+ * iterable in first-seen order.
4357
+ * @not-instrumented
4358
+ */
4359
+ const groupOptionsByWalletOption = ({ options }) => {
4360
+ const map = /* @__PURE__ */ new Map();
4361
+ for (const { displayOverride, option, walletOptionKey } of options) {
4362
+ const existing = map.get(walletOptionKey);
4363
+ if (existing) {
4364
+ existing.connectionOptions.push(option);
4365
+ if (!existing.displayOverride && displayOverride) existing.displayOverride = displayOverride;
4366
+ } else map.set(walletOptionKey, {
4367
+ connectionOptions: [option],
4368
+ displayOverride
4369
+ });
4370
+ }
4371
+ return map;
4372
+ };
4373
+
4374
+ //#endregion
4375
+ //#region src/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.ts
4376
+ /**
4377
+ * Numeric priority for each `WalletConnectionOption` type. Lower values rank
4378
+ * first. Used to sort each wallet option's `connectionOptions` array so the
4379
+ * best connection path lands at index 0. Has no bearing on how the outer
4380
+ * wallet-option list is ordered — that's controlled by
4381
+ * `WalletOptionOrdering`.
4382
+ *
4383
+ * `withWalletProvider > walletConnect > inAppBrowser`
4384
+ */
4385
+ const CONNECTION_OPTION_PRIORITY = {
4386
+ inAppBrowser: 2,
4387
+ walletConnect: 1,
4388
+ withWalletProvider: 0
4389
+ };
4390
+ /**
4391
+ * Returns the numeric priority of a `WalletConnectionOption` for sorting.
4392
+ * Lower numbers rank first.
4393
+ *
4394
+ * @param params.option - The connection option to inspect.
4395
+ * @returns The numeric priority — lower is better.
4396
+ * @not-instrumented
4397
+ */
4398
+ const getConnectionOptionPriority = ({ option }) => CONNECTION_OPTION_PRIORITY[option.type];
4399
+
4400
+ //#endregion
4401
+ //#region src/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.ts
4402
+ /**
4403
+ * Sorts a wallet option's `connectionOptions` so the most preferred option lands at
4404
+ * index 0. Primary sort is by option-type priority
4405
+ * (`withWalletProvider` > `walletConnect` > `inAppBrowser`);
4406
+ * within a type, ties break alphabetically by `chain` for deterministic
4407
+ * output across calls.
4408
+ *
4409
+ * Returns a new array — the input is not mutated.
4410
+ *
4411
+ * @param params.options - The options to sort.
4412
+ * @returns A new array in priority order.
4413
+ * @not-instrumented
4414
+ */
4415
+ const sortConnectionOptions = ({ options }) => [...options].sort((a, b) => {
4416
+ const priorityDelta = getConnectionOptionPriority({ option: a }) - getConnectionOptionPriority({ option: b });
4417
+ if (priorityDelta !== 0) return priorityDelta;
4418
+ return a.chain.localeCompare(b.chain);
4419
+ });
4420
+
4421
+ //#endregion
4422
+ //#region src/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.ts
4423
+ /**
4424
+ * Hand-curated list of wallet book group keys that should surface at the top
4425
+ * of catalogue listings. Lower index = higher priority. Anything not in this
4426
+ * list falls through to the secondary sort (alphabetical by name).
4427
+ *
4428
+ * Used by `sortWalletOptions` (relevance mode) and by the react-demo's
4429
+ * WalletConnect picker. Keep both in sync when adding entries.
4430
+ */
4431
+ const PRIORITY_WALLET_KEYS = [
4432
+ "metamask",
4433
+ "coinbase",
4434
+ "baseaccount",
4435
+ "phantom",
4436
+ "magiceden",
4437
+ "trust",
4438
+ "okxwallet",
4439
+ "rainbow",
4440
+ "argentx",
4441
+ "backpack",
4442
+ "xverse",
4443
+ "onekey",
4444
+ "solflare",
4445
+ "braavos",
4446
+ "brave",
4447
+ "unisat",
4448
+ "bitgetwallet",
4449
+ "coin98"
4450
+ ];
4451
+
4452
+ //#endregion
4453
+ //#region src/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.ts
4454
+ /**
4455
+ * Returns the index of a wallet option in `PRIORITY_WALLET_KEYS`, or
4456
+ * `Number.POSITIVE_INFINITY` when the wallet is not in the hand-curated
4457
+ * priority list. Lower index = higher priority.
4458
+ *
4459
+ * @param params.walletOption - The wallet option to inspect.
4460
+ * @returns Numeric priority index — lower is better.
4461
+ * @not-instrumented
4462
+ */
4463
+ const getPriorityIndex = ({ walletOption }) => {
4464
+ const index = PRIORITY_WALLET_KEYS.indexOf(walletOption.key);
4465
+ return index === -1 ? Number.POSITIVE_INFINITY : index;
4466
+ };
4467
+
4468
+ //#endregion
4469
+ //#region src/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.ts
4470
+ /**
4471
+ * Compares two wallet options for relevance ordering: priority-list index
4472
+ * first, then alphabetical-by-name as the tie-break. Suitable for passing
4473
+ * straight to `Array.prototype.sort`.
4474
+ *
4475
+ * @param params.a - First wallet option.
4476
+ * @param params.b - Second wallet option.
4477
+ * @returns Negative when `a` ranks first, positive when `b` ranks first.
4478
+ * @not-instrumented
4479
+ */
4480
+ const compareByRelevance = ({ a, b }) => {
4481
+ const aIndex = getPriorityIndex({ walletOption: a });
4482
+ const bIndex = getPriorityIndex({ walletOption: b });
4483
+ if (aIndex !== bIndex) return aIndex - bIndex;
4484
+ return a.name.localeCompare(b.name, void 0, { sensitivity: "base" });
4485
+ };
4486
+
4487
+ //#endregion
4488
+ //#region src/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.ts
4489
+ /**
4490
+ * True when the wallet option has at least one connection — i.e. the user
4491
+ * can sign in right now. Install-only wallet options surface in the
4492
+ * catalogue too (they carry `installationUrls`) but have an empty
4493
+ * `connectionOptions` array; this predicate distinguishes them from
4494
+ * actually connectable wallets in the relevance sort.
4495
+ *
4496
+ * @param params.walletOption - The wallet option to inspect.
4497
+ * @returns True when `connectionOptions` is non-empty.
4498
+ * @not-instrumented
4499
+ */
4500
+ const hasAnyConnectionOption = ({ walletOption }) => walletOption.connectionOptions.length > 0;
4501
+
4502
+ //#endregion
4503
+ //#region src/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.ts
4504
+ /**
4505
+ * True when the wallet option has a `withWalletProvider` connection — i.e.
4506
+ * the user already has the wallet available in the page (browser extension,
4507
+ * Wallet Standard announcement, window injection, or an SDK-backed provider
4508
+ * one of our chain extensions registered). `connectionOptions` is
4509
+ * pre-sorted, so a registered provider always sits at index 0 when present.
4510
+ *
4511
+ * @param params.walletOption - The wallet option to inspect.
4512
+ * @returns True when an installed provider is available.
4513
+ * @not-instrumented
4514
+ */
4515
+ const hasInstalledProvider = ({ walletOption }) => walletOption.connectionOptions[0]?.type === "withWalletProvider";
4516
+
4517
+ //#endregion
4518
+ //#region src/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.ts
4519
+ /**
4520
+ * Sorts the outer wallet-option list. This is the only ordering controlled
4521
+ * by the customer; the inner `connectionOptions` array of each wallet
4522
+ * option is ordered separately by `sortConnectionOptions` using a fixed
4523
+ * option-type priority.
4524
+ *
4525
+ * - `'relevance'` (default): bucket wallet options into three tiers, in
4526
+ * this order:
4527
+ * 1. **Installed provider** — user already has the wallet available
4528
+ * (`withWalletProvider` at index 0).
4529
+ * 2. **Connectable** — has at least one connection (`walletConnect`
4530
+ * or `inAppBrowser`) but no installed provider.
4531
+ * 3. **Install-only** — no connection at all; only `installationUrls`.
4532
+ * Within each tier, rank by the hand-curated {@link PRIORITY_WALLET_KEYS}
4533
+ * list (MetaMask, Coinbase, Phantom, …); unknown wallets fall through to
4534
+ * alphabetical-by-name order at the tail of their tier.
4535
+ * - `'alphabetical'`: case-insensitive sort by wallet option `name`,
4536
+ * without bucketing.
4537
+ *
4538
+ * Returns a new array — the input is not mutated.
4539
+ *
4540
+ * @param params.walletOptions - The wallet options to sort.
4541
+ * @param params.ordering - The requested ordering.
4542
+ * @returns A new array in the requested order.
4543
+ * @not-instrumented
4544
+ */
4545
+ const sortWalletOptions = ({ walletOptions, ordering }) => {
4546
+ if (ordering === "alphabetical") return [...walletOptions].sort((a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" }));
4547
+ const installed = [];
4548
+ const connectable = [];
4549
+ const installOnly = [];
4550
+ for (const walletOption of walletOptions) if (hasInstalledProvider({ walletOption })) installed.push(walletOption);
4551
+ else if (hasAnyConnectionOption({ walletOption })) connectable.push(walletOption);
4552
+ else installOnly.push(walletOption);
4553
+ installed.sort((a, b) => compareByRelevance({
4554
+ a,
4555
+ b
4556
+ }));
4557
+ connectable.sort((a, b) => compareByRelevance({
4558
+ a,
4559
+ b
4560
+ }));
4561
+ installOnly.sort((a, b) => compareByRelevance({
4562
+ a,
4563
+ b
4564
+ }));
4565
+ return [
4566
+ ...installed,
4567
+ ...connectable,
4568
+ ...installOnly
4569
+ ];
4570
+ };
4571
+
4572
+ //#endregion
4573
+ //#region src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts
4574
+ const EMPTY_WALLET_BOOK = {
4575
+ groups: {},
4576
+ wallets: {}
4577
+ };
4578
+ /**
4579
+ * Returns a catalogue of the external wallet options a user can sign in
4580
+ * with through this client. Each wallet option carries an ordered
4581
+ * `connectionOptions` array — `withWalletProvider` (direct), `walletConnect`
4582
+ * (deeplink/QR), or `inAppBrowser` (mobile webview). Wallet options without
4583
+ * any matching connections are omitted.
4584
+ *
4585
+ * `includeWithWalletProvider` defaults to `true`; all other inclusion flags
4586
+ * are opt-in. `walletOptionOrdering` defaults to `'relevance'` (Dynamic's
4587
+ * recommended order); pass `'alphabetical'` to sort by wallet option name
4588
+ * within each option-priority tier.
4589
+ *
4590
+ * The wallet book is fetched only when an enabled flag needs it
4591
+ * (`includeWalletConnect`, `includeInAppBrowser`). Calls that only need
4592
+ * `includeWithWalletProvider` skip the fetch entirely.
4593
+ *
4594
+ * @param [params] - Inclusion flags + ordering preference.
4595
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
4596
+ * @returns A promise that resolves to the wallet options catalogue.
4597
+ * @not-instrumented
4598
+ */
4599
+ const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
4600
+ const includeWithWalletProvider = params.includeWithWalletProvider ?? true;
4601
+ const includeWalletConnect = params.includeWalletConnect ?? false;
4602
+ const includeInAppBrowser = params.includeInAppBrowser ?? false;
4603
+ const includeInstallation = params.includeInstallation ?? false;
4604
+ const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
4605
+ if (!includeWithWalletProvider && !includeWalletConnect && !includeInAppBrowser && !includeInstallation) return [];
4606
+ const walletBook = includeWalletConnect || includeInAppBrowser || includeInstallation ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
4607
+ const allConnectionOptions = [];
4608
+ if (includeWithWalletProvider) {
4609
+ const entries = getWalletProviderRegistry(client).listProviderEntries();
4610
+ allConnectionOptions.push(...buildWithWalletProviderOptions({
4611
+ entries,
4612
+ walletBook
4613
+ }, client));
4614
+ }
4615
+ if (includeWalletConnect) allConnectionOptions.push(...buildWalletConnectOptions({ walletBook }));
4616
+ if (includeInAppBrowser) allConnectionOptions.push(...buildInAppBrowserOptions({ walletBook }));
4617
+ const installationUrlsByKey = includeInstallation ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
4618
+ const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
4619
+ const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
4620
+ const walletOptions = [];
4621
+ for (const walletOptionKey of allWalletOptionKeys) {
4622
+ if (EXCLUDED_WALLET_OPTION_KEYS.has(walletOptionKey)) continue;
4623
+ const groupedEntry = grouped.get(walletOptionKey);
4624
+ const connectionOptions = groupedEntry ? sortConnectionOptions({ options: groupedEntry.connectionOptions }) : [];
4625
+ walletOptions.push(buildWalletOption({
4626
+ connectionOptions,
4627
+ displayOverride: groupedEntry?.displayOverride,
4628
+ installationUrls: installationUrlsByKey.get(walletOptionKey),
4629
+ walletBook,
4630
+ walletOptionKey
4631
+ }));
4632
+ }
4633
+ return sortWalletOptions({
4634
+ ordering: walletOptionOrdering,
4635
+ walletOptions
4636
+ });
4637
+ };
4638
+
3805
4639
  //#endregion
3806
4640
  //#region src/modules/user/updateUser/updateUser.ts
3807
4641
  /**
@@ -6716,5 +7550,5 @@ const parseUserAgent = ({ userAgent }) => {
6716
7550
  assertPackageVersion(name, version);
6717
7551
 
6718
7552
  //#endregion
6719
- export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, matchWalletProvidersToCatalogGroup, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, 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 };
7553
+ export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, matchWalletProvidersToCatalogGroup, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, 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 };
6720
7554
  //# sourceMappingURL=index.esm.js.map