@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
@@ -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-BYnLW_9s.native.esm.js";
2
- import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as createStorage, D as CannotTrackError, F as getBuffer, G as subscribeWithSelector, H as createLocalStorageAdapter, I as __logoutWithReason_wrapped, K as isEqualShallow, L as generateSessionKeys, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as fetchProjectSettings, S as createKeychainService, T as createCrossTabBroadcast, U as isSignedIn, W as retryOnFail, _ as MethodNotImplementedError, a as updateWalletProviderKeysForVerifiedCredentials, b as getKeychainIndexedDBName, c as createSignInMessageStatement, d as createVisit, f as hasExtension, g as getAppMetadata, h as isCaptchaRequired, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as formatSignInMessage, m as consumeCaptchaToken, o as verifyMessageSignatureOwnership, p as __setCaptchaToken_wrapped, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as WalletAlreadyLinkedToAnotherUserError, w as createLogger, x as createRealtimeService, y as NoNetworkProvidersError, z as createStorageKeySchema } from "./getNetworkProviderFromNetworkId-a0atbFHU.native.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-CEvtJ3xW.native.esm.js";
4
- import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-33QOxTKa.native.esm.js";
5
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BfabCDxI.native.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-9kQBK3sP.native.esm.js";
2
+ import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as createStorage, D as CannotTrackError, F as getBuffer, G as subscribeWithSelector, H as createLocalStorageAdapter, I as __logoutWithReason_wrapped, K as isEqualShallow, L as generateSessionKeys, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as fetchProjectSettings, S as createKeychainService, T as createCrossTabBroadcast, U as isSignedIn, W as retryOnFail, _ as MethodNotImplementedError, a as updateWalletProviderKeysForVerifiedCredentials, b as getKeychainIndexedDBName, c as createSignInMessageStatement, d as createVisit, f as hasExtension, g as getAppMetadata, h as isCaptchaRequired, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as formatSignInMessage, m as consumeCaptchaToken, o as verifyMessageSignatureOwnership, p as __setCaptchaToken_wrapped, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as WalletAlreadyLinkedToAnotherUserError, w as createLogger, x as createRealtimeService, y as NoNetworkProvidersError, z as createStorageKeySchema } from "./getNetworkProviderFromNetworkId-COptFPwJ.native.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-DKJcLLHq.native.esm.js";
4
+ import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BTMvHTA8.native.esm.js";
5
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DSX-TV2z.native.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";
@@ -2377,10 +2377,10 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
2377
2377
  * @returns A promise that resolves to an array of token balances.
2378
2378
  * @not-instrumented
2379
2379
  */
2380
- const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
2380
+ const getBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
2381
2381
  const core = getCore(client);
2382
2382
  const apiClient = createApiClient({}, client);
2383
- if (!networkId) {
2383
+ if (!networkId && !networkIds) {
2384
2384
  const activeNetworkId = await getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
2385
2385
  networkId = Number(activeNetworkId.networkId);
2386
2386
  }
@@ -2393,6 +2393,7 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
2393
2393
  includeNative,
2394
2394
  includePrices,
2395
2395
  networkId,
2396
+ networkIds,
2396
2397
  whitelistedContracts
2397
2398
  });
2398
2399
  };
@@ -3462,10 +3463,12 @@ const fetchLegacyWalletBook = async (client) => {
3462
3463
  };
3463
3464
 
3464
3465
  //#endregion
3465
- //#region src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.ts
3466
+ //#region src/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.ts
3466
3467
  /**
3467
- * Embedded wallet keys that should be filtered out from the WalletConnect catalog.
3468
- * These wallets are not meant to be displayed in wallet selection lists.
3468
+ * Embedded wallet keys that should be filtered out from any external-wallet
3469
+ * catalogue. These wallets are not products the user "connects" to from the
3470
+ * wallet selection list — they are embedded sign-in methods that live behind
3471
+ * different SDK entry points.
3469
3472
  * @not-instrumented
3470
3473
  */
3471
3474
  const EMBEDDED_WALLET_KEYS = [
@@ -3481,19 +3484,48 @@ const EMBEDDED_WALLET_KEYS = [
3481
3484
  "mpcwallet"
3482
3485
  ];
3483
3486
  /**
3484
- * Checks if a wallet should be filtered out from the WalletConnect catalog.
3487
+ * Generic "is this wallet eligible for an external-wallet catalogue" check.
3488
+ * Filters out:
3489
+ *
3490
+ * 1. Embedded sign-in methods (see {@link EMBEDDED_WALLET_KEYS}).
3491
+ * 2. Wallets that only ship a browser-extension injection (`injectedConfig`)
3492
+ * with no mobile or desktop links — these have no surface a customer
3493
+ * catalogue UI can drive to.
3494
+ *
3495
+ * Channel-specific eligibility (WalletConnect support, in-app browser URL,
3496
+ * installation links, …) is the caller's responsibility — wrap this helper
3497
+ * with an additional check, e.g.
3498
+ * {@link shouldFilterWalletForWalletConnect}.
3485
3499
  *
3486
3500
  * @returns True if the wallet should be filtered out, false otherwise.
3487
3501
  * @not-instrumented
3488
3502
  */
3489
3503
  const shouldFilterWallet = ({ wallet, walletKey }) => {
3490
3504
  if (EMBEDDED_WALLET_KEYS.includes(walletKey)) return true;
3491
- if (!wallet.walletConnect || !wallet.walletConnect.sdks.includes("sign_v2")) return true;
3492
3505
  const hasInjectedConfig = wallet.injectedConfig && wallet.injectedConfig.length > 0;
3493
3506
  const hasMobileLinks = Boolean(wallet.mobile?.androidId || wallet.mobile?.iosId || wallet.mobile?.native || wallet.mobile?.universal);
3494
3507
  const hasDesktopLinks = Boolean(wallet.desktop?.chromeId || wallet.desktop?.edgeId || wallet.desktop?.firefoxId || wallet.desktop?.operaId || wallet.desktop?.safariId || wallet.desktop?.universal);
3495
- if (hasInjectedConfig && !hasMobileLinks && !hasDesktopLinks) return true;
3496
- return false;
3508
+ return Boolean(hasInjectedConfig && !hasMobileLinks && !hasDesktopLinks);
3509
+ };
3510
+
3511
+ //#endregion
3512
+ //#region src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.ts
3513
+ /**
3514
+ * WalletConnect-specific filter. Applies the generic
3515
+ * {@link shouldFilterWallet} eligibility rules and additionally drops
3516
+ * wallets that do not advertise WalletConnect `sign_v2` support — the
3517
+ * protocol version Dynamic pairs against.
3518
+ *
3519
+ * @returns True if the wallet should be excluded from the WalletConnect
3520
+ * catalog, false otherwise.
3521
+ * @not-instrumented
3522
+ */
3523
+ const shouldFilterWalletForWalletConnect = ({ wallet, walletKey }) => {
3524
+ if (shouldFilterWallet({
3525
+ wallet,
3526
+ walletKey
3527
+ })) return true;
3528
+ return !wallet.walletConnect?.sdks.includes("sign_v2");
3497
3529
  };
3498
3530
 
3499
3531
  //#endregion
@@ -3701,7 +3733,7 @@ const transformWalletBook = ({ walletBook }) => {
3701
3733
  for (const [groupKey, group] of Object.entries(walletBook.groups)) groups[groupKey] = transformGroup({ group });
3702
3734
  const wallets = {};
3703
3735
  for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
3704
- if (shouldFilterWallet({
3736
+ if (shouldFilterWalletForWalletConnect({
3705
3737
  wallet,
3706
3738
  walletKey
3707
3739
  })) continue;
@@ -3735,7 +3767,7 @@ const getWalletConnectCatalog = async (client = getDefaultClient()) => {
3735
3767
 
3736
3768
  //#endregion
3737
3769
  //#region src/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.ts
3738
- const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
3770
+ const normalize$1 = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
3739
3771
  /**
3740
3772
  * Returns the wallet providers that belong to the same wallet group as the
3741
3773
  * given WalletConnect catalog entry. Useful for de-duplicating "installed"
@@ -3754,10 +3786,10 @@ const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wa
3754
3786
  * @not-instrumented
3755
3787
  */
3756
3788
  const matchWalletProvidersToCatalogGroup = ({ catalogGroupKey, catalogGroupName, walletProviders }) => {
3757
- const targets = new Set([normalize(catalogGroupKey)]);
3758
- if (catalogGroupName) targets.add(normalize(catalogGroupName));
3789
+ const targets = new Set([normalize$1(catalogGroupKey)]);
3790
+ if (catalogGroupName) targets.add(normalize$1(catalogGroupName));
3759
3791
  return walletProviders.filter((provider) => {
3760
- return [normalize(provider.groupKey), normalize(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
3792
+ return [normalize$1(provider.groupKey), normalize$1(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
3761
3793
  });
3762
3794
  };
3763
3795
 
@@ -3891,6 +3923,808 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
3891
3923
  }
3892
3924
  };
3893
3925
 
3926
+ //#endregion
3927
+ //#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
3928
+ /**
3929
+ * Resolves which wallet option (group) a wallet book entry belongs to. Used
3930
+ * by the catalogue's wallet-book-driven transformers (`walletConnect`,
3931
+ * `inAppBrowser`, `installation`) to bucket their emitted options.
3932
+ *
3933
+ * Wallet book entries inconsistently use `group` / `chainGroup` /
3934
+ * `walletGroup` for the same idea. The wallet key itself acts as the wallet
3935
+ * option key when no group field is set.
3936
+ *
3937
+ * @param params.wallet - The wallet entry.
3938
+ * @param params.walletKey - The wallet's key in `walletBook.wallets`.
3939
+ * @returns The wallet option key.
3940
+ * @not-instrumented
3941
+ */
3942
+ const resolveWalletBookWalletOptionKey = ({ wallet, walletKey }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? walletKey;
3943
+
3944
+ //#endregion
3945
+ //#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts
3946
+ /**
3947
+ * Returns the wallet's in-app browser URL template, preferring the v2
3948
+ * field. `inAppBrowser` is deprecated but some wallet book entries
3949
+ * still carry only the v1 value, so it acts as a fallback. Trailing
3950
+ * `?? undefined` collapses the schema's `string | null` typing down to
3951
+ * the `string | undefined` return contract.
3952
+ *
3953
+ * @param params.wallet - The wallet book wallet entry.
3954
+ * @returns The in-app browser URL, or `undefined` if neither field is set.
3955
+ * @not-instrumented
3956
+ */
3957
+ const getInAppBrowserUrl = ({ wallet }) => wallet.mobile?.inAppBrowserV2 ?? wallet.mobile?.inAppBrowser ?? void 0;
3958
+
3959
+ //#endregion
3960
+ //#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts
3961
+ /**
3962
+ * Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
3963
+ * qualifies when it exposes a mobile in-app-browser URL — typically a
3964
+ * `cb_url={{encodedDappURI}}`-style template the customer fills in with the
3965
+ * current page URL before opening.
3966
+ *
3967
+ * Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
3968
+ * and injected-only wallets are dropped — so the catalogue's notion of
3969
+ * "external wallet" stays consistent across option types.
3970
+ *
3971
+ * @param params.walletBook - The fetched wallet book.
3972
+ * @returns Tagged `inAppBrowser` options paired with their wallet option keys.
3973
+ * @not-instrumented
3974
+ */
3975
+ const buildInAppBrowserOptions = ({ walletBook }) => {
3976
+ const result = [];
3977
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
3978
+ if (shouldFilterWallet({
3979
+ wallet,
3980
+ walletKey
3981
+ })) continue;
3982
+ const url = getInAppBrowserUrl({ wallet });
3983
+ if (!url) continue;
3984
+ result.push({
3985
+ option: {
3986
+ chain: getChainFromWalletSchema({
3987
+ wallet,
3988
+ walletKey
3989
+ }),
3990
+ type: "inAppBrowser",
3991
+ url
3992
+ },
3993
+ walletOptionKey: resolveWalletBookWalletOptionKey({
3994
+ wallet,
3995
+ walletKey
3996
+ })
3997
+ });
3998
+ }
3999
+ return result;
4000
+ };
4001
+
4002
+ //#endregion
4003
+ //#region src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts
4004
+ const PLAY_STORE_URL_TEMPLATE = "https://play.google.com/store/apps/details?id=";
4005
+ const APP_STORE_URL_TEMPLATE = "https://apps.apple.com/app/";
4006
+ const CHROME_WEB_STORE_URL_TEMPLATE = "https://chrome.google.com/webstore/detail/";
4007
+ const FIREFOX_ADDONS_URL_TEMPLATE = "https://addons.mozilla.org/firefox/addon/";
4008
+ const EDGE_ADDONS_URL_TEMPLATE = "https://microsoftedge.microsoft.com/addons/detail/";
4009
+ /**
4010
+ * Builds the install/download URL bag for a wallet book entry. Returns the
4011
+ * concrete URLs assembled from each store's ID field — Play Store, App
4012
+ * Store, Chrome Web Store, Firefox Add-ons, Edge Add-ons — plus the wallet's
4013
+ * own `desktop.universal` / `desktop.native` URLs when set.
4014
+ *
4015
+ * Fields the wallet book does not carry are left undefined; callers should
4016
+ * skip emitting an installation option for a wallet whose URL bag is empty.
4017
+ *
4018
+ * @param params.wallet - The wallet book entry.
4019
+ * @returns The URL bag, omitting fields the wallet does not provide.
4020
+ * @not-instrumented
4021
+ */
4022
+ const buildInstallationUrls = ({ wallet }) => {
4023
+ const androidId = wallet.mobile?.androidId;
4024
+ const iosId = wallet.mobile?.iosId;
4025
+ const chromeId = wallet.desktop?.chromeId;
4026
+ const firefoxId = wallet.desktop?.firefoxId;
4027
+ const edgeId = wallet.desktop?.edgeId;
4028
+ const native = wallet.desktop?.universal ?? wallet.desktop?.native;
4029
+ return {
4030
+ android: androidId ? `${PLAY_STORE_URL_TEMPLATE}${androidId}` : void 0,
4031
+ chrome: chromeId ? `${CHROME_WEB_STORE_URL_TEMPLATE}${chromeId}` : void 0,
4032
+ edge: edgeId ? `${EDGE_ADDONS_URL_TEMPLATE}${edgeId}` : void 0,
4033
+ firefox: firefoxId ? `${FIREFOX_ADDONS_URL_TEMPLATE}${firefoxId}` : void 0,
4034
+ ios: iosId ? `${APP_STORE_URL_TEMPLATE}${iosId}` : void 0,
4035
+ native: native || void 0
4036
+ };
4037
+ };
4038
+
4039
+ //#endregion
4040
+ //#region src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts
4041
+ /**
4042
+ * `buildInstallationUrls` always returns an object, but it can be fully
4043
+ * `undefined`-valued when the wallet book entry has no installable surface.
4044
+ * Skip those wallets — emitting an empty URL bag helps nobody.
4045
+ */
4046
+ const hasAnyInstallationUrl = ({ urls }) => Object.values(urls).some(Boolean);
4047
+ /**
4048
+ * Collects install / download URLs for every wallet book entry that has
4049
+ * at least one installable surface, keyed by the wallet option key the
4050
+ * wallet groups under. The catalogue assembly step merges this map into
4051
+ * the per-key wallet option shell so `WalletOption.installationUrls` is
4052
+ * populated alongside (or instead of) `connectionOptions`.
4053
+ *
4054
+ * First-seen URLs win when multiple wallet book entries resolve to the
4055
+ * same wallet option key — wallet book authors put the most accurate
4056
+ * install links on the canonical entry, so the first-seen one is the
4057
+ * right pick.
4058
+ *
4059
+ * Reuses the generic `shouldFilterWallet` rules so embedded wallets do
4060
+ * not appear here either — they're not user-installable products.
4061
+ *
4062
+ * @param params.walletBook - The fetched wallet book.
4063
+ * @returns A map from wallet option key to its install URL bag.
4064
+ * @not-instrumented
4065
+ */
4066
+ const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
4067
+ const map = /* @__PURE__ */ new Map();
4068
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
4069
+ if (shouldFilterWallet({
4070
+ wallet,
4071
+ walletKey
4072
+ })) continue;
4073
+ const urls = buildInstallationUrls({ wallet });
4074
+ if (!hasAnyInstallationUrl({ urls })) continue;
4075
+ const walletOptionKey = resolveWalletBookWalletOptionKey({
4076
+ wallet,
4077
+ walletKey
4078
+ });
4079
+ if (!map.has(walletOptionKey)) map.set(walletOptionKey, urls);
4080
+ }
4081
+ return map;
4082
+ };
4083
+
4084
+ //#endregion
4085
+ //#region src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts
4086
+ /**
4087
+ * A wallet only deserves a `walletConnect` catalogue option if it has at
4088
+ * least one mobile deeplink — that's the value-add the option provides over
4089
+ * the bare WC pairing URI. Wallets that exist in the wallet book but don't
4090
+ * expose a deeplink (rare, but present) are silently skipped.
4091
+ */
4092
+ const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
4093
+ /**
4094
+ * Builds the `walletConnect` catalogue options from a fetched wallet book.
4095
+ * Applies the WalletConnect-specific eligibility filter
4096
+ * (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
4097
+ * without `sign_v2` support are excluded — same surface as
4098
+ * `getWalletConnectCatalog`.
4099
+ *
4100
+ * Each emitted option carries the wallet's mobile deeplinks. Customers
4101
+ * combine these with their chain's `connectWithWalletConnect<Chain>` URI via
4102
+ * `appendWalletConnectUriToDeepLink` to open the wallet's app.
4103
+ *
4104
+ * @param params.walletBook - The fetched wallet book.
4105
+ * @returns Tagged `walletConnect` options paired with their wallet option keys.
4106
+ * @not-instrumented
4107
+ */
4108
+ const buildWalletConnectOptions = ({ walletBook }) => {
4109
+ const result = [];
4110
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
4111
+ if (shouldFilterWalletForWalletConnect({
4112
+ wallet,
4113
+ walletKey
4114
+ })) continue;
4115
+ if (!hasUsableDeeplink({ wallet })) continue;
4116
+ const walletOptionKey = resolveWalletBookWalletOptionKey({
4117
+ wallet,
4118
+ walletKey
4119
+ });
4120
+ const chain = getChainFromWalletSchema({
4121
+ wallet,
4122
+ walletKey
4123
+ });
4124
+ result.push({
4125
+ option: {
4126
+ chain,
4127
+ deeplinks: {
4128
+ native: wallet.mobile?.native,
4129
+ universal: wallet.mobile?.universal
4130
+ },
4131
+ type: "walletConnect"
4132
+ },
4133
+ walletOptionKey
4134
+ });
4135
+ }
4136
+ return result;
4137
+ };
4138
+
4139
+ //#endregion
4140
+ //#region src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts
4141
+ /**
4142
+ * Assembles a `WalletOption` for a resolved wallet option key, populated
4143
+ * with the connection options the transformers produced for it plus an
4144
+ * optional install / download URL bag.
4145
+ *
4146
+ * Display merge rules (provider self-announced metadata wins where set):
4147
+ *
4148
+ * - `name`: `displayOverride.name` ?? wallet book group name ?? bare key.
4149
+ * - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL ?? `''`.
4150
+ * - `primaryColor`: wallet book group brand color only (providers do not
4151
+ * ship a primary color in their announcement metadata).
4152
+ * - `installationUrls`: copied through if present.
4153
+ *
4154
+ * Why provider precedence: a registered wallet provider knows its own
4155
+ * brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
4156
+ * wallet authoring its own identity). The wallet book fills in fields the
4157
+ * announcement does not carry — currently only `primaryColor`.
4158
+ *
4159
+ * @param params.connectionOptions - The connections to attach to this wallet option.
4160
+ * @param [params.displayOverride] - Provider-announced display info that overrides the wallet book's name and iconUrl.
4161
+ * @param [params.installationUrls] - Install/download URL bag for this wallet.
4162
+ * @param params.walletBook - The fetched wallet book.
4163
+ * @param params.walletOptionKey - The wallet option key.
4164
+ * @returns The constructed wallet option.
4165
+ * @not-instrumented
4166
+ */
4167
+ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrls, walletBook, walletOptionKey }) => {
4168
+ const group = walletBook.groups[walletOptionKey];
4169
+ const groupSpriteId = group?.brand?.spriteId;
4170
+ const groupIconUrl = groupSpriteId ? getSpriteUrl({ spriteId: groupSpriteId }) : void 0;
4171
+ return {
4172
+ connectionOptions,
4173
+ iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
4174
+ installationUrls,
4175
+ key: walletOptionKey,
4176
+ name: displayOverride?.name ?? group?.name ?? walletOptionKey,
4177
+ primaryColor: group?.brand?.primaryColor
4178
+ };
4179
+ };
4180
+
4181
+ //#endregion
4182
+ //#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
4183
+ /**
4184
+ * Maps a registered wallet provider's registration priority to the
4185
+ * `WithWalletProviderSource` value that should appear on its catalogue option.
4186
+ *
4187
+ * Priority mapping (set by each chain extension when it calls
4188
+ * `registry.register`):
4189
+ *
4190
+ * - `WALLET_SDK` → `'sdk'` — branded SDKs wrapped by chain extensions
4191
+ * (Base Account via `@base-org/account`, MetaMask Connect, …).
4192
+ * - `WALLET_SELF_ANNOUNCEMENT_STANDARD` → `'selfAnnounced'` — in-page
4193
+ * self-announcement standards (EIP-6963 on EVM, Wallet Standard on
4194
+ * Solana / Sui / …).
4195
+ * - `WINDOW_INJECT` → `'windowInjected'` — legacy `window.*` injection.
4196
+ *
4197
+ * Returns `undefined` for providers whose registration priority does not
4198
+ * correspond to a connectable external-wallet source — callers filter these
4199
+ * out before emitting catalogue options.
4200
+ *
4201
+ * @param params.entry - The registry entry to classify.
4202
+ * @returns The matching source, or `undefined` if this entry should not
4203
+ * surface a `withWalletProvider` option.
4204
+ * @not-instrumented
4205
+ */
4206
+ const classifyWithWalletProviderSource = ({ entry }) => {
4207
+ const { priority } = entry;
4208
+ if (priority === WalletProviderPriority.WALLET_SDK) return "sdk";
4209
+ if (priority === WalletProviderPriority.WALLET_SELF_ANNOUNCEMENT_STANDARD) return "selfAnnounced";
4210
+ if (priority === WalletProviderPriority.WINDOW_INJECT) return "windowInjected";
4211
+ };
4212
+
4213
+ //#endregion
4214
+ //#region src/modules/wallets/utils/stripChainSuffix/stripChainSuffix.ts
4215
+ /**
4216
+ * Removes the lowercased chain suffix that `normalizeWalletNameWithChain`
4217
+ * appends. Used by `findWalletOptionKeyForProviderKey` to recover the wallet
4218
+ * book wallet key candidate from a `walletProviderKey`. If the suffix is
4219
+ * not present (some chain extensions already bake the chain into the
4220
+ * display name), the input is returned unchanged.
4221
+ *
4222
+ * @param params.chain - The chain whose suffix should be stripped.
4223
+ * @param params.normalizedName - The normalized wallet-name-with-chain string.
4224
+ * @returns The name with the chain suffix removed, or the input unchanged.
4225
+ * @not-instrumented
4226
+ */
4227
+ const stripChainSuffix = ({ chain, normalizedName }) => {
4228
+ const suffix = chain.toLowerCase();
4229
+ if (normalizedName.endsWith(suffix)) return normalizedName.slice(0, -suffix.length);
4230
+ return normalizedName;
4231
+ };
4232
+
4233
+ //#endregion
4234
+ //#region src/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.ts
4235
+ /**
4236
+ * Normalizes a wallet's self-announced `displayName` into a stable wallet
4237
+ * option key. Used by `findWalletOptionKeyForProviderKey` as the off-book
4238
+ * fallback — registered providers whose `walletProviderKey` does not
4239
+ * resolve to any wallet book entry still surface in the catalogue under a
4240
+ * key derived from the name they ship in their metadata.
4241
+ *
4242
+ * The normalization (lowercase + whitespace-strip) intentionally matches
4243
+ * how the legacy wallet book composes its `wallets.<key>` keys, so a
4244
+ * self-described provider's option will merge cleanly with its book entry
4245
+ * if one ever lands later.
4246
+ *
4247
+ * Multi-chain registrations of the same wallet (e.g. Phantom announced via
4248
+ * EIP-6963 on EVM and via Wallet Standard on Solana) collapse onto the
4249
+ * same wallet option through this normalization, since each registration
4250
+ * announces the same `displayName`.
4251
+ *
4252
+ * @param displayName - The provider's `metadata.displayName`.
4253
+ * @returns The normalized wallet option key (lowercased, no whitespace).
4254
+ * @not-instrumented
4255
+ */
4256
+ const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().replace(/\s+/g, "");
4257
+
4258
+ //#endregion
4259
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
4260
+ const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
4261
+ /**
4262
+ * Looks for a wallet book entry whose `name` or `shortName` normalizes to
4263
+ * the same string as `candidate`. Used as a fallback by
4264
+ * `findWalletOptionKeyForProviderKey` for providers whose
4265
+ * `walletProviderKey` strips down to a value that does not match any
4266
+ * `walletBook.wallets` key directly (e.g. an extension whose display name
4267
+ * happens to match the wallet's `shortName` instead of its book key).
4268
+ *
4269
+ * @param params.candidate - The lowercased, chain-suffix-stripped candidate.
4270
+ * @param params.walletBook - The fetched wallet book.
4271
+ * @returns The matching wallet book wallet key, or `undefined`.
4272
+ * @not-instrumented
4273
+ */
4274
+ const findByNameMatch = ({ candidate, walletBook }) => {
4275
+ for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) if (normalize(wallet.name) === candidate || normalize(wallet.shortName) === candidate) return walletKey;
4276
+ };
4277
+
4278
+ //#endregion
4279
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.ts
4280
+ /**
4281
+ * Picks the wallet option (group) key for a wallet book wallet. The wallet
4282
+ * book carries the group association under a few different field names
4283
+ * (`group`, `chainGroup`, `walletGroup`) depending on the wallet's
4284
+ * provenance — this helper centralises the lookup. When none of those
4285
+ * fields are set, the wallet key itself acts as its own wallet option key.
4286
+ *
4287
+ * @param params.fallback - Wallet key to return if no group field is set.
4288
+ * @param params.wallet - The wallet book wallet entry.
4289
+ * @returns The resolved wallet option key.
4290
+ * @not-instrumented
4291
+ */
4292
+ const resolveWalletOptionKey = ({ fallback, wallet }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? fallback;
4293
+
4294
+ //#endregion
4295
+ //#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.ts
4296
+ /**
4297
+ * Resolves a registered wallet provider to the wallet option key it should
4298
+ * be bucketed under. Always returns a key — providers with no wallet book
4299
+ * match fall back to their self-announced `metadata.displayName`, so the
4300
+ * catalogue surfaces them as self-described tiles instead of silently
4301
+ * dropping them.
4302
+ *
4303
+ * Resolution order (each step short-circuits on first hit):
4304
+ *
4305
+ * 1. **Direct wallet book lookup with chain suffix** — try
4306
+ * `walletBook.wallets[normalizedWalletNameWithChain]` as-is. Wallet
4307
+ * book entries are inconsistent about whether they keep the chain
4308
+ * suffix (e.g. `metamaskevm`) or strip it (e.g. `metamask`), so try
4309
+ * the suffixed form first.
4310
+ * 2. **Direct wallet book lookup without chain suffix** — strip the
4311
+ * suffix and retry.
4312
+ * 3. **Name match heuristic with chain suffix** — scan
4313
+ * `walletBook.wallets` for an entry whose normalized `name` or
4314
+ * `shortName` equals the suffixed candidate.
4315
+ * 4. **Name match heuristic without chain suffix** — same scan on the
4316
+ * stripped candidate.
4317
+ * 5. **Display-name fallback** — derive a stable key from
4318
+ * `walletProvider.metadata.displayName` via
4319
+ * {@link normalizeWalletDisplayName}. Multi-chain registrations of the
4320
+ * same self-described wallet (e.g. Phantom on EVM and Solana) collapse
4321
+ * onto the same tile because each announces the same display name.
4322
+ *
4323
+ * @param params.chain - The provider's chain (used to strip the suffix).
4324
+ * @param params.walletBook - The fetched wallet book.
4325
+ * @param params.walletProvider - The registered wallet provider.
4326
+ * @returns The wallet option key for this provider.
4327
+ * @not-instrumented
4328
+ */
4329
+ const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }) => {
4330
+ const { normalizedWalletNameWithChain } = splitWalletProviderKey(walletProvider.key);
4331
+ const candidates = [normalizedWalletNameWithChain, stripChainSuffix({
4332
+ chain,
4333
+ normalizedName: normalizedWalletNameWithChain
4334
+ })];
4335
+ for (const candidate of candidates) {
4336
+ const directHit = walletBook.wallets[candidate];
4337
+ if (directHit) return resolveWalletOptionKey({
4338
+ fallback: candidate,
4339
+ wallet: directHit
4340
+ });
4341
+ }
4342
+ for (const candidate of candidates) {
4343
+ const nameMatchKey = findByNameMatch({
4344
+ candidate,
4345
+ walletBook
4346
+ });
4347
+ if (nameMatchKey) return resolveWalletOptionKey({
4348
+ fallback: nameMatchKey,
4349
+ wallet: walletBook.wallets[nameMatchKey]
4350
+ });
4351
+ }
4352
+ return normalizeWalletDisplayName(walletProvider.metadata.displayName);
4353
+ };
4354
+
4355
+ //#endregion
4356
+ //#region src/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.ts
4357
+ /**
4358
+ * Converts each registered wallet provider entry into a
4359
+ * `WithWalletProviderConnectionOption` paired with its target wallet
4360
+ * option key and the provider's display override. Every classifiable
4361
+ * entry surfaces in the catalogue; the outer transformer uses the
4362
+ * carried `displayOverride` to override any wallet book branding for
4363
+ * that key (provider self-announcement wins over book).
4364
+ *
4365
+ * Entries whose registration priority is not recognised by
4366
+ * `classifyWithWalletProviderSource` are dropped from the catalogue and
4367
+ * an error is logged so Datadog surfaces the unknown registration path —
4368
+ * in production this should never happen, every chain extension is
4369
+ * expected to register with one of the documented priorities.
4370
+ *
4371
+ * @param params.entries - Snapshot of the registry's entries.
4372
+ * @param params.walletBook - The fetched wallet book.
4373
+ * @param client - The Dynamic client (used for logging unclassifiable entries).
4374
+ * @returns An array of tagged options, in input order.
4375
+ * @not-instrumented
4376
+ */
4377
+ const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
4378
+ const result = [];
4379
+ for (const entry of entries) {
4380
+ const source = classifyWithWalletProviderSource({ entry });
4381
+ if (!source) {
4382
+ getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
4383
+ chain: entry.walletProvider.chain,
4384
+ displayName: entry.walletProvider.metadata.displayName,
4385
+ priority: entry.priority,
4386
+ walletProviderKey: entry.walletProvider.key,
4387
+ walletProviderType: entry.walletProvider.walletProviderType
4388
+ });
4389
+ continue;
4390
+ }
4391
+ const walletOptionKey = findWalletOptionKeyForProviderKey({
4392
+ chain: entry.walletProvider.chain,
4393
+ walletBook,
4394
+ walletProvider: entry.walletProvider
4395
+ });
4396
+ result.push({
4397
+ displayOverride: {
4398
+ iconUrl: entry.walletProvider.metadata.icon,
4399
+ name: entry.walletProvider.metadata.displayName
4400
+ },
4401
+ option: {
4402
+ chain: entry.walletProvider.chain,
4403
+ source,
4404
+ type: "withWalletProvider",
4405
+ walletProviderKey: entry.walletProvider.key
4406
+ },
4407
+ walletOptionKey
4408
+ });
4409
+ }
4410
+ return result;
4411
+ };
4412
+
4413
+ //#endregion
4414
+ //#region src/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.ts
4415
+ /**
4416
+ * Wallet option keys `getWalletOptionsCatalogue` drops before returning.
4417
+ * Curated, product-level suppression.
4418
+ *
4419
+ * Example: Base Account SDK is the recommended entry point for
4420
+ * Coinbase-managed users, so the legacy Coinbase Wallet entries are
4421
+ * suppressed in favor of the SDK-backed `baseaccount` tile. Both the
4422
+ * wallet book group key (`coinbase`) and the normalized display-name
4423
+ * key (`coinbasewallet`) are listed so suppression holds regardless of
4424
+ * how the resolver lands on a key.
4425
+ *
4426
+ * Used in: `getWalletOptionsCatalogue`.
4427
+ */
4428
+ const EXCLUDED_WALLET_OPTION_KEYS = new Set(["coinbase", "coinbasewallet"]);
4429
+
4430
+ //#endregion
4431
+ //#region src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts
4432
+ /**
4433
+ * Buckets tagged connection options by their wallet option key. Preserves
4434
+ * first-seen order so that the caller's choice of
4435
+ * `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
4436
+ * order (wallet book order for walletConnect/inAppBrowser/installation,
4437
+ * registry order for withWalletProvider).
4438
+ *
4439
+ * Carries through the first-seen `displayOverride` per wallet option
4440
+ * key, so the shell builder can apply provider-announced metadata on
4441
+ * top of any wallet book entry.
4442
+ *
4443
+ * @param params.options - The tagged options to group.
4444
+ * @returns A map from wallet option key to its grouped option bucket,
4445
+ * iterable in first-seen order.
4446
+ * @not-instrumented
4447
+ */
4448
+ const groupOptionsByWalletOption = ({ options }) => {
4449
+ const map = /* @__PURE__ */ new Map();
4450
+ for (const { displayOverride, option, walletOptionKey } of options) {
4451
+ const existing = map.get(walletOptionKey);
4452
+ if (existing) {
4453
+ existing.connectionOptions.push(option);
4454
+ if (!existing.displayOverride && displayOverride) existing.displayOverride = displayOverride;
4455
+ } else map.set(walletOptionKey, {
4456
+ connectionOptions: [option],
4457
+ displayOverride
4458
+ });
4459
+ }
4460
+ return map;
4461
+ };
4462
+
4463
+ //#endregion
4464
+ //#region src/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.ts
4465
+ /**
4466
+ * Numeric priority for each `WalletConnectionOption` type. Lower values rank
4467
+ * first. Used to sort each wallet option's `connectionOptions` array so the
4468
+ * best connection path lands at index 0. Has no bearing on how the outer
4469
+ * wallet-option list is ordered — that's controlled by
4470
+ * `WalletOptionOrdering`.
4471
+ *
4472
+ * `withWalletProvider > walletConnect > inAppBrowser`
4473
+ */
4474
+ const CONNECTION_OPTION_PRIORITY = {
4475
+ inAppBrowser: 2,
4476
+ walletConnect: 1,
4477
+ withWalletProvider: 0
4478
+ };
4479
+ /**
4480
+ * Returns the numeric priority of a `WalletConnectionOption` for sorting.
4481
+ * Lower numbers rank first.
4482
+ *
4483
+ * @param params.option - The connection option to inspect.
4484
+ * @returns The numeric priority — lower is better.
4485
+ * @not-instrumented
4486
+ */
4487
+ const getConnectionOptionPriority = ({ option }) => CONNECTION_OPTION_PRIORITY[option.type];
4488
+
4489
+ //#endregion
4490
+ //#region src/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.ts
4491
+ /**
4492
+ * Sorts a wallet option's `connectionOptions` so the most preferred option lands at
4493
+ * index 0. Primary sort is by option-type priority
4494
+ * (`withWalletProvider` > `walletConnect` > `inAppBrowser`);
4495
+ * within a type, ties break alphabetically by `chain` for deterministic
4496
+ * output across calls.
4497
+ *
4498
+ * Returns a new array — the input is not mutated.
4499
+ *
4500
+ * @param params.options - The options to sort.
4501
+ * @returns A new array in priority order.
4502
+ * @not-instrumented
4503
+ */
4504
+ const sortConnectionOptions = ({ options }) => [...options].sort((a, b) => {
4505
+ const priorityDelta = getConnectionOptionPriority({ option: a }) - getConnectionOptionPriority({ option: b });
4506
+ if (priorityDelta !== 0) return priorityDelta;
4507
+ return a.chain.localeCompare(b.chain);
4508
+ });
4509
+
4510
+ //#endregion
4511
+ //#region src/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.ts
4512
+ /**
4513
+ * Hand-curated list of wallet book group keys that should surface at the top
4514
+ * of catalogue listings. Lower index = higher priority. Anything not in this
4515
+ * list falls through to the secondary sort (alphabetical by name).
4516
+ *
4517
+ * Used by `sortWalletOptions` (relevance mode) and by the react-demo's
4518
+ * WalletConnect picker. Keep both in sync when adding entries.
4519
+ */
4520
+ const PRIORITY_WALLET_KEYS = [
4521
+ "metamask",
4522
+ "coinbase",
4523
+ "baseaccount",
4524
+ "phantom",
4525
+ "magiceden",
4526
+ "trust",
4527
+ "okxwallet",
4528
+ "rainbow",
4529
+ "argentx",
4530
+ "backpack",
4531
+ "xverse",
4532
+ "onekey",
4533
+ "solflare",
4534
+ "braavos",
4535
+ "brave",
4536
+ "unisat",
4537
+ "bitgetwallet",
4538
+ "coin98"
4539
+ ];
4540
+
4541
+ //#endregion
4542
+ //#region src/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.ts
4543
+ /**
4544
+ * Returns the index of a wallet option in `PRIORITY_WALLET_KEYS`, or
4545
+ * `Number.POSITIVE_INFINITY` when the wallet is not in the hand-curated
4546
+ * priority list. Lower index = higher priority.
4547
+ *
4548
+ * @param params.walletOption - The wallet option to inspect.
4549
+ * @returns Numeric priority index — lower is better.
4550
+ * @not-instrumented
4551
+ */
4552
+ const getPriorityIndex = ({ walletOption }) => {
4553
+ const index = PRIORITY_WALLET_KEYS.indexOf(walletOption.key);
4554
+ return index === -1 ? Number.POSITIVE_INFINITY : index;
4555
+ };
4556
+
4557
+ //#endregion
4558
+ //#region src/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.ts
4559
+ /**
4560
+ * Compares two wallet options for relevance ordering: priority-list index
4561
+ * first, then alphabetical-by-name as the tie-break. Suitable for passing
4562
+ * straight to `Array.prototype.sort`.
4563
+ *
4564
+ * @param params.a - First wallet option.
4565
+ * @param params.b - Second wallet option.
4566
+ * @returns Negative when `a` ranks first, positive when `b` ranks first.
4567
+ * @not-instrumented
4568
+ */
4569
+ const compareByRelevance = ({ a, b }) => {
4570
+ const aIndex = getPriorityIndex({ walletOption: a });
4571
+ const bIndex = getPriorityIndex({ walletOption: b });
4572
+ if (aIndex !== bIndex) return aIndex - bIndex;
4573
+ return a.name.localeCompare(b.name, void 0, { sensitivity: "base" });
4574
+ };
4575
+
4576
+ //#endregion
4577
+ //#region src/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.ts
4578
+ /**
4579
+ * True when the wallet option has at least one connection — i.e. the user
4580
+ * can sign in right now. Install-only wallet options surface in the
4581
+ * catalogue too (they carry `installationUrls`) but have an empty
4582
+ * `connectionOptions` array; this predicate distinguishes them from
4583
+ * actually connectable wallets in the relevance sort.
4584
+ *
4585
+ * @param params.walletOption - The wallet option to inspect.
4586
+ * @returns True when `connectionOptions` is non-empty.
4587
+ * @not-instrumented
4588
+ */
4589
+ const hasAnyConnectionOption = ({ walletOption }) => walletOption.connectionOptions.length > 0;
4590
+
4591
+ //#endregion
4592
+ //#region src/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.ts
4593
+ /**
4594
+ * True when the wallet option has a `withWalletProvider` connection — i.e.
4595
+ * the user already has the wallet available in the page (browser extension,
4596
+ * Wallet Standard announcement, window injection, or an SDK-backed provider
4597
+ * one of our chain extensions registered). `connectionOptions` is
4598
+ * pre-sorted, so a registered provider always sits at index 0 when present.
4599
+ *
4600
+ * @param params.walletOption - The wallet option to inspect.
4601
+ * @returns True when an installed provider is available.
4602
+ * @not-instrumented
4603
+ */
4604
+ const hasInstalledProvider = ({ walletOption }) => walletOption.connectionOptions[0]?.type === "withWalletProvider";
4605
+
4606
+ //#endregion
4607
+ //#region src/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.ts
4608
+ /**
4609
+ * Sorts the outer wallet-option list. This is the only ordering controlled
4610
+ * by the customer; the inner `connectionOptions` array of each wallet
4611
+ * option is ordered separately by `sortConnectionOptions` using a fixed
4612
+ * option-type priority.
4613
+ *
4614
+ * - `'relevance'` (default): bucket wallet options into three tiers, in
4615
+ * this order:
4616
+ * 1. **Installed provider** — user already has the wallet available
4617
+ * (`withWalletProvider` at index 0).
4618
+ * 2. **Connectable** — has at least one connection (`walletConnect`
4619
+ * or `inAppBrowser`) but no installed provider.
4620
+ * 3. **Install-only** — no connection at all; only `installationUrls`.
4621
+ * Within each tier, rank by the hand-curated {@link PRIORITY_WALLET_KEYS}
4622
+ * list (MetaMask, Coinbase, Phantom, …); unknown wallets fall through to
4623
+ * alphabetical-by-name order at the tail of their tier.
4624
+ * - `'alphabetical'`: case-insensitive sort by wallet option `name`,
4625
+ * without bucketing.
4626
+ *
4627
+ * Returns a new array — the input is not mutated.
4628
+ *
4629
+ * @param params.walletOptions - The wallet options to sort.
4630
+ * @param params.ordering - The requested ordering.
4631
+ * @returns A new array in the requested order.
4632
+ * @not-instrumented
4633
+ */
4634
+ const sortWalletOptions = ({ walletOptions, ordering }) => {
4635
+ if (ordering === "alphabetical") return [...walletOptions].sort((a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" }));
4636
+ const installed = [];
4637
+ const connectable = [];
4638
+ const installOnly = [];
4639
+ for (const walletOption of walletOptions) if (hasInstalledProvider({ walletOption })) installed.push(walletOption);
4640
+ else if (hasAnyConnectionOption({ walletOption })) connectable.push(walletOption);
4641
+ else installOnly.push(walletOption);
4642
+ installed.sort((a, b) => compareByRelevance({
4643
+ a,
4644
+ b
4645
+ }));
4646
+ connectable.sort((a, b) => compareByRelevance({
4647
+ a,
4648
+ b
4649
+ }));
4650
+ installOnly.sort((a, b) => compareByRelevance({
4651
+ a,
4652
+ b
4653
+ }));
4654
+ return [
4655
+ ...installed,
4656
+ ...connectable,
4657
+ ...installOnly
4658
+ ];
4659
+ };
4660
+
4661
+ //#endregion
4662
+ //#region src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts
4663
+ const EMPTY_WALLET_BOOK = {
4664
+ groups: {},
4665
+ wallets: {}
4666
+ };
4667
+ /**
4668
+ * Returns a catalogue of the external wallet options a user can sign in
4669
+ * with through this client. Each wallet option carries an ordered
4670
+ * `connectionOptions` array — `withWalletProvider` (direct), `walletConnect`
4671
+ * (deeplink/QR), or `inAppBrowser` (mobile webview). Wallet options without
4672
+ * any matching connections are omitted.
4673
+ *
4674
+ * `includeWithWalletProvider` defaults to `true`; all other inclusion flags
4675
+ * are opt-in. `walletOptionOrdering` defaults to `'relevance'` (Dynamic's
4676
+ * recommended order); pass `'alphabetical'` to sort by wallet option name
4677
+ * within each option-priority tier.
4678
+ *
4679
+ * The wallet book is fetched only when an enabled flag needs it
4680
+ * (`includeWalletConnect`, `includeInAppBrowser`). Calls that only need
4681
+ * `includeWithWalletProvider` skip the fetch entirely.
4682
+ *
4683
+ * @param [params] - Inclusion flags + ordering preference.
4684
+ * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
4685
+ * @returns A promise that resolves to the wallet options catalogue.
4686
+ * @not-instrumented
4687
+ */
4688
+ const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
4689
+ const includeWithWalletProvider = params.includeWithWalletProvider ?? true;
4690
+ const includeWalletConnect = params.includeWalletConnect ?? false;
4691
+ const includeInAppBrowser = params.includeInAppBrowser ?? false;
4692
+ const includeInstallation = params.includeInstallation ?? false;
4693
+ const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
4694
+ if (!includeWithWalletProvider && !includeWalletConnect && !includeInAppBrowser && !includeInstallation) return [];
4695
+ const walletBook = includeWalletConnect || includeInAppBrowser || includeInstallation ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
4696
+ const allConnectionOptions = [];
4697
+ if (includeWithWalletProvider) {
4698
+ const entries = getWalletProviderRegistry(client).listProviderEntries();
4699
+ allConnectionOptions.push(...buildWithWalletProviderOptions({
4700
+ entries,
4701
+ walletBook
4702
+ }, client));
4703
+ }
4704
+ if (includeWalletConnect) allConnectionOptions.push(...buildWalletConnectOptions({ walletBook }));
4705
+ if (includeInAppBrowser) allConnectionOptions.push(...buildInAppBrowserOptions({ walletBook }));
4706
+ const installationUrlsByKey = includeInstallation ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
4707
+ const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
4708
+ const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
4709
+ const walletOptions = [];
4710
+ for (const walletOptionKey of allWalletOptionKeys) {
4711
+ if (EXCLUDED_WALLET_OPTION_KEYS.has(walletOptionKey)) continue;
4712
+ const groupedEntry = grouped.get(walletOptionKey);
4713
+ const connectionOptions = groupedEntry ? sortConnectionOptions({ options: groupedEntry.connectionOptions }) : [];
4714
+ walletOptions.push(buildWalletOption({
4715
+ connectionOptions,
4716
+ displayOverride: groupedEntry?.displayOverride,
4717
+ installationUrls: installationUrlsByKey.get(walletOptionKey),
4718
+ walletBook,
4719
+ walletOptionKey
4720
+ }));
4721
+ }
4722
+ return sortWalletOptions({
4723
+ ordering: walletOptionOrdering,
4724
+ walletOptions
4725
+ });
4726
+ };
4727
+
3894
4728
  //#endregion
3895
4729
  //#region src/modules/user/updateUser/updateUser.ts
3896
4730
  /**
@@ -6805,5 +7639,5 @@ const parseUserAgent = ({ userAgent }) => {
6805
7639
  assertPackageVersion(name, version);
6806
7640
 
6807
7641
  //#endregion
6808
- 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 };
7642
+ 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 };
6809
7643
  //# sourceMappingURL=index.native.esm.js.map