@dynamic-labs-sdk/client 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{InvalidParamError-uluG140m.esm.js → InvalidParamError-BPMi0iWC.esm.js} +55 -6
- package/dist/InvalidParamError-BPMi0iWC.esm.js.map +1 -0
- package/dist/{InvalidParamError-BYnLW_9s.native.esm.js → InvalidParamError-CDmVW2DS.native.esm.js} +55 -6
- package/dist/InvalidParamError-CDmVW2DS.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-CEykJlaG.cjs → InvalidParamError-DEmLKJKZ.cjs} +61 -6
- package/dist/InvalidParamError-DEmLKJKZ.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-BNdbbGX7.cjs → NotWaasWalletAccountError-BZsBHRQe.cjs} +6 -4
- package/dist/NotWaasWalletAccountError-BZsBHRQe.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-DmlwWvy0.esm.js → NotWaasWalletAccountError-Chpne8_Q.native.esm.js} +6 -4
- package/dist/NotWaasWalletAccountError-Chpne8_Q.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-33QOxTKa.native.esm.js → NotWaasWalletAccountError-Cntietge.esm.js} +6 -4
- package/dist/NotWaasWalletAccountError-Cntietge.esm.js.map +1 -0
- package/dist/core.cjs +6 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -6
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +6 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +2 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +4 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CS1GXEp6.esm.js → getNetworkProviderFromNetworkId-CEeFL-gV.esm.js} +72 -16
- package/dist/getNetworkProviderFromNetworkId-CEeFL-gV.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js → getNetworkProviderFromNetworkId-JGrKwBj7.native.esm.js} +72 -16
- package/dist/getNetworkProviderFromNetworkId-JGrKwBj7.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-BOCwNNMm.cjs → getNetworkProviderFromNetworkId-szJOsbQN.cjs} +77 -15
- package/dist/getNetworkProviderFromNetworkId-szJOsbQN.cjs.map +1 -0
- package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js → getSignedSessionId-B5DikCap.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-zHtJOVpY.native.esm.js.map → getSignedSessionId-B5DikCap.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-D1Oh4604.esm.js → getSignedSessionId-BOx1nFt_.esm.js} +3 -3
- package/dist/{getSignedSessionId-D1Oh4604.esm.js.map → getSignedSessionId-BOx1nFt_.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-B42gT4xk.cjs → getSignedSessionId-BxOK-Tdo.cjs} +3 -3
- package/dist/{getSignedSessionId-B42gT4xk.cjs.map → getSignedSessionId-BxOK-Tdo.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs → getVerifiedCredentialForWalletAccount-B46O0B48.cjs} +4 -3
- package/dist/getVerifiedCredentialForWalletAccount-B46O0B48.cjs.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js → getVerifiedCredentialForWalletAccount-CyykSi-M.native.esm.js} +3 -2
- package/dist/getVerifiedCredentialForWalletAccount-CyykSi-M.native.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js → getVerifiedCredentialForWalletAccount-DzwIoeHm.esm.js} +3 -2
- package/dist/getVerifiedCredentialForWalletAccount-DzwIoeHm.esm.js.map +1 -0
- package/dist/index.cjs +1028 -85
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +1027 -86
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +1027 -86
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-CJvFP4oN.cjs → isMfaRequiredForAction-6N6JB7wa.cjs} +5 -3
- package/dist/isMfaRequiredForAction-6N6JB7wa.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-G7SXCZ5L.esm.js → isMfaRequiredForAction-D9p_du8C.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-D9p_du8C.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-BfabCDxI.native.esm.js → isMfaRequiredForAction-DUvZEpjA.native.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-DUvZEpjA.native.esm.js.map +1 -0
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +1 -0
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +2 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +1 -0
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +2 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
- package/dist/modules/balances/getBalances/getBalances.d.ts +22 -10
- package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts +2 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +6 -2
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts +22 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts.map +1 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts +3 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts.map +1 -0
- package/dist/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts +3 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts.map +1 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts +16 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/index.d.ts +2 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/{shouldFilterWallet → shouldFilterWalletForWalletConnect}/index.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts +13 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts +10 -0
- package/dist/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts +3 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/index.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts +34 -0
- package/dist/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.d.ts.map +1 -0
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts +2 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +2 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +2 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts +2 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts +22 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildInAppBrowserOptions/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts +21 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/buildUriDeeplinkOptions.d.ts +28 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/buildUriDeeplinkOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/resolveUriConnectionType.d.ts +17 -0
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/resolveUriConnectionType.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +39 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts +54 -0
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts +31 -0
- package/dist/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts +15 -0
- package/dist/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts +21 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts +44 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts +20 -0
- package/dist/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts +15 -0
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts +16 -0
- package/dist/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +14 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts +49 -0
- package/dist/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +18 -0
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts +23 -0
- package/dist/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +22 -0
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +20 -0
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +34 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +152 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -0
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +1 -1
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts +2 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts.map +1 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts +25 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts.map +1 -0
- package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts +20 -0
- package/dist/modules/wallets/utils/stripChainSuffix/stripChainSuffix.d.ts.map +1 -0
- package/dist/modules/wallets/walletProviderRegistry/createWalletProviderRegistry/createWalletProviderRegistry.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts +1 -1
- package/dist/modules/wallets/walletProviderRegistry/index.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts +19 -0
- package/dist/modules/wallets/walletProviderRegistry/walletProviderRegistry.types.d.ts.map +1 -1
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +23 -0
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -0
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/constants.d.ts +22 -0
- package/dist/services/instrumentation/constants.d.ts.map +1 -1
- package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts +29 -0
- package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts.map +1 -0
- package/dist/utils/appendConnectionUriToDeeplink/index.d.ts +2 -0
- package/dist/utils/appendConnectionUriToDeeplink/index.d.ts.map +1 -0
- package/dist/waas.cjs +6 -5
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +5 -4
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +5 -4
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +4 -4
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +3 -3
- package/dist/InvalidParamError-BYnLW_9s.native.esm.js.map +0 -1
- package/dist/InvalidParamError-CEykJlaG.cjs.map +0 -1
- package/dist/InvalidParamError-uluG140m.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-33QOxTKa.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-BNdbbGX7.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-DmlwWvy0.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-BOCwNNMm.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CS1GXEp6.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-a0atbFHU.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-B-IhZJuM.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-BkaECPL_.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CEvtJ3xW.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-BfabCDxI.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-CJvFP4oN.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-G7SXCZ5L.esm.js.map +0 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/index.d.ts +0 -2
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts +0 -21
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWallet/shouldFilterWallet.d.ts.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as
|
|
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,
|
|
4
|
-
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-
|
|
5
|
-
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
1
|
+
import { A as getUserAgent, B as getCore, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as NONCE_POOL_SIZE, H as version, I as getDefaultClient, L as setDefaultClient, M as randomString, O as scrubParameters, T as ValueMustBeDefinedError, V as name, _ 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 extractSessionId, k as DEFAULT_PII_FIELDS, 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 BaseError } from "./InvalidParamError-CDmVW2DS.native.esm.js";
|
|
2
|
+
import { A as FETCH_PROJECT_SETTINGS_TRACKER_KEY, B as createStorageKeySchema, C as createKeychainService, E as createCrossTabBroadcast, F as isServerSideRendering, G as retryOnFail, I as getBuffer, K as subscribeWithSelector, L as __logoutWithReason_wrapped, M as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, O as CannotTrackError, P as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, R as generateSessionKeys, S as createRealtimeService, T as createLogger, U as createLocalStorageAdapter, V as createStorage, W as isSignedIn, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as NoNetworkProvidersError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as GENERATE_SESSION_KEYS_TRACKER_KEY, k as createDeferredPromise, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, q as isEqualShallow, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError, z as fetchProjectSettings } from "./getNetworkProviderFromNetworkId-JGrKwBj7.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, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, w as normalizeAddress, y as NoWalletProviderFoundError } from "./getVerifiedCredentialForWalletAccount-CyykSi-M.native.esm.js";
|
|
4
|
+
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-Chpne8_Q.native.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DUvZEpjA.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";
|
|
@@ -25,6 +25,36 @@ const stateChangeEvents = {
|
|
|
25
25
|
user: "userChanged"
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
|
|
30
|
+
/**
|
|
31
|
+
* Appends a wallet connection URI to a deeplink URL.
|
|
32
|
+
*
|
|
33
|
+
* Generic across URI-deeplink connection options — works for both
|
|
34
|
+
* WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
|
|
35
|
+
* appropriate query parameter separator based on whether the deeplink
|
|
36
|
+
* already contains query parameters.
|
|
37
|
+
*
|
|
38
|
+
* @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
|
|
39
|
+
* @param params.connectionUri - The connection URI to append.
|
|
40
|
+
* @returns The deeplink URL with the connection URI appended as a query parameter.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
|
|
45
|
+
* // Returns: 'walletapp://wc?uri=wc%3A123-456'
|
|
46
|
+
*
|
|
47
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
|
|
48
|
+
* // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
|
|
49
|
+
* ```
|
|
50
|
+
* @not-instrumented
|
|
51
|
+
*/
|
|
52
|
+
const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
53
|
+
const url = new URL(deeplinkUrl);
|
|
54
|
+
url.searchParams.set("uri", connectionUri);
|
|
55
|
+
return url.href;
|
|
56
|
+
};
|
|
57
|
+
|
|
28
58
|
//#endregion
|
|
29
59
|
//#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
|
|
30
60
|
/** @not-instrumented */
|
|
@@ -626,10 +656,13 @@ const connectLoggerToInstrumentation = ({ environmentId, extensions, instrumenta
|
|
|
626
656
|
const { token, user } = state.get();
|
|
627
657
|
instrumentation.log({
|
|
628
658
|
environmentId,
|
|
629
|
-
parameters: {
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
659
|
+
parameters: scrubParameters({
|
|
660
|
+
piiFields: instrumentation.config.piiFields,
|
|
661
|
+
value: {
|
|
662
|
+
args,
|
|
663
|
+
message
|
|
664
|
+
}
|
|
665
|
+
}),
|
|
633
666
|
registeredExtensionKeys: Array.from(extensions),
|
|
634
667
|
sdkSessionId,
|
|
635
668
|
sdkVersion,
|
|
@@ -1615,6 +1648,7 @@ const __checkStepUpAuth_wrapped = instrumentFunction({
|
|
|
1615
1648
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1616
1649
|
* @returns A promise that resolves to the assertion response containing the elevated access token.
|
|
1617
1650
|
* @instrumented
|
|
1651
|
+
* @redact-params
|
|
1618
1652
|
*/
|
|
1619
1653
|
const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDefaultClient()) => {
|
|
1620
1654
|
const core = getCore(client);
|
|
@@ -1642,7 +1676,8 @@ const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
|
|
|
1642
1676
|
} catch {
|
|
1643
1677
|
return;
|
|
1644
1678
|
}
|
|
1645
|
-
}
|
|
1679
|
+
},
|
|
1680
|
+
redactAll: true
|
|
1646
1681
|
});
|
|
1647
1682
|
|
|
1648
1683
|
//#endregion
|
|
@@ -1794,6 +1829,7 @@ const serverRegisterPasskey = async ({ registration, createMfaToken }, client) =
|
|
|
1794
1829
|
* @returns A promise that resolves to the registration response.
|
|
1795
1830
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
1796
1831
|
* @instrumented
|
|
1832
|
+
* @redact-params
|
|
1797
1833
|
*/
|
|
1798
1834
|
const registerPasskey = async ({ createMfaToken } = {}, client = getDefaultClient()) => {
|
|
1799
1835
|
const core = getCore(client);
|
|
@@ -1816,7 +1852,8 @@ const __registerPasskey_wrapped = instrumentFunction({
|
|
|
1816
1852
|
} catch {
|
|
1817
1853
|
return;
|
|
1818
1854
|
}
|
|
1819
|
-
}
|
|
1855
|
+
},
|
|
1856
|
+
redactAll: true
|
|
1820
1857
|
});
|
|
1821
1858
|
|
|
1822
1859
|
//#endregion
|
|
@@ -1861,6 +1898,7 @@ const serverSigninPasskey = async ({ authentication, createMfaToken }, client) =
|
|
|
1861
1898
|
* @returns A promise that resolves to the authentication response.
|
|
1862
1899
|
* @throws NoWebAuthNSupportError If WebAuthn is not supported by the browser.
|
|
1863
1900
|
* @instrumented
|
|
1901
|
+
* @redact-params
|
|
1864
1902
|
*/
|
|
1865
1903
|
const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = getDefaultClient()) => {
|
|
1866
1904
|
const core = getCore(client);
|
|
@@ -1880,7 +1918,8 @@ const __signInWithPasskey_wrapped = instrumentFunction({
|
|
|
1880
1918
|
} catch {
|
|
1881
1919
|
return;
|
|
1882
1920
|
}
|
|
1883
|
-
}
|
|
1921
|
+
},
|
|
1922
|
+
redactAll: true
|
|
1884
1923
|
});
|
|
1885
1924
|
|
|
1886
1925
|
//#endregion
|
|
@@ -2337,6 +2376,7 @@ const getPrimaryWalletAccount = (client = getDefaultClient()) => {
|
|
|
2337
2376
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2338
2377
|
* @returns A promise that resolves to the verify response.
|
|
2339
2378
|
* @instrumented
|
|
2379
|
+
* @redact-params
|
|
2340
2380
|
*/
|
|
2341
2381
|
const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefaultClient()) => {
|
|
2342
2382
|
const core = getCore(client);
|
|
@@ -2362,7 +2402,8 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2362
2402
|
} catch {
|
|
2363
2403
|
return;
|
|
2364
2404
|
}
|
|
2365
|
-
}
|
|
2405
|
+
},
|
|
2406
|
+
redactAll: true
|
|
2366
2407
|
});
|
|
2367
2408
|
|
|
2368
2409
|
//#endregion
|
|
@@ -2377,10 +2418,10 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2377
2418
|
* @returns A promise that resolves to an array of token balances.
|
|
2378
2419
|
* @not-instrumented
|
|
2379
2420
|
*/
|
|
2380
|
-
const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2421
|
+
const getBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2381
2422
|
const core = getCore(client);
|
|
2382
2423
|
const apiClient = createApiClient({}, client);
|
|
2383
|
-
if (!networkId) {
|
|
2424
|
+
if (!networkId && !networkIds) {
|
|
2384
2425
|
const activeNetworkId = await getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
|
|
2385
2426
|
networkId = Number(activeNetworkId.networkId);
|
|
2386
2427
|
}
|
|
@@ -2393,6 +2434,7 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
|
|
|
2393
2434
|
includeNative,
|
|
2394
2435
|
includePrices,
|
|
2395
2436
|
networkId,
|
|
2437
|
+
networkIds,
|
|
2396
2438
|
whitelistedContracts
|
|
2397
2439
|
});
|
|
2398
2440
|
};
|
|
@@ -2443,6 +2485,52 @@ const createCheckoutApiClient = async ({ transactionId }, client) => {
|
|
|
2443
2485
|
};
|
|
2444
2486
|
};
|
|
2445
2487
|
|
|
2488
|
+
//#endregion
|
|
2489
|
+
//#region src/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.ts
|
|
2490
|
+
/**
|
|
2491
|
+
* Removes the locally stored checkout session token for the given transaction.
|
|
2492
|
+
*
|
|
2493
|
+
* The checkout session token is the anonymous credential that authorizes
|
|
2494
|
+
* mutations to a single in-flight checkout transaction. Once the transaction
|
|
2495
|
+
* has reached a terminal state (cancelled, expired, failed, completed) it can
|
|
2496
|
+
* no longer be advanced, and the token is dead weight that should not be
|
|
2497
|
+
* persisted in browser storage — leaving it around lets a later XSS payload
|
|
2498
|
+
* exfiltrate a credential with no further use, and it can also confuse the
|
|
2499
|
+
* SDK on subsequent loads into believing an active session exists.
|
|
2500
|
+
*
|
|
2501
|
+
* The server-side revocation lives in dashboard-api; this is the SDK-side
|
|
2502
|
+
* defense-in-depth.
|
|
2503
|
+
*
|
|
2504
|
+
* @not-instrumented
|
|
2505
|
+
*/
|
|
2506
|
+
const clearCheckoutSessionToken = async ({ transactionId }, client) => {
|
|
2507
|
+
await getCore(client).storage.removeItem(createCheckoutSessionTokenStorageKey(transactionId));
|
|
2508
|
+
};
|
|
2509
|
+
|
|
2510
|
+
//#endregion
|
|
2511
|
+
//#region src/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.ts
|
|
2512
|
+
/**
|
|
2513
|
+
* Checkout mutation routes are guarded server-side only by session-token
|
|
2514
|
+
* validation, so a 401 means the token is dead (revoked, expired, deleted,
|
|
2515
|
+
* or invalid). Leaving a dead token in `localStorage` widens the XSS
|
|
2516
|
+
* exfiltration surface for no benefit and makes the next SDK load attempt
|
|
2517
|
+
* requests that are guaranteed to fail.
|
|
2518
|
+
*
|
|
2519
|
+
* @not-instrumented
|
|
2520
|
+
*/
|
|
2521
|
+
const withCheckoutSessionTokenCleanupOn401 = async ({ call, transactionId }, client) => {
|
|
2522
|
+
try {
|
|
2523
|
+
return await call();
|
|
2524
|
+
} catch (error) {
|
|
2525
|
+
if (error instanceof APIError && error.status === 401) try {
|
|
2526
|
+
await clearCheckoutSessionToken({ transactionId }, client);
|
|
2527
|
+
} catch (cleanupError) {
|
|
2528
|
+
getCore(client).logger.error("Failed to clear checkout session token after 401", cleanupError);
|
|
2529
|
+
}
|
|
2530
|
+
throw error;
|
|
2531
|
+
}
|
|
2532
|
+
};
|
|
2533
|
+
|
|
2446
2534
|
//#endregion
|
|
2447
2535
|
//#region src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts
|
|
2448
2536
|
/**
|
|
@@ -2467,12 +2555,15 @@ const attachCheckoutTransactionSource = async (params, client = getDefaultClient
|
|
|
2467
2555
|
attachSourceRequest.fromChainId = params.fromChainId;
|
|
2468
2556
|
attachSourceRequest.fromChainName = params.fromChainName;
|
|
2469
2557
|
}
|
|
2470
|
-
return
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2558
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2559
|
+
call: () => apiClient.attachSource({
|
|
2560
|
+
attachSourceRequest,
|
|
2561
|
+
environmentId,
|
|
2562
|
+
transactionId,
|
|
2563
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2564
|
+
}),
|
|
2565
|
+
transactionId
|
|
2566
|
+
}, client);
|
|
2476
2567
|
};
|
|
2477
2568
|
const __attachCheckoutTransactionSource_impl = attachCheckoutTransactionSource;
|
|
2478
2569
|
const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
@@ -2503,12 +2594,15 @@ const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
|
2503
2594
|
*/
|
|
2504
2595
|
const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client = getDefaultClient()) => {
|
|
2505
2596
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2506
|
-
return
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2597
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2598
|
+
call: () => apiClient.recordCheckoutBroadcast({
|
|
2599
|
+
environmentId,
|
|
2600
|
+
recordBroadcastRequest: { txHash },
|
|
2601
|
+
transactionId,
|
|
2602
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2603
|
+
}),
|
|
2604
|
+
transactionId
|
|
2605
|
+
}, client);
|
|
2512
2606
|
};
|
|
2513
2607
|
const __broadcastCheckoutTransaction_impl = broadcastCheckoutTransaction;
|
|
2514
2608
|
const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
@@ -2535,12 +2629,15 @@ const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2535
2629
|
*/
|
|
2536
2630
|
const cancelCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
|
|
2537
2631
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2538
|
-
const result = await
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2632
|
+
const result = await withCheckoutSessionTokenCleanupOn401({
|
|
2633
|
+
call: () => apiClient.cancelCheckoutTransaction({
|
|
2634
|
+
environmentId,
|
|
2635
|
+
transactionId,
|
|
2636
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2637
|
+
}),
|
|
2638
|
+
transactionId
|
|
2639
|
+
}, client);
|
|
2640
|
+
await clearCheckoutSessionToken({ transactionId }, client);
|
|
2544
2641
|
return result;
|
|
2545
2642
|
};
|
|
2546
2643
|
const __cancelCheckoutTransaction_impl = cancelCheckoutTransaction;
|
|
@@ -2641,16 +2738,19 @@ const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClie
|
|
|
2641
2738
|
*/
|
|
2642
2739
|
const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slippage, transactionId }, client = getDefaultClient()) => {
|
|
2643
2740
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2644
|
-
return
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2741
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2742
|
+
call: () => apiClient.quoteCheckoutTransaction({
|
|
2743
|
+
environmentId,
|
|
2744
|
+
quoteRequest: {
|
|
2745
|
+
fromChainId,
|
|
2746
|
+
fromTokenAddress,
|
|
2747
|
+
slippage
|
|
2748
|
+
},
|
|
2749
|
+
transactionId,
|
|
2750
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2751
|
+
}),
|
|
2752
|
+
transactionId
|
|
2753
|
+
}, client);
|
|
2654
2754
|
};
|
|
2655
2755
|
|
|
2656
2756
|
//#endregion
|
|
@@ -2667,15 +2767,18 @@ const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slip
|
|
|
2667
2767
|
*/
|
|
2668
2768
|
const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalanceForTransferAmount, transactionId }, client = getDefaultClient()) => {
|
|
2669
2769
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2670
|
-
return
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2770
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2771
|
+
call: () => apiClient.prepareCheckoutTransaction({
|
|
2772
|
+
environmentId,
|
|
2773
|
+
prepareSigningRequest: {
|
|
2774
|
+
assertBalanceForGasCost: assertBalanceForGasCost ?? false,
|
|
2775
|
+
assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? false
|
|
2776
|
+
},
|
|
2777
|
+
transactionId,
|
|
2778
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2779
|
+
}),
|
|
2780
|
+
transactionId
|
|
2781
|
+
}, client);
|
|
2679
2782
|
};
|
|
2680
2783
|
const __prepareCheckoutTransaction_impl = prepareCheckoutTransaction;
|
|
2681
2784
|
const __prepareCheckoutTransaction_wrapped = instrumentFunction({
|
|
@@ -3462,10 +3565,12 @@ const fetchLegacyWalletBook = async (client) => {
|
|
|
3462
3565
|
};
|
|
3463
3566
|
|
|
3464
3567
|
//#endregion
|
|
3465
|
-
//#region src/modules/legacyWalletBook/
|
|
3568
|
+
//#region src/modules/legacyWalletBook/shouldFilterWallet/shouldFilterWallet.ts
|
|
3466
3569
|
/**
|
|
3467
|
-
* Embedded wallet keys that should be filtered out from
|
|
3468
|
-
* These wallets are not
|
|
3570
|
+
* Embedded wallet keys that should be filtered out from any external-wallet
|
|
3571
|
+
* catalogue. These wallets are not products the user "connects" to from the
|
|
3572
|
+
* wallet selection list — they are embedded sign-in methods that live behind
|
|
3573
|
+
* different SDK entry points.
|
|
3469
3574
|
* @not-instrumented
|
|
3470
3575
|
*/
|
|
3471
3576
|
const EMBEDDED_WALLET_KEYS = [
|
|
@@ -3481,19 +3586,48 @@ const EMBEDDED_WALLET_KEYS = [
|
|
|
3481
3586
|
"mpcwallet"
|
|
3482
3587
|
];
|
|
3483
3588
|
/**
|
|
3484
|
-
*
|
|
3589
|
+
* Generic "is this wallet eligible for an external-wallet catalogue" check.
|
|
3590
|
+
* Filters out:
|
|
3591
|
+
*
|
|
3592
|
+
* 1. Embedded sign-in methods (see {@link EMBEDDED_WALLET_KEYS}).
|
|
3593
|
+
* 2. Wallets that only ship a browser-extension injection (`injectedConfig`)
|
|
3594
|
+
* with no mobile or desktop links — these have no surface a customer
|
|
3595
|
+
* catalogue UI can drive to.
|
|
3596
|
+
*
|
|
3597
|
+
* Channel-specific eligibility (WalletConnect support, in-app browser URL,
|
|
3598
|
+
* installation links, …) is the caller's responsibility — wrap this helper
|
|
3599
|
+
* with an additional check, e.g.
|
|
3600
|
+
* {@link shouldFilterWalletForWalletConnect}.
|
|
3485
3601
|
*
|
|
3486
3602
|
* @returns True if the wallet should be filtered out, false otherwise.
|
|
3487
3603
|
* @not-instrumented
|
|
3488
3604
|
*/
|
|
3489
3605
|
const shouldFilterWallet = ({ wallet, walletKey }) => {
|
|
3490
3606
|
if (EMBEDDED_WALLET_KEYS.includes(walletKey)) return true;
|
|
3491
|
-
if (!wallet.walletConnect || !wallet.walletConnect.sdks.includes("sign_v2")) return true;
|
|
3492
3607
|
const hasInjectedConfig = wallet.injectedConfig && wallet.injectedConfig.length > 0;
|
|
3493
3608
|
const hasMobileLinks = Boolean(wallet.mobile?.androidId || wallet.mobile?.iosId || wallet.mobile?.native || wallet.mobile?.universal);
|
|
3494
3609
|
const hasDesktopLinks = Boolean(wallet.desktop?.chromeId || wallet.desktop?.edgeId || wallet.desktop?.firefoxId || wallet.desktop?.operaId || wallet.desktop?.safariId || wallet.desktop?.universal);
|
|
3495
|
-
|
|
3496
|
-
|
|
3610
|
+
return Boolean(hasInjectedConfig && !hasMobileLinks && !hasDesktopLinks);
|
|
3611
|
+
};
|
|
3612
|
+
|
|
3613
|
+
//#endregion
|
|
3614
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/shouldFilterWalletForWalletConnect/shouldFilterWalletForWalletConnect.ts
|
|
3615
|
+
/**
|
|
3616
|
+
* WalletConnect-specific filter. Applies the generic
|
|
3617
|
+
* {@link shouldFilterWallet} eligibility rules and additionally drops
|
|
3618
|
+
* wallets that do not advertise WalletConnect `sign_v2` support — the
|
|
3619
|
+
* protocol version Dynamic pairs against.
|
|
3620
|
+
*
|
|
3621
|
+
* @returns True if the wallet should be excluded from the WalletConnect
|
|
3622
|
+
* catalog, false otherwise.
|
|
3623
|
+
* @not-instrumented
|
|
3624
|
+
*/
|
|
3625
|
+
const shouldFilterWalletForWalletConnect = ({ wallet, walletKey }) => {
|
|
3626
|
+
if (shouldFilterWallet({
|
|
3627
|
+
wallet,
|
|
3628
|
+
walletKey
|
|
3629
|
+
})) return true;
|
|
3630
|
+
return !wallet.walletConnect?.sdks.includes("sign_v2");
|
|
3497
3631
|
};
|
|
3498
3632
|
|
|
3499
3633
|
//#endregion
|
|
@@ -3701,7 +3835,7 @@ const transformWalletBook = ({ walletBook }) => {
|
|
|
3701
3835
|
for (const [groupKey, group] of Object.entries(walletBook.groups)) groups[groupKey] = transformGroup({ group });
|
|
3702
3836
|
const wallets = {};
|
|
3703
3837
|
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
3704
|
-
if (
|
|
3838
|
+
if (shouldFilterWalletForWalletConnect({
|
|
3705
3839
|
wallet,
|
|
3706
3840
|
walletKey
|
|
3707
3841
|
})) continue;
|
|
@@ -3735,7 +3869,7 @@ const getWalletConnectCatalog = async (client = getDefaultClient()) => {
|
|
|
3735
3869
|
|
|
3736
3870
|
//#endregion
|
|
3737
3871
|
//#region src/modules/legacyWalletBook/matchWalletProvidersToCatalogGroup/matchWalletProvidersToCatalogGroup.ts
|
|
3738
|
-
const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
|
|
3872
|
+
const normalize$1 = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wallet/g, "");
|
|
3739
3873
|
/**
|
|
3740
3874
|
* Returns the wallet providers that belong to the same wallet group as the
|
|
3741
3875
|
* given WalletConnect catalog entry. Useful for de-duplicating "installed"
|
|
@@ -3754,10 +3888,10 @@ const normalize = (value) => value.toLowerCase().replace(/\s+/g, "").replace(/wa
|
|
|
3754
3888
|
* @not-instrumented
|
|
3755
3889
|
*/
|
|
3756
3890
|
const matchWalletProvidersToCatalogGroup = ({ catalogGroupKey, catalogGroupName, walletProviders }) => {
|
|
3757
|
-
const targets = new Set([normalize(catalogGroupKey)]);
|
|
3758
|
-
if (catalogGroupName) targets.add(normalize(catalogGroupName));
|
|
3891
|
+
const targets = new Set([normalize$1(catalogGroupKey)]);
|
|
3892
|
+
if (catalogGroupName) targets.add(normalize$1(catalogGroupName));
|
|
3759
3893
|
return walletProviders.filter((provider) => {
|
|
3760
|
-
return [normalize(provider.groupKey), normalize(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
|
|
3894
|
+
return [normalize$1(provider.groupKey), normalize$1(provider.metadata.displayName)].some((candidate) => targets.has(candidate));
|
|
3761
3895
|
});
|
|
3762
3896
|
};
|
|
3763
3897
|
|
|
@@ -3891,6 +4025,812 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3891
4025
|
}
|
|
3892
4026
|
};
|
|
3893
4027
|
|
|
4028
|
+
//#endregion
|
|
4029
|
+
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
4030
|
+
/**
|
|
4031
|
+
* Resolves which wallet option (group) a wallet book entry belongs to. Used
|
|
4032
|
+
* by the catalogue's wallet-book-driven transformers (URI deeplink,
|
|
4033
|
+
* `inAppBrowser`, `installation`) to bucket their emitted options.
|
|
4034
|
+
*
|
|
4035
|
+
* Wallet book entries inconsistently use `group` / `chainGroup` /
|
|
4036
|
+
* `walletGroup` for the same idea. The wallet key itself acts as the wallet
|
|
4037
|
+
* option key when no group field is set.
|
|
4038
|
+
*
|
|
4039
|
+
* @param params.wallet - The wallet entry.
|
|
4040
|
+
* @param params.walletKey - The wallet's key in `walletBook.wallets`.
|
|
4041
|
+
* @returns The wallet option key.
|
|
4042
|
+
* @not-instrumented
|
|
4043
|
+
*/
|
|
4044
|
+
const resolveWalletBookWalletOptionKey = ({ wallet, walletKey }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? walletKey;
|
|
4045
|
+
|
|
4046
|
+
//#endregion
|
|
4047
|
+
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts
|
|
4048
|
+
/**
|
|
4049
|
+
* Returns the wallet's in-app browser URL template, preferring the v2
|
|
4050
|
+
* field. `inAppBrowser` is deprecated but some wallet book entries
|
|
4051
|
+
* still carry only the v1 value, so it acts as a fallback. Trailing
|
|
4052
|
+
* `?? undefined` collapses the schema's `string | null` typing down to
|
|
4053
|
+
* the `string | undefined` return contract.
|
|
4054
|
+
*
|
|
4055
|
+
* @param params.wallet - The wallet book wallet entry.
|
|
4056
|
+
* @returns The in-app browser URL, or `undefined` if neither field is set.
|
|
4057
|
+
* @not-instrumented
|
|
4058
|
+
*/
|
|
4059
|
+
const getInAppBrowserUrl = ({ wallet }) => wallet.mobile?.inAppBrowserV2 ?? wallet.mobile?.inAppBrowser ?? void 0;
|
|
4060
|
+
|
|
4061
|
+
//#endregion
|
|
4062
|
+
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts
|
|
4063
|
+
/**
|
|
4064
|
+
* Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
|
|
4065
|
+
* qualifies when it exposes a mobile in-app-browser URL — typically a
|
|
4066
|
+
* `cb_url={{encodedDappURI}}`-style template the customer fills in with the
|
|
4067
|
+
* current page URL before opening.
|
|
4068
|
+
*
|
|
4069
|
+
* Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
|
|
4070
|
+
* and injected-only wallets are dropped — so the catalogue's notion of
|
|
4071
|
+
* "external wallet" stays consistent across option types.
|
|
4072
|
+
*
|
|
4073
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4074
|
+
* @returns Tagged `inAppBrowser` options paired with their wallet option keys.
|
|
4075
|
+
* @not-instrumented
|
|
4076
|
+
*/
|
|
4077
|
+
const buildInAppBrowserOptions = ({ walletBook }) => {
|
|
4078
|
+
const result = [];
|
|
4079
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4080
|
+
if (shouldFilterWallet({
|
|
4081
|
+
wallet,
|
|
4082
|
+
walletKey
|
|
4083
|
+
})) continue;
|
|
4084
|
+
const url = getInAppBrowserUrl({ wallet });
|
|
4085
|
+
if (!url) continue;
|
|
4086
|
+
result.push({
|
|
4087
|
+
option: {
|
|
4088
|
+
chain: getChainFromWalletSchema({
|
|
4089
|
+
wallet,
|
|
4090
|
+
walletKey
|
|
4091
|
+
}),
|
|
4092
|
+
type: "inAppBrowser",
|
|
4093
|
+
url
|
|
4094
|
+
},
|
|
4095
|
+
walletOptionKey: resolveWalletBookWalletOptionKey({
|
|
4096
|
+
wallet,
|
|
4097
|
+
walletKey
|
|
4098
|
+
})
|
|
4099
|
+
});
|
|
4100
|
+
}
|
|
4101
|
+
return result;
|
|
4102
|
+
};
|
|
4103
|
+
|
|
4104
|
+
//#endregion
|
|
4105
|
+
//#region src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts
|
|
4106
|
+
const PLAY_STORE_URL_TEMPLATE = "https://play.google.com/store/apps/details?id=";
|
|
4107
|
+
const APP_STORE_URL_TEMPLATE = "https://apps.apple.com/app/";
|
|
4108
|
+
const CHROME_WEB_STORE_URL_TEMPLATE = "https://chrome.google.com/webstore/detail/";
|
|
4109
|
+
const FIREFOX_ADDONS_URL_TEMPLATE = "https://addons.mozilla.org/firefox/addon/";
|
|
4110
|
+
const EDGE_ADDONS_URL_TEMPLATE = "https://microsoftedge.microsoft.com/addons/detail/";
|
|
4111
|
+
/**
|
|
4112
|
+
* Builds the install/download URL bag for a wallet book entry. Returns the
|
|
4113
|
+
* concrete URLs assembled from each store's ID field — Play Store, App
|
|
4114
|
+
* Store, Chrome Web Store, Firefox Add-ons, Edge Add-ons — plus the wallet's
|
|
4115
|
+
* own `desktop.universal` / `desktop.native` URLs when set.
|
|
4116
|
+
*
|
|
4117
|
+
* Fields the wallet book does not carry are left undefined; callers should
|
|
4118
|
+
* skip emitting an installation option for a wallet whose URL bag is empty.
|
|
4119
|
+
*
|
|
4120
|
+
* @param params.wallet - The wallet book entry.
|
|
4121
|
+
* @returns The URL bag, omitting fields the wallet does not provide.
|
|
4122
|
+
* @not-instrumented
|
|
4123
|
+
*/
|
|
4124
|
+
const buildInstallationUrls = ({ wallet }) => {
|
|
4125
|
+
const androidId = wallet.mobile?.androidId;
|
|
4126
|
+
const iosId = wallet.mobile?.iosId;
|
|
4127
|
+
const chromeId = wallet.desktop?.chromeId;
|
|
4128
|
+
const firefoxId = wallet.desktop?.firefoxId;
|
|
4129
|
+
const edgeId = wallet.desktop?.edgeId;
|
|
4130
|
+
const native = wallet.desktop?.universal ?? wallet.desktop?.native;
|
|
4131
|
+
return {
|
|
4132
|
+
android: androidId ? `${PLAY_STORE_URL_TEMPLATE}${androidId}` : void 0,
|
|
4133
|
+
chrome: chromeId ? `${CHROME_WEB_STORE_URL_TEMPLATE}${chromeId}` : void 0,
|
|
4134
|
+
edge: edgeId ? `${EDGE_ADDONS_URL_TEMPLATE}${edgeId}` : void 0,
|
|
4135
|
+
firefox: firefoxId ? `${FIREFOX_ADDONS_URL_TEMPLATE}${firefoxId}` : void 0,
|
|
4136
|
+
ios: iosId ? `${APP_STORE_URL_TEMPLATE}${iosId}` : void 0,
|
|
4137
|
+
native: native || void 0
|
|
4138
|
+
};
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4141
|
+
//#endregion
|
|
4142
|
+
//#region src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts
|
|
4143
|
+
/**
|
|
4144
|
+
* `buildInstallationUrls` always returns an object, but it can be fully
|
|
4145
|
+
* `undefined`-valued when the wallet book entry has no installable surface.
|
|
4146
|
+
* Skip those wallets — emitting an empty URL bag helps nobody.
|
|
4147
|
+
*/
|
|
4148
|
+
const hasAnyInstallationUrl = ({ urls }) => Object.values(urls).some(Boolean);
|
|
4149
|
+
/**
|
|
4150
|
+
* Collects install / download URLs for every wallet book entry that has
|
|
4151
|
+
* at least one installable surface, keyed by the wallet option key the
|
|
4152
|
+
* wallet groups under. The catalogue assembly step merges this map into
|
|
4153
|
+
* the per-key wallet option shell so `WalletOption.installationUrls` is
|
|
4154
|
+
* populated alongside (or instead of) `connectionOptions`.
|
|
4155
|
+
*
|
|
4156
|
+
* First-seen URLs win when multiple wallet book entries resolve to the
|
|
4157
|
+
* same wallet option key — wallet book authors put the most accurate
|
|
4158
|
+
* install links on the canonical entry, so the first-seen one is the
|
|
4159
|
+
* right pick.
|
|
4160
|
+
*
|
|
4161
|
+
* Reuses the generic `shouldFilterWallet` rules so embedded wallets do
|
|
4162
|
+
* not appear here either — they're not user-installable products.
|
|
4163
|
+
*
|
|
4164
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4165
|
+
* @returns A map from wallet option key to its install URL bag.
|
|
4166
|
+
* @not-instrumented
|
|
4167
|
+
*/
|
|
4168
|
+
const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
|
|
4169
|
+
const map = /* @__PURE__ */ new Map();
|
|
4170
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4171
|
+
if (shouldFilterWallet({
|
|
4172
|
+
wallet,
|
|
4173
|
+
walletKey
|
|
4174
|
+
})) continue;
|
|
4175
|
+
const urls = buildInstallationUrls({ wallet });
|
|
4176
|
+
if (!hasAnyInstallationUrl({ urls })) continue;
|
|
4177
|
+
const walletOptionKey = resolveWalletBookWalletOptionKey({
|
|
4178
|
+
wallet,
|
|
4179
|
+
walletKey
|
|
4180
|
+
});
|
|
4181
|
+
if (!map.has(walletOptionKey)) map.set(walletOptionKey, urls);
|
|
4182
|
+
}
|
|
4183
|
+
return map;
|
|
4184
|
+
};
|
|
4185
|
+
|
|
4186
|
+
//#endregion
|
|
4187
|
+
//#region src/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/resolveUriConnectionType.ts
|
|
4188
|
+
/**
|
|
4189
|
+
* Picks the connection-option `type` discriminator for a wallet-book-
|
|
4190
|
+
* derived URI deeplink option. MetaMask is steered toward its own
|
|
4191
|
+
* MetaMask SDK URI connection extension (`metamaskSdkUri`) so we route
|
|
4192
|
+
* customers off generic WalletConnect for that wallet; every other
|
|
4193
|
+
* wallet uses the standard `walletConnect` discriminator.
|
|
4194
|
+
*
|
|
4195
|
+
* @param params.walletOptionKey - The resolved wallet option key.
|
|
4196
|
+
* @returns The connection-option discriminator to emit.
|
|
4197
|
+
* @not-instrumented
|
|
4198
|
+
*/
|
|
4199
|
+
const resolveUriConnectionType = ({ walletOptionKey }) => walletOptionKey === "metamask" ? "metamaskSdkUri" : "walletConnect";
|
|
4200
|
+
|
|
4201
|
+
//#endregion
|
|
4202
|
+
//#region src/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/buildUriDeeplinkOptions.ts
|
|
4203
|
+
/**
|
|
4204
|
+
* A wallet only deserves a URI-deeplink catalogue option if it has at
|
|
4205
|
+
* least one mobile deeplink — that's the value-add the option provides
|
|
4206
|
+
* over the bare pairing URI. Wallets that exist in the wallet book but
|
|
4207
|
+
* don't expose a deeplink (rare, but present) are silently skipped.
|
|
4208
|
+
*/
|
|
4209
|
+
const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
|
|
4210
|
+
/**
|
|
4211
|
+
* Builds the URI-deeplink catalogue options from a fetched wallet book.
|
|
4212
|
+
* Applies the WalletConnect-specific eligibility filter
|
|
4213
|
+
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
4214
|
+
* without `sign_v2` support are excluded — same surface as
|
|
4215
|
+
* `getWalletConnectCatalog`.
|
|
4216
|
+
*
|
|
4217
|
+
* Each emitted option carries the wallet's mobile deeplinks. Customers
|
|
4218
|
+
* combine these with their chain's connection URI via
|
|
4219
|
+
* `appendConnectionUriToDeeplink` to open the wallet's app:
|
|
4220
|
+
*
|
|
4221
|
+
* - `'walletConnect'`: mint via `connectWithWalletConnect<Chain>`.
|
|
4222
|
+
* - `'metamaskSdkUri'`: mint via `connectWithMetaMaskUriEvm` or
|
|
4223
|
+
* `connectWithMetaMaskUriSolana`. Emitted only for the MetaMask
|
|
4224
|
+
* wallet entry — see `resolveUriConnectionType`.
|
|
4225
|
+
*
|
|
4226
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4227
|
+
* @returns Tagged options paired with their wallet option keys.
|
|
4228
|
+
* @not-instrumented
|
|
4229
|
+
*/
|
|
4230
|
+
const buildUriDeeplinkOptions = ({ walletBook }) => {
|
|
4231
|
+
const result = [];
|
|
4232
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4233
|
+
if (shouldFilterWalletForWalletConnect({
|
|
4234
|
+
wallet,
|
|
4235
|
+
walletKey
|
|
4236
|
+
})) continue;
|
|
4237
|
+
if (!hasUsableDeeplink({ wallet })) continue;
|
|
4238
|
+
const walletOptionKey = resolveWalletBookWalletOptionKey({
|
|
4239
|
+
wallet,
|
|
4240
|
+
walletKey
|
|
4241
|
+
});
|
|
4242
|
+
const chain = getChainFromWalletSchema({
|
|
4243
|
+
wallet,
|
|
4244
|
+
walletKey
|
|
4245
|
+
});
|
|
4246
|
+
result.push({
|
|
4247
|
+
option: {
|
|
4248
|
+
chain,
|
|
4249
|
+
deeplinks: {
|
|
4250
|
+
native: wallet.mobile?.native,
|
|
4251
|
+
universal: wallet.mobile?.universal
|
|
4252
|
+
},
|
|
4253
|
+
type: resolveUriConnectionType({ walletOptionKey })
|
|
4254
|
+
},
|
|
4255
|
+
walletOptionKey
|
|
4256
|
+
});
|
|
4257
|
+
}
|
|
4258
|
+
return result;
|
|
4259
|
+
};
|
|
4260
|
+
|
|
4261
|
+
//#endregion
|
|
4262
|
+
//#region src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts
|
|
4263
|
+
/**
|
|
4264
|
+
* Assembles a `WalletOption` for a resolved wallet option key, populated
|
|
4265
|
+
* with the connection options the transformers produced for it plus an
|
|
4266
|
+
* optional install / download URL bag.
|
|
4267
|
+
*
|
|
4268
|
+
* Display merge rules (provider self-announced metadata wins where set):
|
|
4269
|
+
*
|
|
4270
|
+
* - `name`: `displayOverride.name` ?? wallet book group name ?? bare key.
|
|
4271
|
+
* - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL ?? `''`.
|
|
4272
|
+
* - `primaryColor`: wallet book group brand color only (providers do not
|
|
4273
|
+
* ship a primary color in their announcement metadata).
|
|
4274
|
+
* - `installationUrls`: copied through if present.
|
|
4275
|
+
*
|
|
4276
|
+
* Why provider precedence: a registered wallet provider knows its own
|
|
4277
|
+
* brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
|
|
4278
|
+
* wallet authoring its own identity). The wallet book fills in fields the
|
|
4279
|
+
* announcement does not carry — currently only `primaryColor`.
|
|
4280
|
+
*
|
|
4281
|
+
* @param params.connectionOptions - The connections to attach to this wallet option.
|
|
4282
|
+
* @param [params.displayOverride] - Provider-announced display info that overrides the wallet book's name and iconUrl.
|
|
4283
|
+
* @param [params.installationUrls] - Install/download URL bag for this wallet.
|
|
4284
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4285
|
+
* @param params.walletOptionKey - The wallet option key.
|
|
4286
|
+
* @returns The constructed wallet option.
|
|
4287
|
+
* @not-instrumented
|
|
4288
|
+
*/
|
|
4289
|
+
const buildWalletOption = ({ connectionOptions, displayOverride, installationUrls, walletBook, walletOptionKey }) => {
|
|
4290
|
+
const group = walletBook.groups[walletOptionKey];
|
|
4291
|
+
const groupSpriteId = group?.brand?.spriteId;
|
|
4292
|
+
const groupIconUrl = groupSpriteId ? getSpriteUrl({ spriteId: groupSpriteId }) : void 0;
|
|
4293
|
+
return {
|
|
4294
|
+
connectionOptions,
|
|
4295
|
+
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
|
|
4296
|
+
installationUrls,
|
|
4297
|
+
key: walletOptionKey,
|
|
4298
|
+
name: displayOverride?.name ?? group?.name ?? walletOptionKey,
|
|
4299
|
+
primaryColor: group?.brand?.primaryColor
|
|
4300
|
+
};
|
|
4301
|
+
};
|
|
4302
|
+
|
|
4303
|
+
//#endregion
|
|
4304
|
+
//#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
|
|
4305
|
+
/**
|
|
4306
|
+
* Maps a registered wallet provider's registration priority to the
|
|
4307
|
+
* `WithWalletProviderSource` value that should appear on its catalogue option.
|
|
4308
|
+
*
|
|
4309
|
+
* Priority mapping (set by each chain extension when it calls
|
|
4310
|
+
* `registry.register`):
|
|
4311
|
+
*
|
|
4312
|
+
* - `WALLET_SDK` → `'sdk'` — branded SDKs wrapped by chain extensions
|
|
4313
|
+
* (Base Account via `@base-org/account`, MetaMask Connect, …).
|
|
4314
|
+
* - `WALLET_SELF_ANNOUNCEMENT_STANDARD` → `'selfAnnounced'` — in-page
|
|
4315
|
+
* self-announcement standards (EIP-6963 on EVM, Wallet Standard on
|
|
4316
|
+
* Solana / Sui / …).
|
|
4317
|
+
* - `WINDOW_INJECT` → `'windowInjected'` — legacy `window.*` injection.
|
|
4318
|
+
*
|
|
4319
|
+
* Returns `undefined` for providers whose registration priority does not
|
|
4320
|
+
* correspond to a connectable external-wallet source — callers filter these
|
|
4321
|
+
* out before emitting catalogue options.
|
|
4322
|
+
*
|
|
4323
|
+
* @param params.entry - The registry entry to classify.
|
|
4324
|
+
* @returns The matching source, or `undefined` if this entry should not
|
|
4325
|
+
* surface a `withWalletProvider` option.
|
|
4326
|
+
* @not-instrumented
|
|
4327
|
+
*/
|
|
4328
|
+
const classifyWithWalletProviderSource = ({ entry }) => {
|
|
4329
|
+
const { priority } = entry;
|
|
4330
|
+
if (priority === WalletProviderPriority.WALLET_SDK) return "sdk";
|
|
4331
|
+
if (priority === WalletProviderPriority.WALLET_SELF_ANNOUNCEMENT_STANDARD) return "selfAnnounced";
|
|
4332
|
+
if (priority === WalletProviderPriority.WINDOW_INJECT) return "windowInjected";
|
|
4333
|
+
};
|
|
4334
|
+
|
|
4335
|
+
//#endregion
|
|
4336
|
+
//#region src/modules/wallets/utils/stripChainSuffix/stripChainSuffix.ts
|
|
4337
|
+
/**
|
|
4338
|
+
* Removes the lowercased chain suffix that `normalizeWalletNameWithChain`
|
|
4339
|
+
* appends. Used by `findWalletOptionKeyForProviderKey` to recover the wallet
|
|
4340
|
+
* book wallet key candidate from a `walletProviderKey`. If the suffix is
|
|
4341
|
+
* not present (some chain extensions already bake the chain into the
|
|
4342
|
+
* display name), the input is returned unchanged.
|
|
4343
|
+
*
|
|
4344
|
+
* @param params.chain - The chain whose suffix should be stripped.
|
|
4345
|
+
* @param params.normalizedName - The normalized wallet-name-with-chain string.
|
|
4346
|
+
* @returns The name with the chain suffix removed, or the input unchanged.
|
|
4347
|
+
* @not-instrumented
|
|
4348
|
+
*/
|
|
4349
|
+
const stripChainSuffix = ({ chain, normalizedName }) => {
|
|
4350
|
+
const suffix = chain.toLowerCase();
|
|
4351
|
+
if (normalizedName.endsWith(suffix)) return normalizedName.slice(0, -suffix.length);
|
|
4352
|
+
return normalizedName;
|
|
4353
|
+
};
|
|
4354
|
+
|
|
4355
|
+
//#endregion
|
|
4356
|
+
//#region src/modules/walletOptionsCatalogue/normalizeWalletDisplayName/normalizeWalletDisplayName.ts
|
|
4357
|
+
/**
|
|
4358
|
+
* Normalizes a wallet's self-announced `displayName` into a stable wallet
|
|
4359
|
+
* option key. Used by `findWalletOptionKeyForProviderKey` as the off-book
|
|
4360
|
+
* fallback — registered providers whose `walletProviderKey` does not
|
|
4361
|
+
* resolve to any wallet book entry still surface in the catalogue under a
|
|
4362
|
+
* key derived from the name they ship in their metadata.
|
|
4363
|
+
*
|
|
4364
|
+
* The normalization (lowercase + whitespace-strip) intentionally matches
|
|
4365
|
+
* how the legacy wallet book composes its `wallets.<key>` keys, so a
|
|
4366
|
+
* self-described provider's option will merge cleanly with its book entry
|
|
4367
|
+
* if one ever lands later.
|
|
4368
|
+
*
|
|
4369
|
+
* Multi-chain registrations of the same wallet (e.g. Phantom announced via
|
|
4370
|
+
* EIP-6963 on EVM and via Wallet Standard on Solana) collapse onto the
|
|
4371
|
+
* same wallet option through this normalization, since each registration
|
|
4372
|
+
* announces the same `displayName`.
|
|
4373
|
+
*
|
|
4374
|
+
* @param displayName - The provider's `metadata.displayName`.
|
|
4375
|
+
* @returns The normalized wallet option key (lowercased, no whitespace).
|
|
4376
|
+
* @not-instrumented
|
|
4377
|
+
*/
|
|
4378
|
+
const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().replace(/\s+/g, "");
|
|
4379
|
+
|
|
4380
|
+
//#endregion
|
|
4381
|
+
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
|
|
4382
|
+
const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
|
|
4383
|
+
/**
|
|
4384
|
+
* Looks for a wallet book entry whose `name` or `shortName` normalizes to
|
|
4385
|
+
* the same string as `candidate`. Used as a fallback by
|
|
4386
|
+
* `findWalletOptionKeyForProviderKey` for providers whose
|
|
4387
|
+
* `walletProviderKey` strips down to a value that does not match any
|
|
4388
|
+
* `walletBook.wallets` key directly (e.g. an extension whose display name
|
|
4389
|
+
* happens to match the wallet's `shortName` instead of its book key).
|
|
4390
|
+
*
|
|
4391
|
+
* @param params.candidate - The lowercased, chain-suffix-stripped candidate.
|
|
4392
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4393
|
+
* @returns The matching wallet book wallet key, or `undefined`.
|
|
4394
|
+
* @not-instrumented
|
|
4395
|
+
*/
|
|
4396
|
+
const findByNameMatch = ({ candidate, walletBook }) => {
|
|
4397
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) if (normalize(wallet.name) === candidate || normalize(wallet.shortName) === candidate) return walletKey;
|
|
4398
|
+
};
|
|
4399
|
+
|
|
4400
|
+
//#endregion
|
|
4401
|
+
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/resolveWalletOptionKey/resolveWalletOptionKey.ts
|
|
4402
|
+
/**
|
|
4403
|
+
* Picks the wallet option (group) key for a wallet book wallet. The wallet
|
|
4404
|
+
* book carries the group association under a few different field names
|
|
4405
|
+
* (`group`, `chainGroup`, `walletGroup`) depending on the wallet's
|
|
4406
|
+
* provenance — this helper centralises the lookup. When none of those
|
|
4407
|
+
* fields are set, the wallet key itself acts as its own wallet option key.
|
|
4408
|
+
*
|
|
4409
|
+
* @param params.fallback - Wallet key to return if no group field is set.
|
|
4410
|
+
* @param params.wallet - The wallet book wallet entry.
|
|
4411
|
+
* @returns The resolved wallet option key.
|
|
4412
|
+
* @not-instrumented
|
|
4413
|
+
*/
|
|
4414
|
+
const resolveWalletOptionKey = ({ fallback, wallet }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? fallback;
|
|
4415
|
+
|
|
4416
|
+
//#endregion
|
|
4417
|
+
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findWalletOptionKeyForProviderKey.ts
|
|
4418
|
+
/**
|
|
4419
|
+
* Resolves a registered wallet provider to the wallet option key it should
|
|
4420
|
+
* be bucketed under. Always returns a key — providers with no wallet book
|
|
4421
|
+
* match fall back to their self-announced `metadata.displayName`, so the
|
|
4422
|
+
* catalogue surfaces them as self-described tiles instead of silently
|
|
4423
|
+
* dropping them.
|
|
4424
|
+
*
|
|
4425
|
+
* Resolution order (each step short-circuits on first hit):
|
|
4426
|
+
*
|
|
4427
|
+
* 1. **Direct wallet book lookup with chain suffix** — try
|
|
4428
|
+
* `walletBook.wallets[normalizedWalletNameWithChain]` as-is. Wallet
|
|
4429
|
+
* book entries are inconsistent about whether they keep the chain
|
|
4430
|
+
* suffix (e.g. `metamaskevm`) or strip it (e.g. `metamask`), so try
|
|
4431
|
+
* the suffixed form first.
|
|
4432
|
+
* 2. **Direct wallet book lookup without chain suffix** — strip the
|
|
4433
|
+
* suffix and retry.
|
|
4434
|
+
* 3. **Name match heuristic with chain suffix** — scan
|
|
4435
|
+
* `walletBook.wallets` for an entry whose normalized `name` or
|
|
4436
|
+
* `shortName` equals the suffixed candidate.
|
|
4437
|
+
* 4. **Name match heuristic without chain suffix** — same scan on the
|
|
4438
|
+
* stripped candidate.
|
|
4439
|
+
* 5. **Display-name fallback** — derive a stable key from
|
|
4440
|
+
* `walletProvider.metadata.displayName` via
|
|
4441
|
+
* {@link normalizeWalletDisplayName}. Multi-chain registrations of the
|
|
4442
|
+
* same self-described wallet (e.g. Phantom on EVM and Solana) collapse
|
|
4443
|
+
* onto the same tile because each announces the same display name.
|
|
4444
|
+
*
|
|
4445
|
+
* @param params.chain - The provider's chain (used to strip the suffix).
|
|
4446
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4447
|
+
* @param params.walletProvider - The registered wallet provider.
|
|
4448
|
+
* @returns The wallet option key for this provider.
|
|
4449
|
+
* @not-instrumented
|
|
4450
|
+
*/
|
|
4451
|
+
const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }) => {
|
|
4452
|
+
const { normalizedWalletNameWithChain } = splitWalletProviderKey(walletProvider.key);
|
|
4453
|
+
const candidates = [normalizedWalletNameWithChain, stripChainSuffix({
|
|
4454
|
+
chain,
|
|
4455
|
+
normalizedName: normalizedWalletNameWithChain
|
|
4456
|
+
})];
|
|
4457
|
+
for (const candidate of candidates) {
|
|
4458
|
+
const directHit = walletBook.wallets[candidate];
|
|
4459
|
+
if (directHit) return resolveWalletOptionKey({
|
|
4460
|
+
fallback: candidate,
|
|
4461
|
+
wallet: directHit
|
|
4462
|
+
});
|
|
4463
|
+
}
|
|
4464
|
+
for (const candidate of candidates) {
|
|
4465
|
+
const nameMatchKey = findByNameMatch({
|
|
4466
|
+
candidate,
|
|
4467
|
+
walletBook
|
|
4468
|
+
});
|
|
4469
|
+
if (nameMatchKey) return resolveWalletOptionKey({
|
|
4470
|
+
fallback: nameMatchKey,
|
|
4471
|
+
wallet: walletBook.wallets[nameMatchKey]
|
|
4472
|
+
});
|
|
4473
|
+
}
|
|
4474
|
+
return normalizeWalletDisplayName(walletProvider.metadata.displayName);
|
|
4475
|
+
};
|
|
4476
|
+
|
|
4477
|
+
//#endregion
|
|
4478
|
+
//#region src/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.ts
|
|
4479
|
+
/**
|
|
4480
|
+
* Converts each registered wallet provider entry into a
|
|
4481
|
+
* `WithWalletProviderConnectionOption` paired with its target wallet
|
|
4482
|
+
* option key and the provider's display override. Every classifiable
|
|
4483
|
+
* entry surfaces in the catalogue; the outer transformer uses the
|
|
4484
|
+
* carried `displayOverride` to override any wallet book branding for
|
|
4485
|
+
* that key (provider self-announcement wins over book).
|
|
4486
|
+
*
|
|
4487
|
+
* Entries whose registration priority is not recognised by
|
|
4488
|
+
* `classifyWithWalletProviderSource` are dropped from the catalogue and
|
|
4489
|
+
* an error is logged so Datadog surfaces the unknown registration path —
|
|
4490
|
+
* in production this should never happen, every chain extension is
|
|
4491
|
+
* expected to register with one of the documented priorities.
|
|
4492
|
+
*
|
|
4493
|
+
* @param params.entries - Snapshot of the registry's entries.
|
|
4494
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4495
|
+
* @param client - The Dynamic client (used for logging unclassifiable entries).
|
|
4496
|
+
* @returns An array of tagged options, in input order.
|
|
4497
|
+
* @not-instrumented
|
|
4498
|
+
*/
|
|
4499
|
+
const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
|
|
4500
|
+
const result = [];
|
|
4501
|
+
for (const entry of entries) {
|
|
4502
|
+
const source = classifyWithWalletProviderSource({ entry });
|
|
4503
|
+
if (!source) {
|
|
4504
|
+
getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
|
|
4505
|
+
chain: entry.walletProvider.chain,
|
|
4506
|
+
displayName: entry.walletProvider.metadata.displayName,
|
|
4507
|
+
priority: entry.priority,
|
|
4508
|
+
walletProviderKey: entry.walletProvider.key,
|
|
4509
|
+
walletProviderType: entry.walletProvider.walletProviderType
|
|
4510
|
+
});
|
|
4511
|
+
continue;
|
|
4512
|
+
}
|
|
4513
|
+
const walletOptionKey = findWalletOptionKeyForProviderKey({
|
|
4514
|
+
chain: entry.walletProvider.chain,
|
|
4515
|
+
walletBook,
|
|
4516
|
+
walletProvider: entry.walletProvider
|
|
4517
|
+
});
|
|
4518
|
+
result.push({
|
|
4519
|
+
displayOverride: {
|
|
4520
|
+
iconUrl: entry.walletProvider.metadata.icon,
|
|
4521
|
+
name: entry.walletProvider.metadata.displayName
|
|
4522
|
+
},
|
|
4523
|
+
option: {
|
|
4524
|
+
chain: entry.walletProvider.chain,
|
|
4525
|
+
source,
|
|
4526
|
+
type: "withWalletProvider",
|
|
4527
|
+
walletProviderKey: entry.walletProvider.key
|
|
4528
|
+
},
|
|
4529
|
+
walletOptionKey
|
|
4530
|
+
});
|
|
4531
|
+
}
|
|
4532
|
+
return result;
|
|
4533
|
+
};
|
|
4534
|
+
|
|
4535
|
+
//#endregion
|
|
4536
|
+
//#region src/modules/walletOptionsCatalogue/excludedWalletOptionKeys/excludedWalletOptionKeys.ts
|
|
4537
|
+
/**
|
|
4538
|
+
* Wallet option keys `getWalletOptionsCatalogue` drops before returning.
|
|
4539
|
+
* Curated, product-level suppression.
|
|
4540
|
+
*
|
|
4541
|
+
* Example: Base Account SDK is the recommended entry point for
|
|
4542
|
+
* Coinbase-managed users, so the legacy Coinbase Wallet entries are
|
|
4543
|
+
* suppressed in favor of the SDK-backed `baseaccount` tile. Both the
|
|
4544
|
+
* wallet book group key (`coinbase`) and the normalized display-name
|
|
4545
|
+
* key (`coinbasewallet`) are listed so suppression holds regardless of
|
|
4546
|
+
* how the resolver lands on a key.
|
|
4547
|
+
*
|
|
4548
|
+
* Used in: `getWalletOptionsCatalogue`.
|
|
4549
|
+
*/
|
|
4550
|
+
const EXCLUDED_WALLET_OPTION_KEYS = new Set(["coinbase", "coinbasewallet"]);
|
|
4551
|
+
|
|
4552
|
+
//#endregion
|
|
4553
|
+
//#region src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts
|
|
4554
|
+
/**
|
|
4555
|
+
* Buckets tagged connection options by their wallet option key. Preserves
|
|
4556
|
+
* first-seen order so that the caller's choice of
|
|
4557
|
+
* `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
|
|
4558
|
+
* order (wallet book order for walletConnect/inAppBrowser/installation,
|
|
4559
|
+
* registry order for withWalletProvider).
|
|
4560
|
+
*
|
|
4561
|
+
* Carries through the first-seen `displayOverride` per wallet option
|
|
4562
|
+
* key, so the shell builder can apply provider-announced metadata on
|
|
4563
|
+
* top of any wallet book entry.
|
|
4564
|
+
*
|
|
4565
|
+
* @param params.options - The tagged options to group.
|
|
4566
|
+
* @returns A map from wallet option key to its grouped option bucket,
|
|
4567
|
+
* iterable in first-seen order.
|
|
4568
|
+
* @not-instrumented
|
|
4569
|
+
*/
|
|
4570
|
+
const groupOptionsByWalletOption = ({ options }) => {
|
|
4571
|
+
const map = /* @__PURE__ */ new Map();
|
|
4572
|
+
for (const { displayOverride, option, walletOptionKey } of options) {
|
|
4573
|
+
const existing = map.get(walletOptionKey);
|
|
4574
|
+
if (existing) {
|
|
4575
|
+
existing.connectionOptions.push(option);
|
|
4576
|
+
if (!existing.displayOverride && displayOverride) existing.displayOverride = displayOverride;
|
|
4577
|
+
} else map.set(walletOptionKey, {
|
|
4578
|
+
connectionOptions: [option],
|
|
4579
|
+
displayOverride
|
|
4580
|
+
});
|
|
4581
|
+
}
|
|
4582
|
+
return map;
|
|
4583
|
+
};
|
|
4584
|
+
|
|
4585
|
+
//#endregion
|
|
4586
|
+
//#region src/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.ts
|
|
4587
|
+
/**
|
|
4588
|
+
* Numeric priority for each `WalletConnectionOption` type. Lower values rank
|
|
4589
|
+
* first. Used to sort each wallet option's `connectionOptions` array so the
|
|
4590
|
+
* best connection path lands at index 0. Has no bearing on how the outer
|
|
4591
|
+
* wallet-option list is ordered — that's controlled by
|
|
4592
|
+
* `WalletOptionOrdering`.
|
|
4593
|
+
*
|
|
4594
|
+
* `withWalletProvider > walletConnect / metamaskSdkUri > inAppBrowser`
|
|
4595
|
+
*/
|
|
4596
|
+
const CONNECTION_OPTION_PRIORITY = {
|
|
4597
|
+
inAppBrowser: 2,
|
|
4598
|
+
metamaskSdkUri: 1,
|
|
4599
|
+
walletConnect: 1,
|
|
4600
|
+
withWalletProvider: 0
|
|
4601
|
+
};
|
|
4602
|
+
/**
|
|
4603
|
+
* Returns the numeric priority of a `WalletConnectionOption` for sorting.
|
|
4604
|
+
* Lower numbers rank first.
|
|
4605
|
+
*
|
|
4606
|
+
* @param params.option - The connection option to inspect.
|
|
4607
|
+
* @returns The numeric priority — lower is better.
|
|
4608
|
+
* @not-instrumented
|
|
4609
|
+
*/
|
|
4610
|
+
const getConnectionOptionPriority = ({ option }) => CONNECTION_OPTION_PRIORITY[option.type];
|
|
4611
|
+
|
|
4612
|
+
//#endregion
|
|
4613
|
+
//#region src/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.ts
|
|
4614
|
+
/**
|
|
4615
|
+
* Sorts a wallet option's `connectionOptions` so the most preferred option lands at
|
|
4616
|
+
* index 0. Primary sort is by option-type priority
|
|
4617
|
+
* (`withWalletProvider` > URI deeplink > `inAppBrowser`);
|
|
4618
|
+
* within a type, ties break alphabetically by `chain` for deterministic
|
|
4619
|
+
* output across calls.
|
|
4620
|
+
*
|
|
4621
|
+
* Returns a new array — the input is not mutated.
|
|
4622
|
+
*
|
|
4623
|
+
* @param params.options - The options to sort.
|
|
4624
|
+
* @returns A new array in priority order.
|
|
4625
|
+
* @not-instrumented
|
|
4626
|
+
*/
|
|
4627
|
+
const sortConnectionOptions = ({ options }) => [...options].sort((a, b) => {
|
|
4628
|
+
const priorityDelta = getConnectionOptionPriority({ option: a }) - getConnectionOptionPriority({ option: b });
|
|
4629
|
+
if (priorityDelta !== 0) return priorityDelta;
|
|
4630
|
+
return a.chain.localeCompare(b.chain);
|
|
4631
|
+
});
|
|
4632
|
+
|
|
4633
|
+
//#endregion
|
|
4634
|
+
//#region src/modules/legacyWalletBook/priorityWalletKeys/priorityWalletKeys.ts
|
|
4635
|
+
/**
|
|
4636
|
+
* Hand-curated list of wallet book group keys that should surface at the top
|
|
4637
|
+
* of catalogue listings. Lower index = higher priority. Anything not in this
|
|
4638
|
+
* list falls through to the secondary sort (alphabetical by name).
|
|
4639
|
+
*
|
|
4640
|
+
* Used by `sortWalletOptions` (relevance mode) and by the react-demo's
|
|
4641
|
+
* WalletConnect picker. Keep both in sync when adding entries.
|
|
4642
|
+
*/
|
|
4643
|
+
const PRIORITY_WALLET_KEYS = [
|
|
4644
|
+
"metamask",
|
|
4645
|
+
"coinbase",
|
|
4646
|
+
"baseaccount",
|
|
4647
|
+
"phantom",
|
|
4648
|
+
"magiceden",
|
|
4649
|
+
"trust",
|
|
4650
|
+
"okxwallet",
|
|
4651
|
+
"rainbow",
|
|
4652
|
+
"argentx",
|
|
4653
|
+
"backpack",
|
|
4654
|
+
"xverse",
|
|
4655
|
+
"onekey",
|
|
4656
|
+
"solflare",
|
|
4657
|
+
"braavos",
|
|
4658
|
+
"brave",
|
|
4659
|
+
"unisat",
|
|
4660
|
+
"bitgetwallet",
|
|
4661
|
+
"coin98"
|
|
4662
|
+
];
|
|
4663
|
+
|
|
4664
|
+
//#endregion
|
|
4665
|
+
//#region src/modules/walletOptionsCatalogue/getPriorityIndex/getPriorityIndex.ts
|
|
4666
|
+
/**
|
|
4667
|
+
* Returns the index of a wallet option in `PRIORITY_WALLET_KEYS`, or
|
|
4668
|
+
* `Number.POSITIVE_INFINITY` when the wallet is not in the hand-curated
|
|
4669
|
+
* priority list. Lower index = higher priority.
|
|
4670
|
+
*
|
|
4671
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
4672
|
+
* @returns Numeric priority index — lower is better.
|
|
4673
|
+
* @not-instrumented
|
|
4674
|
+
*/
|
|
4675
|
+
const getPriorityIndex = ({ walletOption }) => {
|
|
4676
|
+
const index = PRIORITY_WALLET_KEYS.indexOf(walletOption.key);
|
|
4677
|
+
return index === -1 ? Number.POSITIVE_INFINITY : index;
|
|
4678
|
+
};
|
|
4679
|
+
|
|
4680
|
+
//#endregion
|
|
4681
|
+
//#region src/modules/walletOptionsCatalogue/compareByRelevance/compareByRelevance.ts
|
|
4682
|
+
/**
|
|
4683
|
+
* Compares two wallet options for relevance ordering: priority-list index
|
|
4684
|
+
* first, then alphabetical-by-name as the tie-break. Suitable for passing
|
|
4685
|
+
* straight to `Array.prototype.sort`.
|
|
4686
|
+
*
|
|
4687
|
+
* @param params.a - First wallet option.
|
|
4688
|
+
* @param params.b - Second wallet option.
|
|
4689
|
+
* @returns Negative when `a` ranks first, positive when `b` ranks first.
|
|
4690
|
+
* @not-instrumented
|
|
4691
|
+
*/
|
|
4692
|
+
const compareByRelevance = ({ a, b }) => {
|
|
4693
|
+
const aIndex = getPriorityIndex({ walletOption: a });
|
|
4694
|
+
const bIndex = getPriorityIndex({ walletOption: b });
|
|
4695
|
+
if (aIndex !== bIndex) return aIndex - bIndex;
|
|
4696
|
+
return a.name.localeCompare(b.name, void 0, { sensitivity: "base" });
|
|
4697
|
+
};
|
|
4698
|
+
|
|
4699
|
+
//#endregion
|
|
4700
|
+
//#region src/modules/walletOptionsCatalogue/hasAnyConnectionOption/hasAnyConnectionOption.ts
|
|
4701
|
+
/**
|
|
4702
|
+
* True when the wallet option has at least one connection — i.e. the user
|
|
4703
|
+
* can sign in right now. Install-only wallet options surface in the
|
|
4704
|
+
* catalogue too (they carry `installationUrls`) but have an empty
|
|
4705
|
+
* `connectionOptions` array; this predicate distinguishes them from
|
|
4706
|
+
* actually connectable wallets in the relevance sort.
|
|
4707
|
+
*
|
|
4708
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
4709
|
+
* @returns True when `connectionOptions` is non-empty.
|
|
4710
|
+
* @not-instrumented
|
|
4711
|
+
*/
|
|
4712
|
+
const hasAnyConnectionOption = ({ walletOption }) => walletOption.connectionOptions.length > 0;
|
|
4713
|
+
|
|
4714
|
+
//#endregion
|
|
4715
|
+
//#region src/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.ts
|
|
4716
|
+
/**
|
|
4717
|
+
* True when the wallet option has a `withWalletProvider` connection — i.e.
|
|
4718
|
+
* the user already has the wallet available in the page (browser extension,
|
|
4719
|
+
* Wallet Standard announcement, window injection, or an SDK-backed provider
|
|
4720
|
+
* one of our chain extensions registered). `connectionOptions` is
|
|
4721
|
+
* pre-sorted, so a registered provider always sits at index 0 when present.
|
|
4722
|
+
*
|
|
4723
|
+
* @param params.walletOption - The wallet option to inspect.
|
|
4724
|
+
* @returns True when an installed provider is available.
|
|
4725
|
+
* @not-instrumented
|
|
4726
|
+
*/
|
|
4727
|
+
const hasInstalledProvider = ({ walletOption }) => walletOption.connectionOptions[0]?.type === "withWalletProvider";
|
|
4728
|
+
|
|
4729
|
+
//#endregion
|
|
4730
|
+
//#region src/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.ts
|
|
4731
|
+
/**
|
|
4732
|
+
* Sorts the outer wallet-option list. This is the only ordering controlled
|
|
4733
|
+
* by the customer; the inner `connectionOptions` array of each wallet
|
|
4734
|
+
* option is ordered separately by `sortConnectionOptions` using a fixed
|
|
4735
|
+
* option-type priority.
|
|
4736
|
+
*
|
|
4737
|
+
* - `'relevance'` (default): bucket wallet options into three tiers, in
|
|
4738
|
+
* this order:
|
|
4739
|
+
* 1. **Installed provider** — user already has the wallet available
|
|
4740
|
+
* (`withWalletProvider` at index 0).
|
|
4741
|
+
* 2. **Connectable** — has at least one connection (URI deeplink
|
|
4742
|
+
* or `inAppBrowser`) but no installed provider.
|
|
4743
|
+
* 3. **Install-only** — no connection at all; only `installationUrls`.
|
|
4744
|
+
* Within each tier, rank by the hand-curated {@link PRIORITY_WALLET_KEYS}
|
|
4745
|
+
* list (MetaMask, Coinbase, Phantom, …); unknown wallets fall through to
|
|
4746
|
+
* alphabetical-by-name order at the tail of their tier.
|
|
4747
|
+
* - `'alphabetical'`: case-insensitive sort by wallet option `name`,
|
|
4748
|
+
* without bucketing.
|
|
4749
|
+
*
|
|
4750
|
+
* Returns a new array — the input is not mutated.
|
|
4751
|
+
*
|
|
4752
|
+
* @param params.walletOptions - The wallet options to sort.
|
|
4753
|
+
* @param params.ordering - The requested ordering.
|
|
4754
|
+
* @returns A new array in the requested order.
|
|
4755
|
+
* @not-instrumented
|
|
4756
|
+
*/
|
|
4757
|
+
const sortWalletOptions = ({ walletOptions, ordering }) => {
|
|
4758
|
+
if (ordering === "alphabetical") return [...walletOptions].sort((a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" }));
|
|
4759
|
+
const installed = [];
|
|
4760
|
+
const connectable = [];
|
|
4761
|
+
const installOnly = [];
|
|
4762
|
+
for (const walletOption of walletOptions) if (hasInstalledProvider({ walletOption })) installed.push(walletOption);
|
|
4763
|
+
else if (hasAnyConnectionOption({ walletOption })) connectable.push(walletOption);
|
|
4764
|
+
else installOnly.push(walletOption);
|
|
4765
|
+
installed.sort((a, b) => compareByRelevance({
|
|
4766
|
+
a,
|
|
4767
|
+
b
|
|
4768
|
+
}));
|
|
4769
|
+
connectable.sort((a, b) => compareByRelevance({
|
|
4770
|
+
a,
|
|
4771
|
+
b
|
|
4772
|
+
}));
|
|
4773
|
+
installOnly.sort((a, b) => compareByRelevance({
|
|
4774
|
+
a,
|
|
4775
|
+
b
|
|
4776
|
+
}));
|
|
4777
|
+
return [
|
|
4778
|
+
...installed,
|
|
4779
|
+
...connectable,
|
|
4780
|
+
...installOnly
|
|
4781
|
+
];
|
|
4782
|
+
};
|
|
4783
|
+
|
|
4784
|
+
//#endregion
|
|
4785
|
+
//#region src/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.ts
|
|
4786
|
+
const EMPTY_WALLET_BOOK = {
|
|
4787
|
+
groups: {},
|
|
4788
|
+
wallets: {}
|
|
4789
|
+
};
|
|
4790
|
+
/**
|
|
4791
|
+
* Returns the catalogue of external wallet options a user can sign in
|
|
4792
|
+
* with through this client. Always includes installed wallet providers;
|
|
4793
|
+
* pass `includeMobileOptions: true` to additionally surface
|
|
4794
|
+
* WalletConnect, in-app-browser, and install links.
|
|
4795
|
+
*
|
|
4796
|
+
* @param [params] - Inclusion flag + ordering preference.
|
|
4797
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4798
|
+
* @returns A promise that resolves to the wallet options catalogue.
|
|
4799
|
+
* @not-instrumented
|
|
4800
|
+
*/
|
|
4801
|
+
const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
|
|
4802
|
+
const includeMobileOptions = params.includeMobileOptions ?? false;
|
|
4803
|
+
const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
|
|
4804
|
+
const walletBook = includeMobileOptions ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
|
|
4805
|
+
const allConnectionOptions = [];
|
|
4806
|
+
const entries = getWalletProviderRegistry(client).listProviderEntries();
|
|
4807
|
+
allConnectionOptions.push(...buildWithWalletProviderOptions({
|
|
4808
|
+
entries,
|
|
4809
|
+
walletBook
|
|
4810
|
+
}, client));
|
|
4811
|
+
if (includeMobileOptions) allConnectionOptions.push(...buildUriDeeplinkOptions({ walletBook }), ...buildInAppBrowserOptions({ walletBook }));
|
|
4812
|
+
const installationUrlsByKey = includeMobileOptions ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
|
|
4813
|
+
const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
|
|
4814
|
+
const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
|
|
4815
|
+
const walletOptions = [];
|
|
4816
|
+
for (const walletOptionKey of allWalletOptionKeys) {
|
|
4817
|
+
if (EXCLUDED_WALLET_OPTION_KEYS.has(walletOptionKey)) continue;
|
|
4818
|
+
const groupedEntry = grouped.get(walletOptionKey);
|
|
4819
|
+
const connectionOptions = groupedEntry ? sortConnectionOptions({ options: groupedEntry.connectionOptions }) : [];
|
|
4820
|
+
walletOptions.push(buildWalletOption({
|
|
4821
|
+
connectionOptions,
|
|
4822
|
+
displayOverride: groupedEntry?.displayOverride,
|
|
4823
|
+
installationUrls: installationUrlsByKey.get(walletOptionKey),
|
|
4824
|
+
walletBook,
|
|
4825
|
+
walletOptionKey
|
|
4826
|
+
}));
|
|
4827
|
+
}
|
|
4828
|
+
return sortWalletOptions({
|
|
4829
|
+
ordering: walletOptionOrdering,
|
|
4830
|
+
walletOptions
|
|
4831
|
+
});
|
|
4832
|
+
};
|
|
4833
|
+
|
|
3894
4834
|
//#endregion
|
|
3895
4835
|
//#region src/modules/user/updateUser/updateUser.ts
|
|
3896
4836
|
/**
|
|
@@ -4149,6 +5089,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4149
5089
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4150
5090
|
* @returns A promise that resolves to the newly generated recovery codes.
|
|
4151
5091
|
* @instrumented
|
|
5092
|
+
* @redact-params
|
|
4152
5093
|
*/
|
|
4153
5094
|
const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
4154
5095
|
const core = getCore(client);
|
|
@@ -4164,7 +5105,8 @@ const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
|
4164
5105
|
} catch {
|
|
4165
5106
|
return;
|
|
4166
5107
|
}
|
|
4167
|
-
}
|
|
5108
|
+
},
|
|
5109
|
+
redactAll: true
|
|
4168
5110
|
});
|
|
4169
5111
|
|
|
4170
5112
|
//#endregion
|
|
@@ -5391,6 +6333,7 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
5391
6333
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5392
6334
|
* @returns A promise that resolves to the verify response object upon successful verification.
|
|
5393
6335
|
* @instrumented
|
|
6336
|
+
* @redact-params
|
|
5394
6337
|
*/
|
|
5395
6338
|
const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }, client = getDefaultClient()) => {
|
|
5396
6339
|
let response;
|
|
@@ -5416,7 +6359,8 @@ const __verifyOTP_wrapped = instrumentFunction({
|
|
|
5416
6359
|
} catch {
|
|
5417
6360
|
return;
|
|
5418
6361
|
}
|
|
5419
|
-
}
|
|
6362
|
+
},
|
|
6363
|
+
redactAll: true
|
|
5420
6364
|
});
|
|
5421
6365
|
|
|
5422
6366
|
//#endregion
|
|
@@ -5840,13 +6784,12 @@ const getAddressesWithTypesFromConnectionResult = (connectionResult) => {
|
|
|
5840
6784
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5841
6785
|
* @returns A promise that resolves to the connected wallet account.
|
|
5842
6786
|
* @throws NoAddressFoundError If the request to connect was successful but no address is connected to your app.
|
|
5843
|
-
*
|
|
6787
|
+
* @instrumented
|
|
5844
6788
|
*/
|
|
5845
6789
|
const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWalletAccounts = true, hardwareWalletVendor }, client = getDefaultClient()) => {
|
|
5846
6790
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
5847
6791
|
assertWalletProviderMethodDefined(walletProvider, "connect");
|
|
5848
6792
|
const { addresses } = await walletProvider.connect();
|
|
5849
|
-
const currentAddresses = getWalletAccounts(client).map(({ address }) => address);
|
|
5850
6793
|
const mainAddress = addresses?.length ? addresses[0].address : null;
|
|
5851
6794
|
/**
|
|
5852
6795
|
* This error is thrown in case the wallet has no addresses connected
|
|
@@ -5854,27 +6797,25 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
5854
6797
|
* user on the next steps.
|
|
5855
6798
|
*/
|
|
5856
6799
|
if (!mainAddress) throw new NoAddressFoundError();
|
|
5857
|
-
const
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
chain: walletProvider.chain,
|
|
5861
|
-
hardwareWalletVendor,
|
|
5862
|
-
id: formatWalletAccountId({
|
|
6800
|
+
const [reconciledWalletAccount] = reconcileWalletAccountsAgainstClient({
|
|
6801
|
+
addToDynamicWalletAccounts,
|
|
6802
|
+
walletAccounts: [{
|
|
5863
6803
|
address: mainAddress,
|
|
6804
|
+
addressesWithTypes: getAddressesWithTypesFromConnectionResult({ addresses }),
|
|
5864
6805
|
chain: walletProvider.chain,
|
|
6806
|
+
hardwareWalletVendor,
|
|
6807
|
+
id: formatWalletAccountId({
|
|
6808
|
+
address: mainAddress,
|
|
6809
|
+
chain: walletProvider.chain,
|
|
6810
|
+
walletProviderKey
|
|
6811
|
+
}),
|
|
6812
|
+
lastSelectedAt: null,
|
|
6813
|
+
verifiedCredentialId: null,
|
|
5865
6814
|
walletProviderKey
|
|
5866
|
-
}
|
|
5867
|
-
lastSelectedAt: null,
|
|
5868
|
-
verifiedCredentialId: null,
|
|
6815
|
+
}],
|
|
5869
6816
|
walletProviderKey
|
|
5870
|
-
};
|
|
5871
|
-
|
|
5872
|
-
if (addToDynamicWalletAccounts) {
|
|
5873
|
-
setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
|
|
5874
|
-
emitWalletAccountsChangedEvent(client);
|
|
5875
|
-
createVisit({ walletAccount }, client);
|
|
5876
|
-
}
|
|
5877
|
-
return walletAccount;
|
|
6817
|
+
}, client);
|
|
6818
|
+
return reconciledWalletAccount;
|
|
5878
6819
|
};
|
|
5879
6820
|
const __connectWithWalletProvider_impl = connectWithWalletProvider;
|
|
5880
6821
|
const __connectWithWalletProvider_wrapped = instrumentFunction({
|
|
@@ -6805,5 +7746,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
6805
7746
|
assertPackageVersion(name, version);
|
|
6806
7747
|
|
|
6807
7748
|
//#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 };
|
|
7749
|
+
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, appendConnectionUriToDeeplink, 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
7750
|
//# sourceMappingURL=index.native.esm.js.map
|