@dynamic-labs-sdk/client 1.3.0 → 1.5.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-DQvZQdQ9.cjs → InvalidParamError-DKJhDrK8.cjs} +1056 -110
- package/dist/InvalidParamError-DKJhDrK8.cjs.map +1 -0
- package/dist/{InvalidParamError-Za4cvW7K.esm.js → InvalidParamError-DWjMfOZ5.esm.js} +852 -95
- package/dist/InvalidParamError-DWjMfOZ5.esm.js.map +1 -0
- package/dist/{InvalidParamError-9kQBK3sP.native.esm.js → InvalidParamError-DkAMYJOW.native.esm.js} +885 -95
- package/dist/InvalidParamError-DkAMYJOW.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-By3Y4taq.esm.js → NotWaasWalletAccountError-BVrvQzLz.native.esm.js} +7 -5
- package/dist/NotWaasWalletAccountError-BVrvQzLz.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BTMvHTA8.native.esm.js → NotWaasWalletAccountError-C7NUlvvM.esm.js} +7 -5
- package/dist/NotWaasWalletAccountError-C7NUlvvM.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-Ciq7b-Y6.cjs → NotWaasWalletAccountError-CHzpa9kk.cjs} +7 -5
- package/dist/NotWaasWalletAccountError-CHzpa9kk.cjs.map +1 -0
- package/dist/core.cjs +46 -23
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +29 -8
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +27 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +6 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +14 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BA0CHZzu.cjs → getNetworkProviderFromNetworkId-BJ27N-7S.cjs} +113 -348
- package/dist/getNetworkProviderFromNetworkId-BJ27N-7S.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js → getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js} +106 -311
- package/dist/getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-RWcIZDgC.esm.js → getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js} +110 -282
- package/dist/getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js.map +1 -0
- package/dist/{getSignedSessionId-la6RXITX.esm.js → getSignedSessionId-CDdKrnw6.esm.js} +3 -3
- package/dist/{getSignedSessionId-la6RXITX.esm.js.map → getSignedSessionId-CDdKrnw6.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BCU987hO.cjs → getSignedSessionId-CHDHr-hY.cjs} +3 -3
- package/dist/{getSignedSessionId-BCU987hO.cjs.map → getSignedSessionId-CHDHr-hY.cjs.map} +1 -1
- package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js → getSignedSessionId-D3KQrN8W.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js.map → getSignedSessionId-D3KQrN8W.native.esm.js.map} +1 -1
- package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs +346 -0
- package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs.map +1 -0
- package/dist/index.cjs +754 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +687 -260
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +684 -257
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-C1u4Z__n.esm.js → isMfaRequiredForAction-B0xNvBpU.native.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-B0xNvBpU.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-CMClgbT0.cjs → isMfaRequiredForAction-CLMvTTwl.cjs} +5 -3
- package/dist/isMfaRequiredForAction-CLMvTTwl.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-DSX-TV2z.native.esm.js → isMfaRequiredForAction-C_QPI1LH.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-C_QPI1LH.esm.js.map +1 -0
- package/dist/modules/apiClient/apiClient.types.d.ts +12 -0
- package/dist/modules/apiClient/apiClient.types.d.ts.map +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts +27 -0
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts.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/isSignedIn/isSignedIn.d.ts +11 -1
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
- package/dist/modules/auth/logoutReason.d.ts +1 -1
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.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 +9 -45
- package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +13 -20
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
- package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts +26 -0
- package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts.map +1 -0
- package/dist/modules/balances/getMultichainTokenBalances/index.d.ts +2 -0
- package/dist/modules/balances/getMultichainTokenBalances/index.d.ts.map +1 -0
- package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts +56 -0
- package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts.map +1 -0
- package/dist/modules/balances/getTokenBalances/index.d.ts +3 -0
- package/dist/modules/balances/getTokenBalances/index.d.ts.map +1 -0
- 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.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/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
- package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts +14 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts +2 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts +15 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts +2 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/moonpay.types.d.ts +26 -0
- package/dist/modules/funding/moonpay/moonpay.types.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts +12 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts +26 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts +18 -0
- package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts +2 -2
- package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts.map +1 -1
- 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/swap/executeSwapTransaction/executeSwapTransaction.d.ts +13 -1
- package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.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/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +8 -5
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +11 -4
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts +35 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +9 -14
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +34 -35
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
- 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/constants.d.ts +7 -0
- package/dist/modules/wallets/constants.d.ts.map +1 -1
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts.map +1 -1
- package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts +26 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts.map +1 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts +2 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts.map +1 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts +2 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts.map +1 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +14 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts.map +1 -0
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +6 -17
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +24 -0
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -0
- package/dist/modules/wallets/networks/getNativeBalance/index.d.ts +2 -0
- package/dist/modules/wallets/networks/getNativeBalance/index.d.ts.map +1 -0
- 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/walletProvider/walletProvider.types.d.ts +10 -0
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
- 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/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts +22 -0
- package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts.map +1 -0
- package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts +2 -0
- package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts.map +1 -0
- package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts +18 -0
- package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts.map +1 -0
- package/dist/utils/getNativeLinkScheme/index.d.ts +3 -0
- package/dist/utils/getNativeLinkScheme/index.d.ts.map +1 -0
- package/dist/utils/isMobile/isMobile.d.ts +8 -0
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/waas.cjs +8 -9
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +3 -3
- package/dist/waasCore.cjs +3 -4
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +4 -4
- package/dist/InvalidParamError-9kQBK3sP.native.esm.js.map +0 -1
- package/dist/InvalidParamError-DQvZQdQ9.cjs.map +0 -1
- package/dist/InvalidParamError-Za4cvW7K.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-By3Y4taq.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-Ciq7b-Y6.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs +0 -887
- package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-C1u4Z__n.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-CMClgbT0.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-DSX-TV2z.native.esm.js.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { A as
|
|
3
|
-
import {
|
|
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 { $ as instrumentFunction, A as splitWalletProviderKey, D as CHAINS_INFO_MAP, E as getChainFromVerifiedCredentialChain, F as onEvent, G as LinkCredentialError, H as SandboxMaximumThresholdReachedError, I as onceEvent, K as InvalidExternalAuthError, M as retryOnFail, N as emitEvent, O as formatWalletAccountId, P as offEvent, Q as __getElevatedAccessToken_wrapped, S as getWalletAccounts, U as MfaRateLimitedError, V as getNonce, W as MfaInvalidOtpError, X as assertDefined, Y as isCookieEnabled, Z as ValueMustBeDefinedError, _ as generateSessionKeys, a as DYNAMIC_ICONIC_SPRITE_URL, b as createLocalStorageAdapter, c as createApiClient, ct as getDefaultClient, dt as BaseError, et as scrubParameters, f as getWalletProviderFromWalletAccount, ft as getCore, g as NoWalletProviderFoundError, it as randomString, k as normalizeAddress, l as UnauthorizedError, lt as setDefaultClient, m as getWalletProviderRegistry, mt as version, nt as getUserAgent, o as SDK_API_CORE_VERSION, p as WalletProviderPriority, pt as name, q as APIError, rt as extractSessionId, s as fetchAndStoreNonces, st as NONCE_POOL_SIZE, t as InvalidParamError, tt as DEFAULT_PII_FIELDS, u as __logoutWithReason_wrapped, v as fetchProjectSettings, x as isSignedIn, y as createStorageKeySchema } from "./InvalidParamError-DkAMYJOW.native.esm.js";
|
|
2
|
+
import { A as FETCH_PROJECT_SETTINGS_TRACKER_KEY, C as createKeychainService, E as createCrossTabBroadcast, F as isServerSideRendering, I as getBuffer, L as subscribeWithSelector, 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 isEqualShallow, S as createRealtimeService, T as createLogger, _ 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, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError, z as createStorage } from "./getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js";
|
|
3
|
+
import { a as parseElevatedAccessToken, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, i as upsertElevatedAccessToken, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders } from "./getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js";
|
|
4
|
+
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BVrvQzLz.native.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-B0xNvBpU.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";
|
|
@@ -26,11 +26,33 @@ const stateChangeEvents = {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
//#region src/utils/
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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;
|
|
34
56
|
};
|
|
35
57
|
|
|
36
58
|
//#endregion
|
|
@@ -50,6 +72,14 @@ const createRuntimeServices = () => {
|
|
|
50
72
|
};
|
|
51
73
|
};
|
|
52
74
|
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
|
|
77
|
+
/** @not-instrumented */
|
|
78
|
+
const prefetchNoncesIfNeeded = async (client) => {
|
|
79
|
+
if (getCore(client).state.get().prefetchedNonces.length >= NONCE_POOL_SIZE) return;
|
|
80
|
+
await fetchAndStoreNonces(client);
|
|
81
|
+
};
|
|
82
|
+
|
|
53
83
|
//#endregion
|
|
54
84
|
//#region src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts
|
|
55
85
|
/**
|
|
@@ -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,22 +2402,30 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2362
2402
|
} catch {
|
|
2363
2403
|
return;
|
|
2364
2404
|
}
|
|
2365
|
-
}
|
|
2405
|
+
},
|
|
2406
|
+
redactAll: true
|
|
2366
2407
|
});
|
|
2367
2408
|
|
|
2368
2409
|
//#endregion
|
|
2369
|
-
//#region src/modules/balances/
|
|
2410
|
+
//#region src/modules/balances/getTokenBalances/getTokenBalances.ts
|
|
2370
2411
|
/**
|
|
2371
|
-
* Retrieves the token balances for a wallet account.
|
|
2412
|
+
* Retrieves the token balances for a wallet account on one chain. Fetched
|
|
2413
|
+
* from the Dynamic API.
|
|
2414
|
+
*
|
|
2415
|
+
* Use this for ERC-20-style token balances scoped to a single wallet
|
|
2416
|
+
* account. Supports optional spam filtering, price inclusion, native-token
|
|
2417
|
+
* inclusion, and one-or-many networks within the wallet's chain.
|
|
2372
2418
|
*
|
|
2373
|
-
*
|
|
2419
|
+
* For native-only balance, use {@link getNativeBalance}. For a
|
|
2420
|
+
* multi-chain portfolio across many addresses, use
|
|
2421
|
+
* {@link getMultichainTokenBalances}.
|
|
2374
2422
|
*
|
|
2375
2423
|
* @param params.walletAccount - The wallet account to get the balances for.
|
|
2376
2424
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2377
2425
|
* @returns A promise that resolves to an array of token balances.
|
|
2378
2426
|
* @not-instrumented
|
|
2379
2427
|
*/
|
|
2380
|
-
const
|
|
2428
|
+
const getTokenBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2381
2429
|
const core = getCore(client);
|
|
2382
2430
|
const apiClient = createApiClient({}, client);
|
|
2383
2431
|
if (!networkId && !networkIds) {
|
|
@@ -2399,19 +2447,22 @@ const getBalances = async ({ walletAccount, networkId, networkIds, includePrices
|
|
|
2399
2447
|
};
|
|
2400
2448
|
|
|
2401
2449
|
//#endregion
|
|
2402
|
-
//#region src/modules/balances/
|
|
2450
|
+
//#region src/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.ts
|
|
2403
2451
|
/**
|
|
2404
|
-
* Retrieves token balances across multiple
|
|
2452
|
+
* Retrieves token balances across multiple chains, networks, and addresses
|
|
2453
|
+
* in a single batched API request.
|
|
2405
2454
|
*
|
|
2406
|
-
*
|
|
2407
|
-
*
|
|
2455
|
+
* Use this for portfolio-style views that need to render a user's holdings
|
|
2456
|
+
* across their entire multi-chain wallet set. For a single account on one
|
|
2457
|
+
* chain, use {@link getTokenBalances}; for native-only balance, use
|
|
2458
|
+
* {@link getNativeBalance}.
|
|
2408
2459
|
*
|
|
2409
2460
|
* @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
|
|
2410
2461
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2411
2462
|
* @returns A promise that resolves to the chain balances across multiple networks.
|
|
2412
2463
|
* @not-instrumented
|
|
2413
2464
|
*/
|
|
2414
|
-
const
|
|
2465
|
+
const getMultichainTokenBalances = async ({ balanceRequest }, client = getDefaultClient()) => {
|
|
2415
2466
|
const core = getCore(client);
|
|
2416
2467
|
return (await createApiClient({}, client).postMultichainAccountBalances({
|
|
2417
2468
|
environmentId: core.environmentId,
|
|
@@ -2444,6 +2495,52 @@ const createCheckoutApiClient = async ({ transactionId }, client) => {
|
|
|
2444
2495
|
};
|
|
2445
2496
|
};
|
|
2446
2497
|
|
|
2498
|
+
//#endregion
|
|
2499
|
+
//#region src/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.ts
|
|
2500
|
+
/**
|
|
2501
|
+
* Removes the locally stored checkout session token for the given transaction.
|
|
2502
|
+
*
|
|
2503
|
+
* The checkout session token is the anonymous credential that authorizes
|
|
2504
|
+
* mutations to a single in-flight checkout transaction. Once the transaction
|
|
2505
|
+
* has reached a terminal state (cancelled, expired, failed, completed) it can
|
|
2506
|
+
* no longer be advanced, and the token is dead weight that should not be
|
|
2507
|
+
* persisted in browser storage — leaving it around lets a later XSS payload
|
|
2508
|
+
* exfiltrate a credential with no further use, and it can also confuse the
|
|
2509
|
+
* SDK on subsequent loads into believing an active session exists.
|
|
2510
|
+
*
|
|
2511
|
+
* The server-side revocation lives in dashboard-api; this is the SDK-side
|
|
2512
|
+
* defense-in-depth.
|
|
2513
|
+
*
|
|
2514
|
+
* @not-instrumented
|
|
2515
|
+
*/
|
|
2516
|
+
const clearCheckoutSessionToken = async ({ transactionId }, client) => {
|
|
2517
|
+
await getCore(client).storage.removeItem(createCheckoutSessionTokenStorageKey(transactionId));
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
//#endregion
|
|
2521
|
+
//#region src/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.ts
|
|
2522
|
+
/**
|
|
2523
|
+
* Checkout mutation routes are guarded server-side only by session-token
|
|
2524
|
+
* validation, so a 401 means the token is dead (revoked, expired, deleted,
|
|
2525
|
+
* or invalid). Leaving a dead token in `localStorage` widens the XSS
|
|
2526
|
+
* exfiltration surface for no benefit and makes the next SDK load attempt
|
|
2527
|
+
* requests that are guaranteed to fail.
|
|
2528
|
+
*
|
|
2529
|
+
* @not-instrumented
|
|
2530
|
+
*/
|
|
2531
|
+
const withCheckoutSessionTokenCleanupOn401 = async ({ call, transactionId }, client) => {
|
|
2532
|
+
try {
|
|
2533
|
+
return await call();
|
|
2534
|
+
} catch (error) {
|
|
2535
|
+
if (error instanceof APIError && error.status === 401) try {
|
|
2536
|
+
await clearCheckoutSessionToken({ transactionId }, client);
|
|
2537
|
+
} catch (cleanupError) {
|
|
2538
|
+
getCore(client).logger.error("Failed to clear checkout session token after 401", cleanupError);
|
|
2539
|
+
}
|
|
2540
|
+
throw error;
|
|
2541
|
+
}
|
|
2542
|
+
};
|
|
2543
|
+
|
|
2447
2544
|
//#endregion
|
|
2448
2545
|
//#region src/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.ts
|
|
2449
2546
|
/**
|
|
@@ -2468,12 +2565,15 @@ const attachCheckoutTransactionSource = async (params, client = getDefaultClient
|
|
|
2468
2565
|
attachSourceRequest.fromChainId = params.fromChainId;
|
|
2469
2566
|
attachSourceRequest.fromChainName = params.fromChainName;
|
|
2470
2567
|
}
|
|
2471
|
-
return
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2568
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2569
|
+
call: () => apiClient.attachSource({
|
|
2570
|
+
attachSourceRequest,
|
|
2571
|
+
environmentId,
|
|
2572
|
+
transactionId,
|
|
2573
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2574
|
+
}),
|
|
2575
|
+
transactionId
|
|
2576
|
+
}, client);
|
|
2477
2577
|
};
|
|
2478
2578
|
const __attachCheckoutTransactionSource_impl = attachCheckoutTransactionSource;
|
|
2479
2579
|
const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
@@ -2504,12 +2604,15 @@ const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
|
2504
2604
|
*/
|
|
2505
2605
|
const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client = getDefaultClient()) => {
|
|
2506
2606
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2507
|
-
return
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2607
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2608
|
+
call: () => apiClient.recordCheckoutBroadcast({
|
|
2609
|
+
environmentId,
|
|
2610
|
+
recordBroadcastRequest: { txHash },
|
|
2611
|
+
transactionId,
|
|
2612
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2613
|
+
}),
|
|
2614
|
+
transactionId
|
|
2615
|
+
}, client);
|
|
2513
2616
|
};
|
|
2514
2617
|
const __broadcastCheckoutTransaction_impl = broadcastCheckoutTransaction;
|
|
2515
2618
|
const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
@@ -2536,12 +2639,15 @@ const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2536
2639
|
*/
|
|
2537
2640
|
const cancelCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
|
|
2538
2641
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2539
|
-
const result = await
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2642
|
+
const result = await withCheckoutSessionTokenCleanupOn401({
|
|
2643
|
+
call: () => apiClient.cancelCheckoutTransaction({
|
|
2644
|
+
environmentId,
|
|
2645
|
+
transactionId,
|
|
2646
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2647
|
+
}),
|
|
2648
|
+
transactionId
|
|
2649
|
+
}, client);
|
|
2650
|
+
await clearCheckoutSessionToken({ transactionId }, client);
|
|
2545
2651
|
return result;
|
|
2546
2652
|
};
|
|
2547
2653
|
const __cancelCheckoutTransaction_impl = cancelCheckoutTransaction;
|
|
@@ -2642,16 +2748,19 @@ const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClie
|
|
|
2642
2748
|
*/
|
|
2643
2749
|
const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slippage, transactionId }, client = getDefaultClient()) => {
|
|
2644
2750
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2645
|
-
return
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2751
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2752
|
+
call: () => apiClient.quoteCheckoutTransaction({
|
|
2753
|
+
environmentId,
|
|
2754
|
+
quoteRequest: {
|
|
2755
|
+
fromChainId,
|
|
2756
|
+
fromTokenAddress,
|
|
2757
|
+
slippage
|
|
2758
|
+
},
|
|
2759
|
+
transactionId,
|
|
2760
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2761
|
+
}),
|
|
2762
|
+
transactionId
|
|
2763
|
+
}, client);
|
|
2655
2764
|
};
|
|
2656
2765
|
|
|
2657
2766
|
//#endregion
|
|
@@ -2668,15 +2777,18 @@ const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slip
|
|
|
2668
2777
|
*/
|
|
2669
2778
|
const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalanceForTransferAmount, transactionId }, client = getDefaultClient()) => {
|
|
2670
2779
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
2671
|
-
return
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2780
|
+
return withCheckoutSessionTokenCleanupOn401({
|
|
2781
|
+
call: () => apiClient.prepareCheckoutTransaction({
|
|
2782
|
+
environmentId,
|
|
2783
|
+
prepareSigningRequest: {
|
|
2784
|
+
assertBalanceForGasCost: assertBalanceForGasCost ?? false,
|
|
2785
|
+
assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? false
|
|
2786
|
+
},
|
|
2787
|
+
transactionId,
|
|
2788
|
+
xDynamicCheckoutSessionToken: sessionToken
|
|
2789
|
+
}),
|
|
2790
|
+
transactionId
|
|
2791
|
+
}, client);
|
|
2680
2792
|
};
|
|
2681
2793
|
const __prepareCheckoutTransaction_impl = prepareCheckoutTransaction;
|
|
2682
2794
|
const __prepareCheckoutTransaction_wrapped = instrumentFunction({
|
|
@@ -2765,7 +2877,7 @@ const ensureCorrectActiveNetwork = async ({ requiredNetworkId, walletProvider },
|
|
|
2765
2877
|
* @returns The transaction hash.
|
|
2766
2878
|
* @instrumented
|
|
2767
2879
|
*/
|
|
2768
|
-
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = getDefaultClient()) => {
|
|
2880
|
+
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange, sponsorshipMode }, client = getDefaultClient()) => {
|
|
2769
2881
|
if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
|
|
2770
2882
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
2771
2883
|
assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
|
|
@@ -2776,6 +2888,7 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
|
|
|
2776
2888
|
const { transactionHash } = await walletProvider.executeSwapTransaction({
|
|
2777
2889
|
onStepChange,
|
|
2778
2890
|
signingPayload,
|
|
2891
|
+
sponsorshipMode,
|
|
2779
2892
|
walletAccount
|
|
2780
2893
|
});
|
|
2781
2894
|
return { transactionHash };
|
|
@@ -2960,7 +3073,7 @@ const detectDeviceRegistrationRedirect = ({ url }) => {
|
|
|
2960
3073
|
/** @not-instrumented */
|
|
2961
3074
|
const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
2962
3075
|
const core = getCore(client);
|
|
2963
|
-
const apiClient = createApiClient({}, client);
|
|
3076
|
+
const apiClient = createApiClient({ skipSessionExpiryLogout: true }, client);
|
|
2964
3077
|
try {
|
|
2965
3078
|
return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
|
|
2966
3079
|
} catch (error) {
|
|
@@ -3239,6 +3352,115 @@ const __createCryptoDotComPayment_wrapped = instrumentFunction({
|
|
|
3239
3352
|
}
|
|
3240
3353
|
});
|
|
3241
3354
|
|
|
3355
|
+
//#endregion
|
|
3356
|
+
//#region src/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.ts
|
|
3357
|
+
/**
|
|
3358
|
+
* Fetches the list of crypto currencies supported by MoonPay for the given chain
|
|
3359
|
+
* and network, filtered to active currencies only. Requires a MoonPay publishable
|
|
3360
|
+
* API key to be configured for the environment.
|
|
3361
|
+
*
|
|
3362
|
+
* @param params - The chain and optional network ID to filter currencies by.
|
|
3363
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3364
|
+
* @returns An array of supported MoonPay currencies.
|
|
3365
|
+
* @instrumented
|
|
3366
|
+
*/
|
|
3367
|
+
const getMoonPayCurrencies = async (params, client = getDefaultClient()) => {
|
|
3368
|
+
const core = getCore(client);
|
|
3369
|
+
return (await createApiClient({ includeMfaToken: true }, client).getMoonPayCurrencies({
|
|
3370
|
+
chain: params.chain,
|
|
3371
|
+
environmentId: core.environmentId,
|
|
3372
|
+
...params.networkId ? { networkId: params.networkId } : {}
|
|
3373
|
+
})).currencies ?? [];
|
|
3374
|
+
};
|
|
3375
|
+
const __getMoonPayCurrencies_impl = getMoonPayCurrencies;
|
|
3376
|
+
const __getMoonPayCurrencies_wrapped = instrumentFunction({
|
|
3377
|
+
fn: __getMoonPayCurrencies_impl,
|
|
3378
|
+
functionName: "getMoonPayCurrencies",
|
|
3379
|
+
getCore: () => {
|
|
3380
|
+
try {
|
|
3381
|
+
return getCore(getDefaultClient());
|
|
3382
|
+
} catch {
|
|
3383
|
+
return;
|
|
3384
|
+
}
|
|
3385
|
+
}
|
|
3386
|
+
});
|
|
3387
|
+
|
|
3388
|
+
//#endregion
|
|
3389
|
+
//#region src/modules/funding/moonpay/errors/MoonPayInvalidUrlError.ts
|
|
3390
|
+
var MoonPayInvalidUrlError = class extends BaseError {
|
|
3391
|
+
constructor() {
|
|
3392
|
+
super({
|
|
3393
|
+
cause: null,
|
|
3394
|
+
code: "moonpay_invalid_url_error",
|
|
3395
|
+
docsUrl: null,
|
|
3396
|
+
name: "MoonPayInvalidUrlError",
|
|
3397
|
+
shortMessage: "MoonPay is configured but returned an invalid or untrusted URL. This may indicate a misconfiguration — please contact support if the issue persists."
|
|
3398
|
+
});
|
|
3399
|
+
}
|
|
3400
|
+
};
|
|
3401
|
+
|
|
3402
|
+
//#endregion
|
|
3403
|
+
//#region src/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.ts
|
|
3404
|
+
var MoonPayProviderNotAvailableError = class extends BaseError {
|
|
3405
|
+
constructor() {
|
|
3406
|
+
super({
|
|
3407
|
+
cause: null,
|
|
3408
|
+
code: "moonpay_provider_not_available_error",
|
|
3409
|
+
docsUrl: null,
|
|
3410
|
+
name: "MoonPayProviderNotAvailableError",
|
|
3411
|
+
shortMessage: "MoonPay provider not available. Ensure MoonPay is enabled and a publishable API key is configured in the Dynamic dashboard."
|
|
3412
|
+
});
|
|
3413
|
+
}
|
|
3414
|
+
};
|
|
3415
|
+
|
|
3416
|
+
//#endregion
|
|
3417
|
+
//#region src/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.ts
|
|
3418
|
+
/**
|
|
3419
|
+
* Returns the signed MoonPay URL for the given wallet and token.
|
|
3420
|
+
*
|
|
3421
|
+
* Uses the Dynamic onramp API to retrieve the pre-signed URL that can be
|
|
3422
|
+
* opened in a browser tab to allow the user to purchase crypto via MoonPay.
|
|
3423
|
+
*
|
|
3424
|
+
* @param params - Parameters including chain, wallet address, and optional token/currency filters.
|
|
3425
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3426
|
+
* @returns The signed MoonPay URL.
|
|
3427
|
+
* @instrumented
|
|
3428
|
+
*/
|
|
3429
|
+
const getMoonPayUrl = async (params, client = getDefaultClient()) => {
|
|
3430
|
+
const core = getCore(client);
|
|
3431
|
+
const moonPayProvider = (await createApiClient({ includeMfaToken: true }, client).getSupportedOnramps({
|
|
3432
|
+
chain: params.chain,
|
|
3433
|
+
currency: params.currency,
|
|
3434
|
+
environmentId: core.environmentId,
|
|
3435
|
+
includeDisabled: true,
|
|
3436
|
+
merchantName: params.merchantName,
|
|
3437
|
+
networkId: params.networkId,
|
|
3438
|
+
token: params.token,
|
|
3439
|
+
tokenAmount: params.tokenAmount,
|
|
3440
|
+
walletAddress: params.walletAddress
|
|
3441
|
+
})).onramps?.find((provider) => provider.provider === ProviderEnum.MoonPay);
|
|
3442
|
+
if (!moonPayProvider?.url) throw new MoonPayProviderNotAvailableError();
|
|
3443
|
+
const parsedUrl = new URL(moonPayProvider.url);
|
|
3444
|
+
const isValidHost = parsedUrl.hostname === "moonpay.com" || parsedUrl.hostname.endsWith(".moonpay.com");
|
|
3445
|
+
if (parsedUrl.protocol !== "https:" || !isValidHost) {
|
|
3446
|
+
core.logger.error("[getMoonPayUrl] Invalid URL returned by onramp API", { url: moonPayProvider.url });
|
|
3447
|
+
throw new MoonPayInvalidUrlError();
|
|
3448
|
+
}
|
|
3449
|
+
return moonPayProvider.url;
|
|
3450
|
+
};
|
|
3451
|
+
const __getMoonPayUrl_impl = getMoonPayUrl;
|
|
3452
|
+
const __getMoonPayUrl_wrapped = instrumentFunction({
|
|
3453
|
+
fn: __getMoonPayUrl_impl,
|
|
3454
|
+
functionName: "getMoonPayUrl",
|
|
3455
|
+
getCore: () => {
|
|
3456
|
+
try {
|
|
3457
|
+
return getCore(getDefaultClient());
|
|
3458
|
+
} catch {
|
|
3459
|
+
return;
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
});
|
|
3463
|
+
|
|
3242
3464
|
//#endregion
|
|
3243
3465
|
//#region src/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.ts
|
|
3244
3466
|
/**
|
|
@@ -3556,30 +3778,39 @@ const transformGroup = ({ group }) => {
|
|
|
3556
3778
|
};
|
|
3557
3779
|
|
|
3558
3780
|
//#endregion
|
|
3559
|
-
//#region src/
|
|
3781
|
+
//#region src/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.ts
|
|
3560
3782
|
/**
|
|
3561
|
-
*
|
|
3783
|
+
* Resolves a wallet-book chain identifier (as found in
|
|
3784
|
+
* `injectedConfig[].chain` or as an alias embedded in a wallet key) to a
|
|
3785
|
+
* {@link Chain}. Looks up by `apiChainName` first, then by any
|
|
3786
|
+
* `legacyWalletBookAliases` declared on the corresponding `CHAINS_INFO_MAP`
|
|
3787
|
+
* entry.
|
|
3788
|
+
*
|
|
3789
|
+
* Returns `undefined` when the identifier doesn't match any known chain,
|
|
3790
|
+
* letting the caller pick its own fallback (e.g. defaulting to EVM, or
|
|
3791
|
+
* trying a different lookup strategy).
|
|
3792
|
+
*
|
|
3793
|
+
* Centralised here rather than in `legacyWalletBook` so all chain naming
|
|
3794
|
+
* knowledge stays alongside `CHAINS_INFO_MAP`.
|
|
3562
3795
|
* @not-instrumented
|
|
3563
3796
|
*/
|
|
3564
|
-
const
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
eclipse: "ECLIPSE",
|
|
3571
|
-
evm: "EVM",
|
|
3572
|
-
flow: "FLOW",
|
|
3573
|
-
sol: "SOL",
|
|
3574
|
-
spark: "SPARK",
|
|
3575
|
-
starknet: "STARK",
|
|
3576
|
-
sui: "SUI",
|
|
3577
|
-
ton: "TON",
|
|
3578
|
-
tron: "TRON"
|
|
3797
|
+
const getChainFromWalletBookIdentifier = ({ identifier }) => {
|
|
3798
|
+
const normalised = identifier.toLowerCase();
|
|
3799
|
+
return Object.keys(CHAINS_INFO_MAP).find((chain) => {
|
|
3800
|
+
const info = CHAINS_INFO_MAP[chain];
|
|
3801
|
+
return info.apiChainName === normalised || info.legacyWalletBookAliases?.includes(normalised) === true;
|
|
3802
|
+
});
|
|
3579
3803
|
};
|
|
3804
|
+
|
|
3805
|
+
//#endregion
|
|
3806
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.ts
|
|
3580
3807
|
/**
|
|
3581
3808
|
* Extracts the chain prefix from a chain identifier string.
|
|
3582
3809
|
* For example, "eip155:1" -> "eip155", "solana:..." -> "solana"
|
|
3810
|
+
*
|
|
3811
|
+
* Exported so {@link getChainsFromWalletSchema} can apply the same
|
|
3812
|
+
* parsing to its multi-chain pass without duplicating the logic.
|
|
3813
|
+
* @not-instrumented
|
|
3583
3814
|
*/
|
|
3584
3815
|
const extractChainPrefix = ({ chainIdentifier }) => {
|
|
3585
3816
|
const colonIndex = chainIdentifier.indexOf(":");
|
|
@@ -3587,80 +3818,22 @@ const extractChainPrefix = ({ chainIdentifier }) => {
|
|
|
3587
3818
|
return chainIdentifier.substring(0, colonIndex);
|
|
3588
3819
|
};
|
|
3589
3820
|
/**
|
|
3590
|
-
*
|
|
3591
|
-
*
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
chain: "SOL",
|
|
3596
|
-
pattern: "sol"
|
|
3597
|
-
},
|
|
3598
|
-
{
|
|
3599
|
-
chain: "SOL",
|
|
3600
|
-
pattern: "solana"
|
|
3601
|
-
},
|
|
3602
|
-
{
|
|
3603
|
-
chain: "BTC",
|
|
3604
|
-
pattern: "btc"
|
|
3605
|
-
},
|
|
3606
|
-
{
|
|
3607
|
-
chain: "BTC",
|
|
3608
|
-
pattern: "bitcoin"
|
|
3609
|
-
},
|
|
3610
|
-
{
|
|
3611
|
-
chain: "STARK",
|
|
3612
|
-
pattern: "stark"
|
|
3613
|
-
},
|
|
3614
|
-
{
|
|
3615
|
-
chain: "STARK",
|
|
3616
|
-
pattern: "starknet"
|
|
3617
|
-
},
|
|
3618
|
-
{
|
|
3619
|
-
chain: "SUI",
|
|
3620
|
-
pattern: "sui"
|
|
3621
|
-
},
|
|
3622
|
-
{
|
|
3623
|
-
chain: "APTOS",
|
|
3624
|
-
pattern: "aptos"
|
|
3625
|
-
},
|
|
3626
|
-
{
|
|
3627
|
-
chain: "COSMOS",
|
|
3628
|
-
pattern: "cosmos"
|
|
3629
|
-
},
|
|
3630
|
-
{
|
|
3631
|
-
chain: "FLOW",
|
|
3632
|
-
pattern: "flow"
|
|
3633
|
-
},
|
|
3634
|
-
{
|
|
3635
|
-
chain: "ALGO",
|
|
3636
|
-
pattern: "algo"
|
|
3637
|
-
},
|
|
3638
|
-
{
|
|
3639
|
-
chain: "TRON",
|
|
3640
|
-
pattern: "tron"
|
|
3641
|
-
},
|
|
3642
|
-
{
|
|
3643
|
-
chain: "TON",
|
|
3644
|
-
pattern: "ton"
|
|
3645
|
-
},
|
|
3646
|
-
{
|
|
3647
|
-
chain: "SPARK",
|
|
3648
|
-
pattern: "spark"
|
|
3649
|
-
},
|
|
3650
|
-
{
|
|
3651
|
-
chain: "ECLIPSE",
|
|
3652
|
-
pattern: "eclipse"
|
|
3653
|
-
}
|
|
3654
|
-
];
|
|
3655
|
-
/**
|
|
3656
|
-
* Attempts to extract the chain from a wallet key by looking for embedded chain identifiers.
|
|
3821
|
+
* Attempts to extract the chain from a wallet key by looking for embedded
|
|
3822
|
+
* chain identifiers (apiChainName + legacyWalletBookAliases from CHAINS_INFO_MAP).
|
|
3823
|
+
*
|
|
3824
|
+
* Derives patterns dynamically so adding a chain in `CHAINS_INFO_MAP`
|
|
3825
|
+
* picks it up here — no parallel hardcoded list.
|
|
3657
3826
|
*
|
|
3658
3827
|
* @param params.walletKey - The wallet key identifier.
|
|
3659
3828
|
* @returns The chain type if found, undefined otherwise.
|
|
3660
3829
|
*/
|
|
3661
3830
|
const getChainFromWalletKey = ({ walletKey }) => {
|
|
3662
3831
|
const lowerKey = walletKey.toLowerCase();
|
|
3663
|
-
|
|
3832
|
+
const chains = Object.keys(CHAINS_INFO_MAP);
|
|
3833
|
+
for (const chain of chains) {
|
|
3834
|
+
const info = CHAINS_INFO_MAP[chain];
|
|
3835
|
+
if ([info.apiChainName, ...info.legacyWalletBookAliases ?? []].some((pattern) => lowerKey.includes(pattern))) return chain;
|
|
3836
|
+
}
|
|
3664
3837
|
};
|
|
3665
3838
|
/**
|
|
3666
3839
|
* Gets the chain from a wallet book entry.
|
|
@@ -3674,8 +3847,11 @@ const getChainFromWalletKey = ({ walletKey }) => {
|
|
|
3674
3847
|
*/
|
|
3675
3848
|
const getChainFromWalletSchema = ({ wallet, walletKey }) => {
|
|
3676
3849
|
if (wallet.injectedConfig && wallet.injectedConfig.length > 0) {
|
|
3677
|
-
const injectedChain = wallet.injectedConfig[0].chain
|
|
3678
|
-
if (injectedChain
|
|
3850
|
+
const injectedChain = wallet.injectedConfig[0].chain;
|
|
3851
|
+
if (injectedChain) {
|
|
3852
|
+
const chain = getChainFromWalletBookIdentifier({ identifier: injectedChain });
|
|
3853
|
+
if (chain) return chain;
|
|
3854
|
+
}
|
|
3679
3855
|
}
|
|
3680
3856
|
if (wallet.chains && wallet.chains.length > 0) {
|
|
3681
3857
|
const firstChain = wallet.chains[0];
|
|
@@ -3923,11 +4099,111 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3923
4099
|
}
|
|
3924
4100
|
};
|
|
3925
4101
|
|
|
4102
|
+
//#endregion
|
|
4103
|
+
//#region src/utils/isMobile/isMobile.ts
|
|
4104
|
+
/**
|
|
4105
|
+
* Sourced from http://detectmobilebrowsers.com/
|
|
4106
|
+
* @not-instrumented
|
|
4107
|
+
*/
|
|
4108
|
+
const userAgentRegex1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ios|ipad|playbook|silk/i;
|
|
4109
|
+
const userAgentRegex2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;
|
|
4110
|
+
/** @not-instrumented */
|
|
4111
|
+
const isMobile = (maxTouchPointsOverride) => {
|
|
4112
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4113
|
+
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
|
|
4114
|
+
};
|
|
4115
|
+
/** @not-instrumented */
|
|
4116
|
+
const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
|
|
4117
|
+
/**
|
|
4118
|
+
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
4119
|
+
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
4120
|
+
* to mock it
|
|
4121
|
+
* @not-instrumented
|
|
4122
|
+
*/
|
|
4123
|
+
const isIPad = (maxTouchPointsOverride) => {
|
|
4124
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4125
|
+
const maxTouchPoints = maxTouchPointsOverride || navigator.maxTouchPoints;
|
|
4126
|
+
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
4127
|
+
};
|
|
4128
|
+
/** @not-instrumented */
|
|
4129
|
+
const isIOS = (maxTouchPointsOverride) => {
|
|
4130
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4131
|
+
return isIPhone() || isIPad(maxTouchPointsOverride);
|
|
4132
|
+
};
|
|
4133
|
+
/** @not-instrumented */
|
|
4134
|
+
const isAndroid = () => isMobile() && !isIOS();
|
|
4135
|
+
/** @not-instrumented */
|
|
4136
|
+
const isSafariBrowser = () => {
|
|
4137
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4138
|
+
const { userAgent } = navigator;
|
|
4139
|
+
return userAgent.includes("Safari") && !userAgent.includes("Chrome") && !userAgent.includes("Chromium");
|
|
4140
|
+
};
|
|
4141
|
+
/** @not-instrumented */
|
|
4142
|
+
const isEdgeBrowser = () => {
|
|
4143
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4144
|
+
return /\bEdg\//.test(navigator.userAgent);
|
|
4145
|
+
};
|
|
4146
|
+
/** @not-instrumented */
|
|
4147
|
+
const isOperaBrowser = () => {
|
|
4148
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4149
|
+
return /\b(OPR|Opera)\//.test(navigator.userAgent);
|
|
4150
|
+
};
|
|
4151
|
+
/** @not-instrumented */
|
|
4152
|
+
const isFirefoxBrowser = () => {
|
|
4153
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4154
|
+
return /\bFirefox\//.test(navigator.userAgent);
|
|
4155
|
+
};
|
|
4156
|
+
/** @not-instrumented */
|
|
4157
|
+
const isChromeBrowser = () => {
|
|
4158
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4159
|
+
return /\bChrome\//.test(navigator.userAgent) && !isEdgeBrowser() && !isOperaBrowser();
|
|
4160
|
+
};
|
|
4161
|
+
|
|
4162
|
+
//#endregion
|
|
4163
|
+
//#region src/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.ts
|
|
4164
|
+
/**
|
|
4165
|
+
* Resolves the {@link InstallationUrls} field that matches the platform
|
|
4166
|
+
* the SDK is currently running on:
|
|
4167
|
+
*
|
|
4168
|
+
* - iOS → `ios`
|
|
4169
|
+
* - Android → `android`
|
|
4170
|
+
* - Edge → `edge`
|
|
4171
|
+
* - Opera → `opera`
|
|
4172
|
+
* - Firefox → `firefox`
|
|
4173
|
+
* - Safari → `safari`
|
|
4174
|
+
* - Chrome (or other Chromium-based browsers) → `chrome`
|
|
4175
|
+
*
|
|
4176
|
+
* Returns `undefined` when no entry exists for the detected platform —
|
|
4177
|
+
* callers typically render a "not available on this device" affordance
|
|
4178
|
+
* in that case rather than offering a download targeted at a different
|
|
4179
|
+
* browser/OS.
|
|
4180
|
+
*
|
|
4181
|
+
* Each branch returns exactly the field for the detected platform — no
|
|
4182
|
+
* fallback to a different browser's URL. If you'd rather surface every
|
|
4183
|
+
* link a wallet's manifest publishes so the user can pick where to
|
|
4184
|
+
* install, read `installationUrls` directly instead of going through
|
|
4185
|
+
* this helper.
|
|
4186
|
+
*
|
|
4187
|
+
* @param params.installationUrls - The wallet option's `installationUrls`
|
|
4188
|
+
* record (from `getWalletOptionsCatalogue`).
|
|
4189
|
+
* @returns The install URL for the detected platform, or `undefined`.
|
|
4190
|
+
* @not-instrumented
|
|
4191
|
+
*/
|
|
4192
|
+
const getInstallationLinkForCurrentPlatform = ({ installationUrls }) => {
|
|
4193
|
+
if (isIOS()) return installationUrls.ios;
|
|
4194
|
+
if (isAndroid()) return installationUrls.android;
|
|
4195
|
+
if (isEdgeBrowser()) return installationUrls.edge;
|
|
4196
|
+
if (isOperaBrowser()) return installationUrls.opera;
|
|
4197
|
+
if (isFirefoxBrowser()) return installationUrls.firefox;
|
|
4198
|
+
if (isSafariBrowser()) return installationUrls.safari;
|
|
4199
|
+
if (isChromeBrowser()) return installationUrls.chrome;
|
|
4200
|
+
};
|
|
4201
|
+
|
|
3926
4202
|
//#endregion
|
|
3927
4203
|
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
3928
4204
|
/**
|
|
3929
4205
|
* Resolves which wallet option (group) a wallet book entry belongs to. Used
|
|
3930
|
-
* by the catalogue's wallet-book-driven transformers (
|
|
4206
|
+
* by the catalogue's wallet-book-driven transformers (URI deeplink,
|
|
3931
4207
|
* `inAppBrowser`, `installation`) to bucket their emitted options.
|
|
3932
4208
|
*
|
|
3933
4209
|
* Wallet book entries inconsistently use `group` / `chainGroup` /
|
|
@@ -4082,24 +4358,150 @@ const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
|
|
|
4082
4358
|
};
|
|
4083
4359
|
|
|
4084
4360
|
//#endregion
|
|
4085
|
-
//#region src/modules/
|
|
4361
|
+
//#region src/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.ts
|
|
4086
4362
|
/**
|
|
4087
|
-
*
|
|
4088
|
-
*
|
|
4089
|
-
*
|
|
4090
|
-
*
|
|
4363
|
+
* Whether a wallet book entry exposes at least one mobile deeplink the
|
|
4364
|
+
* catalogue can drive — either a native scheme (`metamask://`) or a
|
|
4365
|
+
* universal link (`https://metamask.app.link`). Used by the URI-deeplink
|
|
4366
|
+
* builders (`buildWalletConnectOptions`, `buildMetaMaskSdkUriOptions`)
|
|
4367
|
+
* to skip wallets that have no app to launch.
|
|
4368
|
+
*
|
|
4369
|
+
* @param params.wallet - The wallet schema from the wallet book.
|
|
4370
|
+
* @returns True when the wallet has a native or universal mobile link.
|
|
4371
|
+
* @not-instrumented
|
|
4091
4372
|
*/
|
|
4092
4373
|
const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
|
|
4374
|
+
|
|
4375
|
+
//#endregion
|
|
4376
|
+
//#region src/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.ts
|
|
4377
|
+
/**
|
|
4378
|
+
* Wallet option key the MetaMask SDK URI extension targets.
|
|
4379
|
+
*/
|
|
4380
|
+
const METAMASK_WALLET_OPTION_KEY = "metamask";
|
|
4381
|
+
/**
|
|
4382
|
+
* Chains the MetaMask SDK URI pairing supports.
|
|
4383
|
+
*
|
|
4384
|
+
* Unlike WalletConnect — whose per-wallet chain support is read from the
|
|
4385
|
+
* wallet book — the MetaMask SDK URI is a single Dynamic integration whose
|
|
4386
|
+
* chain coverage is defined by which `connectWithMetaMaskUri<Chain>`
|
|
4387
|
+
* primitives the SDK ships (EVM + SOL). The MetaMask wallet-book entry only
|
|
4388
|
+
* advertises its EVM (`eip155`) chains, so deriving the chain from the book
|
|
4389
|
+
* would never surface the Solana pairing; the SDK's own capabilities are
|
|
4390
|
+
* listed explicitly instead.
|
|
4391
|
+
*/
|
|
4392
|
+
const METAMASK_SDK_URI_SUPPORTED_CHAINS = ["EVM", "SOL"];
|
|
4393
|
+
/**
|
|
4394
|
+
* Builds the `metamaskSdkUri`-discriminator catalogue options from a
|
|
4395
|
+
* fetched wallet book. The MetaMask SDK URI extension only targets the
|
|
4396
|
+
* MetaMask wallet, so the builder iterates the book looking for the
|
|
4397
|
+
* entry whose resolved wallet option key is `'metamask'`.
|
|
4398
|
+
*
|
|
4399
|
+
* Applies the generic `shouldFilterWallet` rules (drops embedded keys +
|
|
4400
|
+
* injected-only-without-links entries). Crucially does NOT require WC
|
|
4401
|
+
* `sign_v2` support — MetaMask SDK URI is a different protocol from
|
|
4402
|
+
* WalletConnect, so the WC-specific filter does not apply here.
|
|
4403
|
+
*
|
|
4404
|
+
* Emits one `metamaskSdkUri` option per chain the MetaMask SDK URI pairing
|
|
4405
|
+
* supports (see {@link METAMASK_SDK_URI_SUPPORTED_CHAINS}) so the picker can
|
|
4406
|
+
* offer both the EVM and Solana pairings for the single MetaMask entry.
|
|
4407
|
+
*
|
|
4408
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4409
|
+
* @returns Tagged `metamaskSdkUri` options for MetaMask if eligible, otherwise an empty array.
|
|
4410
|
+
* @not-instrumented
|
|
4411
|
+
*/
|
|
4412
|
+
const buildMetaMaskSdkUriOptions = ({ walletBook }) => {
|
|
4413
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4414
|
+
const walletOptionKey = resolveWalletBookWalletOptionKey({
|
|
4415
|
+
wallet,
|
|
4416
|
+
walletKey
|
|
4417
|
+
});
|
|
4418
|
+
if (walletOptionKey !== METAMASK_WALLET_OPTION_KEY) continue;
|
|
4419
|
+
if (shouldFilterWallet({
|
|
4420
|
+
wallet,
|
|
4421
|
+
walletKey
|
|
4422
|
+
})) continue;
|
|
4423
|
+
if (!hasUsableDeeplink({ wallet })) continue;
|
|
4424
|
+
const deeplinks = {
|
|
4425
|
+
native: wallet.mobile?.native,
|
|
4426
|
+
universal: wallet.mobile?.universal
|
|
4427
|
+
};
|
|
4428
|
+
return METAMASK_SDK_URI_SUPPORTED_CHAINS.map((chain) => ({
|
|
4429
|
+
option: {
|
|
4430
|
+
chain,
|
|
4431
|
+
deeplinks,
|
|
4432
|
+
type: "metamaskSdkUri"
|
|
4433
|
+
},
|
|
4434
|
+
walletOptionKey
|
|
4435
|
+
}));
|
|
4436
|
+
}
|
|
4437
|
+
return [];
|
|
4438
|
+
};
|
|
4439
|
+
|
|
4440
|
+
//#endregion
|
|
4441
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.ts
|
|
4093
4442
|
/**
|
|
4094
|
-
*
|
|
4095
|
-
*
|
|
4443
|
+
* Returns every chain a wallet book entry advertises support for —
|
|
4444
|
+
* deduped, in `injectedConfig` order, then `chains` order. Used by the
|
|
4445
|
+
* catalogue's WalletConnect builder so a multi-chain wallet (e.g. Trust
|
|
4446
|
+
* supports EVM + SOL) gets one option per chain rather than one option
|
|
4447
|
+
* for whichever chain `getChainFromWalletSchema` happened to pick first.
|
|
4448
|
+
*
|
|
4449
|
+
* Falls back to {@link getChainFromWalletSchema}'s single-result behavior
|
|
4450
|
+
* (`['EVM']` default) when neither field is populated, so the helper
|
|
4451
|
+
* never returns an empty array — every eligible wallet emits at least
|
|
4452
|
+
* one option.
|
|
4453
|
+
*
|
|
4454
|
+
* @param params.wallet - The wallet schema from the wallet book.
|
|
4455
|
+
* @param [params.walletKey] - The wallet key identifier (used as last-resort fallback).
|
|
4456
|
+
* @returns Ordered, deduped array of Chains.
|
|
4457
|
+
* @not-instrumented
|
|
4458
|
+
*/
|
|
4459
|
+
const getChainsFromWalletSchema = ({ wallet, walletKey }) => {
|
|
4460
|
+
const chains = /* @__PURE__ */ new Set();
|
|
4461
|
+
for (const entry of wallet.injectedConfig ?? []) {
|
|
4462
|
+
if (!entry.chain) continue;
|
|
4463
|
+
const chain = getChainFromWalletBookIdentifier({ identifier: entry.chain });
|
|
4464
|
+
if (chain) chains.add(chain);
|
|
4465
|
+
}
|
|
4466
|
+
for (const identifier of wallet.chains ?? []) {
|
|
4467
|
+
const prefix = extractChainPrefix({ chainIdentifier: identifier });
|
|
4468
|
+
try {
|
|
4469
|
+
const chain = getChainFromVerifiedCredentialChain(prefix);
|
|
4470
|
+
chains.add(chain);
|
|
4471
|
+
} catch {}
|
|
4472
|
+
}
|
|
4473
|
+
if (chains.size === 0) {
|
|
4474
|
+
const chain = getChainFromWalletSchema({
|
|
4475
|
+
wallet,
|
|
4476
|
+
walletKey
|
|
4477
|
+
});
|
|
4478
|
+
chains.add(chain);
|
|
4479
|
+
}
|
|
4480
|
+
return Array.from(chains);
|
|
4481
|
+
};
|
|
4482
|
+
|
|
4483
|
+
//#endregion
|
|
4484
|
+
//#region src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts
|
|
4485
|
+
/**
|
|
4486
|
+
* Chains Dynamic ships a WalletConnect extension for. Anything else a
|
|
4487
|
+
* wallet book entry advertises (Cosmos, BTC, …) gets filtered out — the
|
|
4488
|
+
* catalogue should not surface a chain the SDK has no `connectWithWalletConnect<Chain>`
|
|
4489
|
+
* primitive for.
|
|
4490
|
+
*/
|
|
4491
|
+
const WALLETCONNECT_SUPPORTED_CHAINS = new Set(["EVM", "SOL"]);
|
|
4492
|
+
/**
|
|
4493
|
+
* Builds the `walletConnect`-discriminator catalogue options from a fetched
|
|
4494
|
+
* wallet book. Applies the WalletConnect-specific eligibility filter
|
|
4096
4495
|
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
4097
4496
|
* without `sign_v2` support are excluded — same surface as
|
|
4098
4497
|
* `getWalletConnectCatalog`.
|
|
4099
4498
|
*
|
|
4100
|
-
*
|
|
4101
|
-
*
|
|
4102
|
-
*
|
|
4499
|
+
* Skips the MetaMask wallet entry: MetaMask is steered to its own URI
|
|
4500
|
+
* connection extension via `buildMetaMaskSdkUriOptions`. Keeping the two
|
|
4501
|
+
* builders separate means each protocol owns its own eligibility rules
|
|
4502
|
+
* (WC needs `sign_v2`; MM SDK URI does not), so excluding one
|
|
4503
|
+
* discriminator via `excludedConnectionOptionTypes` doesn't accidentally
|
|
4504
|
+
* gate the other.
|
|
4103
4505
|
*
|
|
4104
4506
|
* @param params.walletBook - The fetched wallet book.
|
|
4105
4507
|
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
@@ -4117,11 +4519,12 @@ const buildWalletConnectOptions = ({ walletBook }) => {
|
|
|
4117
4519
|
wallet,
|
|
4118
4520
|
walletKey
|
|
4119
4521
|
});
|
|
4120
|
-
|
|
4522
|
+
if (walletOptionKey === "metamask") continue;
|
|
4523
|
+
const chains = getChainsFromWalletSchema({
|
|
4121
4524
|
wallet,
|
|
4122
4525
|
walletKey
|
|
4123
|
-
});
|
|
4124
|
-
result.push({
|
|
4526
|
+
}).filter((chain) => WALLETCONNECT_SUPPORTED_CHAINS.has(chain));
|
|
4527
|
+
for (const chain of chains) result.push({
|
|
4125
4528
|
option: {
|
|
4126
4529
|
chain,
|
|
4127
4530
|
deeplinks: {
|
|
@@ -4145,12 +4548,19 @@ const buildWalletConnectOptions = ({ walletBook }) => {
|
|
|
4145
4548
|
*
|
|
4146
4549
|
* Display merge rules (provider self-announced metadata wins where set):
|
|
4147
4550
|
*
|
|
4148
|
-
* - `name`: `displayOverride.name` ?? wallet book group name ??
|
|
4149
|
-
*
|
|
4150
|
-
* - `
|
|
4151
|
-
*
|
|
4551
|
+
* - `name`: `displayOverride.name` ?? wallet book group name ?? wallet
|
|
4552
|
+
* book wallet name ?? bare key.
|
|
4553
|
+
* - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL
|
|
4554
|
+
* ?? wallet book wallet sprite URL ?? `''`.
|
|
4555
|
+
* - `primaryColor`: wallet book group brand color ?? wallet book wallet
|
|
4556
|
+
* brand color (providers do not ship a primary color in their
|
|
4557
|
+
* announcement metadata).
|
|
4152
4558
|
* - `installationUrls`: copied through if present.
|
|
4153
4559
|
*
|
|
4560
|
+
* The per-wallet fallback handles wallets that exist as individual entries
|
|
4561
|
+
* in the book (e.g. Rainbow) rather than as members of a multi-wallet group
|
|
4562
|
+
* — those don't get a `walletBook.groups[…]` shell.
|
|
4563
|
+
*
|
|
4154
4564
|
* Why provider precedence: a registered wallet provider knows its own
|
|
4155
4565
|
* brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
|
|
4156
4566
|
* wallet authoring its own identity). The wallet book fills in fields the
|
|
@@ -4168,16 +4578,42 @@ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrl
|
|
|
4168
4578
|
const group = walletBook.groups[walletOptionKey];
|
|
4169
4579
|
const groupSpriteId = group?.brand?.spriteId;
|
|
4170
4580
|
const groupIconUrl = groupSpriteId ? getSpriteUrl({ spriteId: groupSpriteId }) : void 0;
|
|
4581
|
+
const walletEntry = walletBook.wallets[walletOptionKey];
|
|
4582
|
+
const walletSpriteId = walletEntry?.brand?.spriteId;
|
|
4583
|
+
const walletIconUrl = walletSpriteId ? getSpriteUrl({ spriteId: walletSpriteId }) : void 0;
|
|
4171
4584
|
return {
|
|
4172
4585
|
connectionOptions,
|
|
4173
|
-
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
|
|
4586
|
+
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? walletIconUrl ?? "",
|
|
4174
4587
|
installationUrls,
|
|
4175
4588
|
key: walletOptionKey,
|
|
4176
|
-
name: displayOverride?.name ?? group?.name ?? walletOptionKey,
|
|
4177
|
-
primaryColor: group?.brand?.primaryColor
|
|
4589
|
+
name: displayOverride?.name ?? group?.name ?? walletEntry?.name ?? walletOptionKey,
|
|
4590
|
+
primaryColor: group?.brand?.primaryColor ?? walletEntry?.brand?.primaryColor
|
|
4178
4591
|
};
|
|
4179
4592
|
};
|
|
4180
4593
|
|
|
4594
|
+
//#endregion
|
|
4595
|
+
//#region src/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.ts
|
|
4596
|
+
/**
|
|
4597
|
+
* Returns true when the given wallet provider exposes a `connect` method,
|
|
4598
|
+
* which is the signal we use to decide whether it belongs in the external
|
|
4599
|
+
* wallet picker as an `available provider`.
|
|
4600
|
+
*
|
|
4601
|
+
* Providers that don't expose `connect` (embedded wallets,
|
|
4602
|
+
* account-abstraction wrappers, MetaMask SDK / WalletConnect-backed
|
|
4603
|
+
* providers) are still sign-in capable, but via different SDK entry
|
|
4604
|
+
* points — they should not appear in the external picker as a
|
|
4605
|
+
* `withWalletProvider`-style option.
|
|
4606
|
+
*
|
|
4607
|
+
* Centralizing the predicate means future tweaks (e.g. a registry of
|
|
4608
|
+
* provider keys to exclude) land in one place and every consumer stays
|
|
4609
|
+
* in lockstep.
|
|
4610
|
+
*
|
|
4611
|
+
* @param params.walletProvider - The wallet provider to test.
|
|
4612
|
+
* @returns True when the provider exposes a `connect` method.
|
|
4613
|
+
* @not-instrumented
|
|
4614
|
+
*/
|
|
4615
|
+
const hasWalletProviderConnectMethod = ({ walletProvider }) => Boolean(walletProvider.connect);
|
|
4616
|
+
|
|
4181
4617
|
//#endregion
|
|
4182
4618
|
//#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
|
|
4183
4619
|
/**
|
|
@@ -4257,7 +4693,7 @@ const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().re
|
|
|
4257
4693
|
|
|
4258
4694
|
//#endregion
|
|
4259
4695
|
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
|
|
4260
|
-
const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
|
|
4696
|
+
const normalize = (value) => value === void 0 ? void 0 : value.toLowerCase().replace(/\s+/g, "");
|
|
4261
4697
|
/**
|
|
4262
4698
|
* Looks for a wallet book entry whose `name` or `shortName` normalizes to
|
|
4263
4699
|
* the same string as `candidate`. Used as a fallback by
|
|
@@ -4377,6 +4813,7 @@ const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }
|
|
|
4377
4813
|
const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
|
|
4378
4814
|
const result = [];
|
|
4379
4815
|
for (const entry of entries) {
|
|
4816
|
+
if (!hasWalletProviderConnectMethod({ walletProvider: entry.walletProvider })) continue;
|
|
4380
4817
|
const source = classifyWithWalletProviderSource({ entry });
|
|
4381
4818
|
if (!source) {
|
|
4382
4819
|
getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
|
|
@@ -4469,10 +4906,11 @@ const groupOptionsByWalletOption = ({ options }) => {
|
|
|
4469
4906
|
* wallet-option list is ordered — that's controlled by
|
|
4470
4907
|
* `WalletOptionOrdering`.
|
|
4471
4908
|
*
|
|
4472
|
-
* `withWalletProvider > walletConnect > inAppBrowser`
|
|
4909
|
+
* `withWalletProvider > walletConnect / metamaskSdkUri > inAppBrowser`
|
|
4473
4910
|
*/
|
|
4474
4911
|
const CONNECTION_OPTION_PRIORITY = {
|
|
4475
4912
|
inAppBrowser: 2,
|
|
4913
|
+
metamaskSdkUri: 1,
|
|
4476
4914
|
walletConnect: 1,
|
|
4477
4915
|
withWalletProvider: 0
|
|
4478
4916
|
};
|
|
@@ -4491,7 +4929,7 @@ const getConnectionOptionPriority = ({ option }) => CONNECTION_OPTION_PRIORITY[o
|
|
|
4491
4929
|
/**
|
|
4492
4930
|
* Sorts a wallet option's `connectionOptions` so the most preferred option lands at
|
|
4493
4931
|
* index 0. Primary sort is by option-type priority
|
|
4494
|
-
* (`withWalletProvider` >
|
|
4932
|
+
* (`withWalletProvider` > URI deeplink > `inAppBrowser`);
|
|
4495
4933
|
* within a type, ties break alphabetically by `chain` for deterministic
|
|
4496
4934
|
* output across calls.
|
|
4497
4935
|
*
|
|
@@ -4615,7 +5053,7 @@ const hasInstalledProvider = ({ walletOption }) => walletOption.connectionOption
|
|
|
4615
5053
|
* this order:
|
|
4616
5054
|
* 1. **Installed provider** — user already has the wallet available
|
|
4617
5055
|
* (`withWalletProvider` at index 0).
|
|
4618
|
-
* 2. **Connectable** — has at least one connection (
|
|
5056
|
+
* 2. **Connectable** — has at least one connection (URI deeplink
|
|
4619
5057
|
* or `inAppBrowser`) but no installed provider.
|
|
4620
5058
|
* 3. **Install-only** — no connection at all; only `installationUrls`.
|
|
4621
5059
|
* Within each tier, rank by the hand-curated {@link PRIORITY_WALLET_KEYS}
|
|
@@ -4665,45 +5103,40 @@ const EMPTY_WALLET_BOOK = {
|
|
|
4665
5103
|
wallets: {}
|
|
4666
5104
|
};
|
|
4667
5105
|
/**
|
|
4668
|
-
* Returns
|
|
4669
|
-
* with through this client.
|
|
4670
|
-
* `
|
|
4671
|
-
*
|
|
4672
|
-
* any matching connections are omitted.
|
|
4673
|
-
*
|
|
4674
|
-
* `includeWithWalletProvider` defaults to `true`; all other inclusion flags
|
|
4675
|
-
* are opt-in. `walletOptionOrdering` defaults to `'relevance'` (Dynamic's
|
|
4676
|
-
* recommended order); pass `'alphabetical'` to sort by wallet option name
|
|
4677
|
-
* within each option-priority tier.
|
|
5106
|
+
* Returns the catalogue of external wallet options a user can sign in
|
|
5107
|
+
* with through this client. Always includes installed wallet providers;
|
|
5108
|
+
* pass `includeMobileOptions: true` to additionally surface
|
|
5109
|
+
* WalletConnect, in-app-browser, and install links.
|
|
4678
5110
|
*
|
|
4679
|
-
*
|
|
4680
|
-
* (
|
|
4681
|
-
*
|
|
5111
|
+
* Pass `excludedConnectionOptionTypes` to drop specific connection types
|
|
5112
|
+
* from the catalogue (e.g. `['inAppBrowser']` on desktop). Wallets whose
|
|
5113
|
+
* only connection was an excluded type fall through to the install-only
|
|
5114
|
+
* tier of the relevance ordering.
|
|
4682
5115
|
*
|
|
4683
|
-
* @param [params] - Inclusion
|
|
5116
|
+
* @param [params] - Inclusion flag + ordering preference + exclusions.
|
|
4684
5117
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4685
5118
|
* @returns A promise that resolves to the wallet options catalogue.
|
|
4686
5119
|
* @not-instrumented
|
|
4687
5120
|
*/
|
|
4688
5121
|
const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
|
|
4689
|
-
const
|
|
4690
|
-
const includeWalletConnect = params.includeWalletConnect ?? false;
|
|
4691
|
-
const includeInAppBrowser = params.includeInAppBrowser ?? false;
|
|
4692
|
-
const includeInstallation = params.includeInstallation ?? false;
|
|
5122
|
+
const includeMobileOptions = params.includeMobileOptions ?? false;
|
|
4693
5123
|
const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
|
|
4694
|
-
|
|
4695
|
-
const walletBook =
|
|
5124
|
+
const excludedConnectionOptionTypes = new Set(params.excludedConnectionOptionTypes ?? []);
|
|
5125
|
+
const walletBook = includeMobileOptions ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
|
|
4696
5126
|
const allConnectionOptions = [];
|
|
4697
|
-
if (
|
|
5127
|
+
if (!excludedConnectionOptionTypes.has("withWalletProvider")) {
|
|
4698
5128
|
const entries = getWalletProviderRegistry(client).listProviderEntries();
|
|
4699
5129
|
allConnectionOptions.push(...buildWithWalletProviderOptions({
|
|
4700
5130
|
entries,
|
|
4701
5131
|
walletBook
|
|
4702
5132
|
}, client));
|
|
4703
5133
|
}
|
|
4704
|
-
if (
|
|
4705
|
-
|
|
4706
|
-
|
|
5134
|
+
if (includeMobileOptions) {
|
|
5135
|
+
if (!excludedConnectionOptionTypes.has("walletConnect")) allConnectionOptions.push(...buildWalletConnectOptions({ walletBook }));
|
|
5136
|
+
if (!excludedConnectionOptionTypes.has("metamaskSdkUri")) allConnectionOptions.push(...buildMetaMaskSdkUriOptions({ walletBook }));
|
|
5137
|
+
if (!excludedConnectionOptionTypes.has("inAppBrowser")) allConnectionOptions.push(...buildInAppBrowserOptions({ walletBook }));
|
|
5138
|
+
}
|
|
5139
|
+
const installationUrlsByKey = includeMobileOptions ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
|
|
4707
5140
|
const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
|
|
4708
5141
|
const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
|
|
4709
5142
|
const walletOptions = [];
|
|
@@ -4983,6 +5416,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4983
5416
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4984
5417
|
* @returns A promise that resolves to the newly generated recovery codes.
|
|
4985
5418
|
* @instrumented
|
|
5419
|
+
* @redact-params
|
|
4986
5420
|
*/
|
|
4987
5421
|
const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
4988
5422
|
const core = getCore(client);
|
|
@@ -4998,7 +5432,8 @@ const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
|
4998
5432
|
} catch {
|
|
4999
5433
|
return;
|
|
5000
5434
|
}
|
|
5001
|
-
}
|
|
5435
|
+
},
|
|
5436
|
+
redactAll: true
|
|
5002
5437
|
});
|
|
5003
5438
|
|
|
5004
5439
|
//#endregion
|
|
@@ -6225,6 +6660,7 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
6225
6660
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6226
6661
|
* @returns A promise that resolves to the verify response object upon successful verification.
|
|
6227
6662
|
* @instrumented
|
|
6663
|
+
* @redact-params
|
|
6228
6664
|
*/
|
|
6229
6665
|
const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }, client = getDefaultClient()) => {
|
|
6230
6666
|
let response;
|
|
@@ -6250,7 +6686,8 @@ const __verifyOTP_wrapped = instrumentFunction({
|
|
|
6250
6686
|
} catch {
|
|
6251
6687
|
return;
|
|
6252
6688
|
}
|
|
6253
|
-
}
|
|
6689
|
+
},
|
|
6690
|
+
redactAll: true
|
|
6254
6691
|
});
|
|
6255
6692
|
|
|
6256
6693
|
//#endregion
|
|
@@ -6624,33 +7061,6 @@ const __confirmTransaction_wrapped = instrumentFunction({
|
|
|
6624
7061
|
}
|
|
6625
7062
|
});
|
|
6626
7063
|
|
|
6627
|
-
//#endregion
|
|
6628
|
-
//#region src/utils/isMobile/isMobile.ts
|
|
6629
|
-
/**
|
|
6630
|
-
* Sourced from http://detectmobilebrowsers.com/
|
|
6631
|
-
* @not-instrumented
|
|
6632
|
-
*/
|
|
6633
|
-
const userAgentRegex1 = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ios|ipad|playbook|silk/i;
|
|
6634
|
-
const userAgentRegex2 = /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i;
|
|
6635
|
-
/** @not-instrumented */
|
|
6636
|
-
const isMobile = (maxTouchPointsOverride) => {
|
|
6637
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6638
|
-
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
|
|
6639
|
-
};
|
|
6640
|
-
/** @not-instrumented */
|
|
6641
|
-
const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
|
|
6642
|
-
/**
|
|
6643
|
-
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
6644
|
-
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
6645
|
-
* to mock it
|
|
6646
|
-
* @not-instrumented
|
|
6647
|
-
*/
|
|
6648
|
-
const isIPad = (maxTouchPointsOverride) => {
|
|
6649
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6650
|
-
const maxTouchPoints = maxTouchPointsOverride || navigator.maxTouchPoints;
|
|
6651
|
-
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
6652
|
-
};
|
|
6653
|
-
|
|
6654
7064
|
//#endregion
|
|
6655
7065
|
//#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
|
|
6656
7066
|
/** @not-instrumented */
|
|
@@ -6674,13 +7084,12 @@ const getAddressesWithTypesFromConnectionResult = (connectionResult) => {
|
|
|
6674
7084
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6675
7085
|
* @returns A promise that resolves to the connected wallet account.
|
|
6676
7086
|
* @throws NoAddressFoundError If the request to connect was successful but no address is connected to your app.
|
|
6677
|
-
*
|
|
7087
|
+
* @instrumented
|
|
6678
7088
|
*/
|
|
6679
7089
|
const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWalletAccounts = true, hardwareWalletVendor }, client = getDefaultClient()) => {
|
|
6680
7090
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
6681
7091
|
assertWalletProviderMethodDefined(walletProvider, "connect");
|
|
6682
7092
|
const { addresses } = await walletProvider.connect();
|
|
6683
|
-
const currentAddresses = getWalletAccounts(client).map(({ address }) => address);
|
|
6684
7093
|
const mainAddress = addresses?.length ? addresses[0].address : null;
|
|
6685
7094
|
/**
|
|
6686
7095
|
* This error is thrown in case the wallet has no addresses connected
|
|
@@ -6688,27 +7097,25 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
6688
7097
|
* user on the next steps.
|
|
6689
7098
|
*/
|
|
6690
7099
|
if (!mainAddress) throw new NoAddressFoundError();
|
|
6691
|
-
const
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
chain: walletProvider.chain,
|
|
6695
|
-
hardwareWalletVendor,
|
|
6696
|
-
id: formatWalletAccountId({
|
|
7100
|
+
const [reconciledWalletAccount] = reconcileWalletAccountsAgainstClient({
|
|
7101
|
+
addToDynamicWalletAccounts,
|
|
7102
|
+
walletAccounts: [{
|
|
6697
7103
|
address: mainAddress,
|
|
7104
|
+
addressesWithTypes: getAddressesWithTypesFromConnectionResult({ addresses }),
|
|
6698
7105
|
chain: walletProvider.chain,
|
|
7106
|
+
hardwareWalletVendor,
|
|
7107
|
+
id: formatWalletAccountId({
|
|
7108
|
+
address: mainAddress,
|
|
7109
|
+
chain: walletProvider.chain,
|
|
7110
|
+
walletProviderKey
|
|
7111
|
+
}),
|
|
7112
|
+
lastSelectedAt: null,
|
|
7113
|
+
verifiedCredentialId: null,
|
|
6699
7114
|
walletProviderKey
|
|
6700
|
-
}
|
|
6701
|
-
lastSelectedAt: null,
|
|
6702
|
-
verifiedCredentialId: null,
|
|
7115
|
+
}],
|
|
6703
7116
|
walletProviderKey
|
|
6704
|
-
};
|
|
6705
|
-
|
|
6706
|
-
if (addToDynamicWalletAccounts) {
|
|
6707
|
-
setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
|
|
6708
|
-
emitWalletAccountsChangedEvent(client);
|
|
6709
|
-
createVisit({ walletAccount }, client);
|
|
6710
|
-
}
|
|
6711
|
-
return walletAccount;
|
|
7117
|
+
}, client);
|
|
7118
|
+
return reconciledWalletAccount;
|
|
6712
7119
|
};
|
|
6713
7120
|
const __connectWithWalletProvider_impl = connectWithWalletProvider;
|
|
6714
7121
|
const __connectWithWalletProvider_wrapped = instrumentFunction({
|
|
@@ -6995,7 +7402,7 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
6995
7402
|
* @not-instrumented
|
|
6996
7403
|
*/
|
|
6997
7404
|
const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
6998
|
-
return getWalletProviders(client).filter((walletProvider) =>
|
|
7405
|
+
return getWalletProviders(client).filter((walletProvider) => hasWalletProviderConnectMethod({ walletProvider })).map((walletProvider) => ({
|
|
6999
7406
|
chain: walletProvider.chain,
|
|
7000
7407
|
groupKey: walletProvider.groupKey,
|
|
7001
7408
|
key: walletProvider.key,
|
|
@@ -7058,6 +7465,22 @@ const getWalletProviderDataByKey = ({ walletProviderKey }, client = getDefaultCl
|
|
|
7058
7465
|
};
|
|
7059
7466
|
};
|
|
7060
7467
|
|
|
7468
|
+
//#endregion
|
|
7469
|
+
//#region src/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.ts
|
|
7470
|
+
/**
|
|
7471
|
+
* Checks whether the session has at least one connected wallet account.
|
|
7472
|
+
*
|
|
7473
|
+
* Both verified and unverified wallet accounts count as connected. This is a
|
|
7474
|
+
* single building block for a custom signed-in check — combine it with whatever
|
|
7475
|
+
* else your app considers "signed in" (e.g. `client.user`, completed onboarding,
|
|
7476
|
+
* a required embedded wallet, …).
|
|
7477
|
+
*
|
|
7478
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7479
|
+
* @returns True if the session has at least one wallet account, false otherwise.
|
|
7480
|
+
* @not-instrumented
|
|
7481
|
+
*/
|
|
7482
|
+
const isAnyWalletAccountConnected = (client = getDefaultClient()) => getWalletAccounts(client).length > 0;
|
|
7483
|
+
|
|
7061
7484
|
//#endregion
|
|
7062
7485
|
//#region src/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.ts
|
|
7063
7486
|
/**
|
|
@@ -7169,19 +7592,23 @@ const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
|
|
|
7169
7592
|
};
|
|
7170
7593
|
|
|
7171
7594
|
//#endregion
|
|
7172
|
-
//#region src/modules/wallets/networks/
|
|
7595
|
+
//#region src/modules/wallets/networks/getNativeBalance/getNativeBalance.ts
|
|
7173
7596
|
/**
|
|
7174
|
-
* Retrieves the native token balance for a wallet account
|
|
7597
|
+
* Retrieves the native token balance for a wallet account on its active
|
|
7598
|
+
* network. Reads directly from the chain's network provider (RPC), not
|
|
7599
|
+
* the Dynamic API.
|
|
7175
7600
|
*
|
|
7176
|
-
*
|
|
7177
|
-
* (
|
|
7601
|
+
* Use this when you only need the user's gas / native-currency balance
|
|
7602
|
+
* (ETH, SOL, BTC, etc.). For token balances, use
|
|
7603
|
+
* {@link getTokenBalances}; for a multi-chain portfolio snapshot, use
|
|
7604
|
+
* {@link getMultichainTokenBalances}.
|
|
7178
7605
|
*
|
|
7179
7606
|
* @param params.walletAccount - The wallet account to get the balance for.
|
|
7180
7607
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7181
7608
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
7182
7609
|
* @not-instrumented
|
|
7183
7610
|
*/
|
|
7184
|
-
const
|
|
7611
|
+
const getNativeBalance = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
7185
7612
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
7186
7613
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
7187
7614
|
return getNetworkProviderFromNetworkId({
|
|
@@ -7639,5 +8066,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
7639
8066
|
assertPackageVersion(name, version);
|
|
7640
8067
|
|
|
7641
8068
|
//#endregion
|
|
7642
|
-
export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, matchWalletProvidersToCatalogGroup, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized };
|
|
8069
|
+
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, getNativeBalance as getBalance, getNativeBalance, getBalanceForAddress, getTokenBalances as getBalances, getTokenBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainTokenBalances as getMultichainBalances, getMultichainTokenBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, 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 };
|
|
7643
8070
|
//# sourceMappingURL=index.native.esm.js.map
|