@dynamic-labs-sdk/client 1.4.0 → 1.6.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-CDmVW2DS.native.esm.js → InvalidParamError-BIptAjbC.native.esm.js} +839 -93
- package/dist/InvalidParamError-BIptAjbC.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-BPMi0iWC.esm.js → InvalidParamError-BZ0LHaml.esm.js} +806 -93
- package/dist/InvalidParamError-BZ0LHaml.esm.js.map +1 -0
- package/dist/{InvalidParamError-DEmLKJKZ.cjs → InvalidParamError-DyXEKMWn.cjs} +1012 -116
- package/dist/InvalidParamError-DyXEKMWn.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-Cntietge.esm.js → NotWaasWalletAccountError-BbOA5rPd.native.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-BbOA5rPd.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BZsBHRQe.cjs → NotWaasWalletAccountError-CElqwdQO.cjs} +4 -4
- package/dist/NotWaasWalletAccountError-CElqwdQO.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-Chpne8_Q.native.esm.js → NotWaasWalletAccountError-nT4jrLbp.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-nT4jrLbp.esm.js.map +1 -0
- package/dist/core.cjs +45 -23
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +27 -6
- 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/errors/CorruptedKeyShareError.d.ts +19 -0
- package/dist/errors/CorruptedKeyShareError.d.ts.map +1 -0
- package/dist/errors/WebViewLoadFailedError.d.ts +32 -0
- package/dist/errors/WebViewLoadFailedError.d.ts.map +1 -0
- package/dist/errors/base/BaseError.d.ts.map +1 -1
- package/dist/exports/core.d.ts +4 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +12 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-JGrKwBj7.native.esm.js → getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js} +39 -328
- package/dist/getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-CEeFL-gV.esm.js → getNetworkProviderFromNetworkId-BkAPIdRC.esm.js} +38 -266
- package/dist/getNetworkProviderFromNetworkId-BkAPIdRC.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-szJOsbQN.cjs → getNetworkProviderFromNetworkId-DbI5MZhq.cjs} +44 -341
- package/dist/getNetworkProviderFromNetworkId-DbI5MZhq.cjs.map +1 -0
- package/dist/{getSignedSessionId-B5DikCap.native.esm.js → getSignedSessionId-1TV-x__C.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-B5DikCap.native.esm.js.map → getSignedSessionId-1TV-x__C.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BxOK-Tdo.cjs → getSignedSessionId-BF6n8gve.cjs} +3 -3
- package/dist/{getSignedSessionId-BxOK-Tdo.cjs.map → getSignedSessionId-BF6n8gve.cjs.map} +1 -1
- package/dist/{getSignedSessionId-BOx1nFt_.esm.js → getSignedSessionId-y3YtxFHZ.esm.js} +3 -3
- package/dist/{getSignedSessionId-BOx1nFt_.esm.js.map → getSignedSessionId-y3YtxFHZ.esm.js.map} +1 -1
- package/dist/getVerifiedCredentialForWalletAccount-BfJ29erz.cjs +346 -0
- package/dist/getVerifiedCredentialForWalletAccount-BfJ29erz.cjs.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-etV50QRH.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-etV50QRH.esm.js.map +1 -0
- package/dist/index.cjs +580 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +511 -191
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +511 -191
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-DUvZEpjA.native.esm.js → isMfaRequiredForAction-B2vKX31S.native.esm.js} +32 -3
- package/dist/isMfaRequiredForAction-B2vKX31S.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-D9p_du8C.esm.js → isMfaRequiredForAction-Dy4-S3mr.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-D9p_du8C.esm.js.map → isMfaRequiredForAction-Dy4-S3mr.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-6N6JB7wa.cjs → isMfaRequiredForAction-K2Jh-3-j.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-6N6JB7wa.cjs.map → isMfaRequiredForAction-K2Jh-3-j.cjs.map} +1 -1
- 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/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/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/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/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.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts +2 -7
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.types.d.ts +8 -0
- package/dist/modules/waas/createWaasClient/createWaasClient.types.d.ts.map +1 -0
- package/dist/modules/waas/createWaasClient/createWaasSDKContainer.d.ts +15 -0
- package/dist/modules/waas/createWaasClient/createWaasSDKContainer.d.ts.map +1 -0
- package/dist/modules/waas/createWaasClient/translateNativeOpenError.d.ts +18 -0
- package/dist/modules/waas/createWaasClient/translateNativeOpenError.d.ts.map +1 -0
- 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 +26 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -0
- 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/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 +6 -1
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +11 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.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/walletProvider/walletProvider.types.d.ts +10 -0
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- 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.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +208 -7
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +5 -5
- package/dist/InvalidParamError-BPMi0iWC.esm.js.map +0 -1
- package/dist/InvalidParamError-CDmVW2DS.native.esm.js.map +0 -1
- package/dist/InvalidParamError-DEmLKJKZ.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-BZsBHRQe.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-Chpne8_Q.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-Cntietge.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-CEeFL-gV.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-JGrKwBj7.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-szJOsbQN.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-B46O0B48.cjs +0 -887
- package/dist/getVerifiedCredentialForWalletAccount-B46O0B48.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CyykSi-M.native.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-CyykSi-M.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DzwIoeHm.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-DzwIoeHm.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-DUvZEpjA.native.esm.js.map +0 -1
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/buildUriDeeplinkOptions.d.ts +0 -28
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/buildUriDeeplinkOptions.d.ts.map +0 -1
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/index.d.ts +0 -2
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/index.d.ts.map +0 -1
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/index.d.ts +0 -2
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/index.d.ts.map +0 -1
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/resolveUriConnectionType.d.ts +0 -17
- package/dist/modules/walletOptionsCatalogue/buildUriDeeplinkOptions/resolveUriConnectionType/resolveUriConnectionType.d.ts.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
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-BIptAjbC.native.esm.js";
|
|
2
|
+
import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, C as createKeychainService, D as CannotTrackError, F as getBuffer, I as subscribeWithSelector, L as isEqualShallow, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as createStorage, S as createRealtimeService, T as createCrossTabBroadcast, _ 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 INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, 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, w as createLogger, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError } from "./getNetworkProviderFromNetworkId-B7DIqT2T.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-CLyC2nOl.native.esm.js";
|
|
4
|
+
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BbOA5rPd.native.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-B2vKX31S.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";
|
|
@@ -55,14 +55,6 @@ const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
|
55
55
|
return url.href;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
|
|
60
|
-
/** @not-instrumented */
|
|
61
|
-
const prefetchNoncesIfNeeded = async (client) => {
|
|
62
|
-
if (getCore(client).state.get().prefetchedNonces.length >= NONCE_POOL_SIZE) return;
|
|
63
|
-
await fetchAndStoreNonces(client);
|
|
64
|
-
};
|
|
65
|
-
|
|
66
58
|
//#endregion
|
|
67
59
|
//#region src/services/runtimeServices/createRuntimeServices/createRuntimeServices.ts
|
|
68
60
|
/**
|
|
@@ -80,6 +72,14 @@ const createRuntimeServices = () => {
|
|
|
80
72
|
};
|
|
81
73
|
};
|
|
82
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
|
+
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts
|
|
85
85
|
/**
|
|
@@ -2407,18 +2407,25 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2407
2407
|
});
|
|
2408
2408
|
|
|
2409
2409
|
//#endregion
|
|
2410
|
-
//#region src/modules/balances/
|
|
2410
|
+
//#region src/modules/balances/getTokenBalances/getTokenBalances.ts
|
|
2411
2411
|
/**
|
|
2412
|
-
* 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.
|
|
2413
2414
|
*
|
|
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.
|
|
2418
|
+
*
|
|
2419
|
+
* For native-only balance, use {@link getNativeBalance}. For a
|
|
2420
|
+
* multi-chain portfolio across many addresses, use
|
|
2421
|
+
* {@link getMultichainTokenBalances}.
|
|
2415
2422
|
*
|
|
2416
2423
|
* @param params.walletAccount - The wallet account to get the balances for.
|
|
2417
2424
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2418
2425
|
* @returns A promise that resolves to an array of token balances.
|
|
2419
2426
|
* @not-instrumented
|
|
2420
2427
|
*/
|
|
2421
|
-
const
|
|
2428
|
+
const getTokenBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2422
2429
|
const core = getCore(client);
|
|
2423
2430
|
const apiClient = createApiClient({}, client);
|
|
2424
2431
|
if (!networkId && !networkIds) {
|
|
@@ -2440,19 +2447,22 @@ const getBalances = async ({ walletAccount, networkId, networkIds, includePrices
|
|
|
2440
2447
|
};
|
|
2441
2448
|
|
|
2442
2449
|
//#endregion
|
|
2443
|
-
//#region src/modules/balances/
|
|
2450
|
+
//#region src/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.ts
|
|
2444
2451
|
/**
|
|
2445
|
-
* Retrieves token balances across multiple
|
|
2452
|
+
* Retrieves token balances across multiple chains, networks, and addresses
|
|
2453
|
+
* in a single batched API request.
|
|
2446
2454
|
*
|
|
2447
|
-
*
|
|
2448
|
-
*
|
|
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}.
|
|
2449
2459
|
*
|
|
2450
2460
|
* @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
|
|
2451
2461
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2452
2462
|
* @returns A promise that resolves to the chain balances across multiple networks.
|
|
2453
2463
|
* @not-instrumented
|
|
2454
2464
|
*/
|
|
2455
|
-
const
|
|
2465
|
+
const getMultichainTokenBalances = async ({ balanceRequest }, client = getDefaultClient()) => {
|
|
2456
2466
|
const core = getCore(client);
|
|
2457
2467
|
return (await createApiClient({}, client).postMultichainAccountBalances({
|
|
2458
2468
|
environmentId: core.environmentId,
|
|
@@ -2867,7 +2877,7 @@ const ensureCorrectActiveNetwork = async ({ requiredNetworkId, walletProvider },
|
|
|
2867
2877
|
* @returns The transaction hash.
|
|
2868
2878
|
* @instrumented
|
|
2869
2879
|
*/
|
|
2870
|
-
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = getDefaultClient()) => {
|
|
2880
|
+
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange, sponsorshipMode }, client = getDefaultClient()) => {
|
|
2871
2881
|
if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
|
|
2872
2882
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
2873
2883
|
assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
|
|
@@ -2878,6 +2888,7 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
|
|
|
2878
2888
|
const { transactionHash } = await walletProvider.executeSwapTransaction({
|
|
2879
2889
|
onStepChange,
|
|
2880
2890
|
signingPayload,
|
|
2891
|
+
sponsorshipMode,
|
|
2881
2892
|
walletAccount
|
|
2882
2893
|
});
|
|
2883
2894
|
return { transactionHash };
|
|
@@ -3062,7 +3073,7 @@ const detectDeviceRegistrationRedirect = ({ url }) => {
|
|
|
3062
3073
|
/** @not-instrumented */
|
|
3063
3074
|
const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
3064
3075
|
const core = getCore(client);
|
|
3065
|
-
const apiClient = createApiClient({}, client);
|
|
3076
|
+
const apiClient = createApiClient({ skipSessionExpiryLogout: true }, client);
|
|
3066
3077
|
try {
|
|
3067
3078
|
return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
|
|
3068
3079
|
} catch (error) {
|
|
@@ -3341,6 +3352,115 @@ const __createCryptoDotComPayment_wrapped = instrumentFunction({
|
|
|
3341
3352
|
}
|
|
3342
3353
|
});
|
|
3343
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
|
+
|
|
3344
3464
|
//#endregion
|
|
3345
3465
|
//#region src/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.ts
|
|
3346
3466
|
/**
|
|
@@ -3658,30 +3778,39 @@ const transformGroup = ({ group }) => {
|
|
|
3658
3778
|
};
|
|
3659
3779
|
|
|
3660
3780
|
//#endregion
|
|
3661
|
-
//#region src/
|
|
3781
|
+
//#region src/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.ts
|
|
3662
3782
|
/**
|
|
3663
|
-
*
|
|
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`.
|
|
3664
3795
|
* @not-instrumented
|
|
3665
3796
|
*/
|
|
3666
|
-
const
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
eclipse: "ECLIPSE",
|
|
3673
|
-
evm: "EVM",
|
|
3674
|
-
flow: "FLOW",
|
|
3675
|
-
sol: "SOL",
|
|
3676
|
-
spark: "SPARK",
|
|
3677
|
-
starknet: "STARK",
|
|
3678
|
-
sui: "SUI",
|
|
3679
|
-
ton: "TON",
|
|
3680
|
-
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
|
+
});
|
|
3681
3803
|
};
|
|
3804
|
+
|
|
3805
|
+
//#endregion
|
|
3806
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.ts
|
|
3682
3807
|
/**
|
|
3683
3808
|
* Extracts the chain prefix from a chain identifier string.
|
|
3684
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
|
|
3685
3814
|
*/
|
|
3686
3815
|
const extractChainPrefix = ({ chainIdentifier }) => {
|
|
3687
3816
|
const colonIndex = chainIdentifier.indexOf(":");
|
|
@@ -3689,80 +3818,22 @@ const extractChainPrefix = ({ chainIdentifier }) => {
|
|
|
3689
3818
|
return chainIdentifier.substring(0, colonIndex);
|
|
3690
3819
|
};
|
|
3691
3820
|
/**
|
|
3692
|
-
*
|
|
3693
|
-
*
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
chain: "SOL",
|
|
3698
|
-
pattern: "sol"
|
|
3699
|
-
},
|
|
3700
|
-
{
|
|
3701
|
-
chain: "SOL",
|
|
3702
|
-
pattern: "solana"
|
|
3703
|
-
},
|
|
3704
|
-
{
|
|
3705
|
-
chain: "BTC",
|
|
3706
|
-
pattern: "btc"
|
|
3707
|
-
},
|
|
3708
|
-
{
|
|
3709
|
-
chain: "BTC",
|
|
3710
|
-
pattern: "bitcoin"
|
|
3711
|
-
},
|
|
3712
|
-
{
|
|
3713
|
-
chain: "STARK",
|
|
3714
|
-
pattern: "stark"
|
|
3715
|
-
},
|
|
3716
|
-
{
|
|
3717
|
-
chain: "STARK",
|
|
3718
|
-
pattern: "starknet"
|
|
3719
|
-
},
|
|
3720
|
-
{
|
|
3721
|
-
chain: "SUI",
|
|
3722
|
-
pattern: "sui"
|
|
3723
|
-
},
|
|
3724
|
-
{
|
|
3725
|
-
chain: "APTOS",
|
|
3726
|
-
pattern: "aptos"
|
|
3727
|
-
},
|
|
3728
|
-
{
|
|
3729
|
-
chain: "COSMOS",
|
|
3730
|
-
pattern: "cosmos"
|
|
3731
|
-
},
|
|
3732
|
-
{
|
|
3733
|
-
chain: "FLOW",
|
|
3734
|
-
pattern: "flow"
|
|
3735
|
-
},
|
|
3736
|
-
{
|
|
3737
|
-
chain: "ALGO",
|
|
3738
|
-
pattern: "algo"
|
|
3739
|
-
},
|
|
3740
|
-
{
|
|
3741
|
-
chain: "TRON",
|
|
3742
|
-
pattern: "tron"
|
|
3743
|
-
},
|
|
3744
|
-
{
|
|
3745
|
-
chain: "TON",
|
|
3746
|
-
pattern: "ton"
|
|
3747
|
-
},
|
|
3748
|
-
{
|
|
3749
|
-
chain: "SPARK",
|
|
3750
|
-
pattern: "spark"
|
|
3751
|
-
},
|
|
3752
|
-
{
|
|
3753
|
-
chain: "ECLIPSE",
|
|
3754
|
-
pattern: "eclipse"
|
|
3755
|
-
}
|
|
3756
|
-
];
|
|
3757
|
-
/**
|
|
3758
|
-
* 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.
|
|
3759
3826
|
*
|
|
3760
3827
|
* @param params.walletKey - The wallet key identifier.
|
|
3761
3828
|
* @returns The chain type if found, undefined otherwise.
|
|
3762
3829
|
*/
|
|
3763
3830
|
const getChainFromWalletKey = ({ walletKey }) => {
|
|
3764
3831
|
const lowerKey = walletKey.toLowerCase();
|
|
3765
|
-
|
|
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
|
+
}
|
|
3766
3837
|
};
|
|
3767
3838
|
/**
|
|
3768
3839
|
* Gets the chain from a wallet book entry.
|
|
@@ -3776,8 +3847,11 @@ const getChainFromWalletKey = ({ walletKey }) => {
|
|
|
3776
3847
|
*/
|
|
3777
3848
|
const getChainFromWalletSchema = ({ wallet, walletKey }) => {
|
|
3778
3849
|
if (wallet.injectedConfig && wallet.injectedConfig.length > 0) {
|
|
3779
|
-
const injectedChain = wallet.injectedConfig[0].chain
|
|
3780
|
-
if (injectedChain
|
|
3850
|
+
const injectedChain = wallet.injectedConfig[0].chain;
|
|
3851
|
+
if (injectedChain) {
|
|
3852
|
+
const chain = getChainFromWalletBookIdentifier({ identifier: injectedChain });
|
|
3853
|
+
if (chain) return chain;
|
|
3854
|
+
}
|
|
3781
3855
|
}
|
|
3782
3856
|
if (wallet.chains && wallet.chains.length > 0) {
|
|
3783
3857
|
const firstChain = wallet.chains[0];
|
|
@@ -4025,6 +4099,106 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
4025
4099
|
}
|
|
4026
4100
|
};
|
|
4027
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
|
+
|
|
4028
4202
|
//#endregion
|
|
4029
4203
|
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
4030
4204
|
/**
|
|
@@ -4184,50 +4358,156 @@ const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
|
|
|
4184
4358
|
};
|
|
4185
4359
|
|
|
4186
4360
|
//#endregion
|
|
4187
|
-
//#region src/modules/
|
|
4361
|
+
//#region src/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.ts
|
|
4188
4362
|
/**
|
|
4189
|
-
*
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4192
|
-
*
|
|
4193
|
-
*
|
|
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.
|
|
4194
4368
|
*
|
|
4195
|
-
* @param params.
|
|
4196
|
-
* @returns
|
|
4369
|
+
* @param params.wallet - The wallet schema from the wallet book.
|
|
4370
|
+
* @returns True when the wallet has a native or universal mobile link.
|
|
4197
4371
|
* @not-instrumented
|
|
4198
4372
|
*/
|
|
4199
|
-
const
|
|
4373
|
+
const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
|
|
4200
4374
|
|
|
4201
4375
|
//#endregion
|
|
4202
|
-
//#region src/modules/walletOptionsCatalogue/
|
|
4376
|
+
//#region src/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.ts
|
|
4203
4377
|
/**
|
|
4204
|
-
*
|
|
4205
|
-
* least one mobile deeplink — that's the value-add the option provides
|
|
4206
|
-
* over the bare pairing URI. Wallets that exist in the wallet book but
|
|
4207
|
-
* don't expose a deeplink (rare, but present) are silently skipped.
|
|
4378
|
+
* Wallet option key the MetaMask SDK URI extension targets.
|
|
4208
4379
|
*/
|
|
4209
|
-
const
|
|
4380
|
+
const METAMASK_WALLET_OPTION_KEY = "metamask";
|
|
4210
4381
|
/**
|
|
4211
|
-
*
|
|
4212
|
-
*
|
|
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
|
|
4442
|
+
/**
|
|
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
|
|
4213
4495
|
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
4214
4496
|
* without `sign_v2` support are excluded — same surface as
|
|
4215
4497
|
* `getWalletConnectCatalog`.
|
|
4216
4498
|
*
|
|
4217
|
-
*
|
|
4218
|
-
*
|
|
4219
|
-
*
|
|
4220
|
-
*
|
|
4221
|
-
*
|
|
4222
|
-
*
|
|
4223
|
-
* `connectWithMetaMaskUriSolana`. Emitted only for the MetaMask
|
|
4224
|
-
* wallet entry — see `resolveUriConnectionType`.
|
|
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.
|
|
4225
4505
|
*
|
|
4226
4506
|
* @param params.walletBook - The fetched wallet book.
|
|
4227
|
-
* @returns Tagged options paired with their wallet option keys.
|
|
4507
|
+
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
4228
4508
|
* @not-instrumented
|
|
4229
4509
|
*/
|
|
4230
|
-
const
|
|
4510
|
+
const buildWalletConnectOptions = ({ walletBook }) => {
|
|
4231
4511
|
const result = [];
|
|
4232
4512
|
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4233
4513
|
if (shouldFilterWalletForWalletConnect({
|
|
@@ -4239,18 +4519,19 @@ const buildUriDeeplinkOptions = ({ walletBook }) => {
|
|
|
4239
4519
|
wallet,
|
|
4240
4520
|
walletKey
|
|
4241
4521
|
});
|
|
4242
|
-
|
|
4522
|
+
if (walletOptionKey === "metamask") continue;
|
|
4523
|
+
const chains = getChainsFromWalletSchema({
|
|
4243
4524
|
wallet,
|
|
4244
4525
|
walletKey
|
|
4245
|
-
});
|
|
4246
|
-
result.push({
|
|
4526
|
+
}).filter((chain) => WALLETCONNECT_SUPPORTED_CHAINS.has(chain));
|
|
4527
|
+
for (const chain of chains) result.push({
|
|
4247
4528
|
option: {
|
|
4248
4529
|
chain,
|
|
4249
4530
|
deeplinks: {
|
|
4250
4531
|
native: wallet.mobile?.native,
|
|
4251
4532
|
universal: wallet.mobile?.universal
|
|
4252
4533
|
},
|
|
4253
|
-
type:
|
|
4534
|
+
type: "walletConnect"
|
|
4254
4535
|
},
|
|
4255
4536
|
walletOptionKey
|
|
4256
4537
|
});
|
|
@@ -4267,12 +4548,19 @@ const buildUriDeeplinkOptions = ({ walletBook }) => {
|
|
|
4267
4548
|
*
|
|
4268
4549
|
* Display merge rules (provider self-announced metadata wins where set):
|
|
4269
4550
|
*
|
|
4270
|
-
* - `name`: `displayOverride.name` ?? wallet book group name ??
|
|
4271
|
-
*
|
|
4272
|
-
* - `
|
|
4273
|
-
*
|
|
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).
|
|
4274
4558
|
* - `installationUrls`: copied through if present.
|
|
4275
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
|
+
*
|
|
4276
4564
|
* Why provider precedence: a registered wallet provider knows its own
|
|
4277
4565
|
* brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
|
|
4278
4566
|
* wallet authoring its own identity). The wallet book fills in fields the
|
|
@@ -4290,16 +4578,42 @@ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrl
|
|
|
4290
4578
|
const group = walletBook.groups[walletOptionKey];
|
|
4291
4579
|
const groupSpriteId = group?.brand?.spriteId;
|
|
4292
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;
|
|
4293
4584
|
return {
|
|
4294
4585
|
connectionOptions,
|
|
4295
|
-
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
|
|
4586
|
+
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? walletIconUrl ?? "",
|
|
4296
4587
|
installationUrls,
|
|
4297
4588
|
key: walletOptionKey,
|
|
4298
|
-
name: displayOverride?.name ?? group?.name ?? walletOptionKey,
|
|
4299
|
-
primaryColor: group?.brand?.primaryColor
|
|
4589
|
+
name: displayOverride?.name ?? group?.name ?? walletEntry?.name ?? walletOptionKey,
|
|
4590
|
+
primaryColor: group?.brand?.primaryColor ?? walletEntry?.brand?.primaryColor
|
|
4300
4591
|
};
|
|
4301
4592
|
};
|
|
4302
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
|
+
|
|
4303
4617
|
//#endregion
|
|
4304
4618
|
//#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
|
|
4305
4619
|
/**
|
|
@@ -4379,7 +4693,7 @@ const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().re
|
|
|
4379
4693
|
|
|
4380
4694
|
//#endregion
|
|
4381
4695
|
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
|
|
4382
|
-
const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
|
|
4696
|
+
const normalize = (value) => value === void 0 ? void 0 : value.toLowerCase().replace(/\s+/g, "");
|
|
4383
4697
|
/**
|
|
4384
4698
|
* Looks for a wallet book entry whose `name` or `shortName` normalizes to
|
|
4385
4699
|
* the same string as `candidate`. Used as a fallback by
|
|
@@ -4499,6 +4813,7 @@ const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }
|
|
|
4499
4813
|
const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
|
|
4500
4814
|
const result = [];
|
|
4501
4815
|
for (const entry of entries) {
|
|
4816
|
+
if (!hasWalletProviderConnectMethod({ walletProvider: entry.walletProvider })) continue;
|
|
4502
4817
|
const source = classifyWithWalletProviderSource({ entry });
|
|
4503
4818
|
if (!source) {
|
|
4504
4819
|
getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
|
|
@@ -4793,7 +5108,12 @@ const EMPTY_WALLET_BOOK = {
|
|
|
4793
5108
|
* pass `includeMobileOptions: true` to additionally surface
|
|
4794
5109
|
* WalletConnect, in-app-browser, and install links.
|
|
4795
5110
|
*
|
|
4796
|
-
*
|
|
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.
|
|
5115
|
+
*
|
|
5116
|
+
* @param [params] - Inclusion flag + ordering preference + exclusions.
|
|
4797
5117
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4798
5118
|
* @returns A promise that resolves to the wallet options catalogue.
|
|
4799
5119
|
* @not-instrumented
|
|
@@ -4801,14 +5121,21 @@ const EMPTY_WALLET_BOOK = {
|
|
|
4801
5121
|
const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
|
|
4802
5122
|
const includeMobileOptions = params.includeMobileOptions ?? false;
|
|
4803
5123
|
const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
|
|
5124
|
+
const excludedConnectionOptionTypes = new Set(params.excludedConnectionOptionTypes ?? []);
|
|
4804
5125
|
const walletBook = includeMobileOptions ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
|
|
4805
5126
|
const allConnectionOptions = [];
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
5127
|
+
if (!excludedConnectionOptionTypes.has("withWalletProvider")) {
|
|
5128
|
+
const entries = getWalletProviderRegistry(client).listProviderEntries();
|
|
5129
|
+
allConnectionOptions.push(...buildWithWalletProviderOptions({
|
|
5130
|
+
entries,
|
|
5131
|
+
walletBook
|
|
5132
|
+
}, client));
|
|
5133
|
+
}
|
|
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
|
+
}
|
|
4812
5139
|
const installationUrlsByKey = includeMobileOptions ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
|
|
4813
5140
|
const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
|
|
4814
5141
|
const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
|
|
@@ -6734,33 +7061,6 @@ const __confirmTransaction_wrapped = instrumentFunction({
|
|
|
6734
7061
|
}
|
|
6735
7062
|
});
|
|
6736
7063
|
|
|
6737
|
-
//#endregion
|
|
6738
|
-
//#region src/utils/isMobile/isMobile.ts
|
|
6739
|
-
/**
|
|
6740
|
-
* Sourced from http://detectmobilebrowsers.com/
|
|
6741
|
-
* @not-instrumented
|
|
6742
|
-
*/
|
|
6743
|
-
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;
|
|
6744
|
-
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;
|
|
6745
|
-
/** @not-instrumented */
|
|
6746
|
-
const isMobile = (maxTouchPointsOverride) => {
|
|
6747
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6748
|
-
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
|
|
6749
|
-
};
|
|
6750
|
-
/** @not-instrumented */
|
|
6751
|
-
const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
|
|
6752
|
-
/**
|
|
6753
|
-
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
6754
|
-
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
6755
|
-
* to mock it
|
|
6756
|
-
* @not-instrumented
|
|
6757
|
-
*/
|
|
6758
|
-
const isIPad = (maxTouchPointsOverride) => {
|
|
6759
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6760
|
-
const maxTouchPoints = maxTouchPointsOverride || navigator.maxTouchPoints;
|
|
6761
|
-
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
6762
|
-
};
|
|
6763
|
-
|
|
6764
7064
|
//#endregion
|
|
6765
7065
|
//#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
|
|
6766
7066
|
/** @not-instrumented */
|
|
@@ -7102,7 +7402,7 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
7102
7402
|
* @not-instrumented
|
|
7103
7403
|
*/
|
|
7104
7404
|
const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
7105
|
-
return getWalletProviders(client).filter((walletProvider) =>
|
|
7405
|
+
return getWalletProviders(client).filter((walletProvider) => hasWalletProviderConnectMethod({ walletProvider })).map((walletProvider) => ({
|
|
7106
7406
|
chain: walletProvider.chain,
|
|
7107
7407
|
groupKey: walletProvider.groupKey,
|
|
7108
7408
|
key: walletProvider.key,
|
|
@@ -7165,6 +7465,22 @@ const getWalletProviderDataByKey = ({ walletProviderKey }, client = getDefaultCl
|
|
|
7165
7465
|
};
|
|
7166
7466
|
};
|
|
7167
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
|
+
|
|
7168
7484
|
//#endregion
|
|
7169
7485
|
//#region src/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.ts
|
|
7170
7486
|
/**
|
|
@@ -7276,19 +7592,23 @@ const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
|
|
|
7276
7592
|
};
|
|
7277
7593
|
|
|
7278
7594
|
//#endregion
|
|
7279
|
-
//#region src/modules/wallets/networks/
|
|
7595
|
+
//#region src/modules/wallets/networks/getNativeBalance/getNativeBalance.ts
|
|
7280
7596
|
/**
|
|
7281
|
-
* 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.
|
|
7282
7600
|
*
|
|
7283
|
-
*
|
|
7284
|
-
* (
|
|
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}.
|
|
7285
7605
|
*
|
|
7286
7606
|
* @param params.walletAccount - The wallet account to get the balance for.
|
|
7287
7607
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7288
7608
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
7289
7609
|
* @not-instrumented
|
|
7290
7610
|
*/
|
|
7291
|
-
const
|
|
7611
|
+
const getNativeBalance = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
7292
7612
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
7293
7613
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
7294
7614
|
return getNetworkProviderFromNetworkId({
|
|
@@ -7746,5 +8066,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
7746
8066
|
assertPackageVersion(name, version);
|
|
7747
8067
|
|
|
7748
8068
|
//#endregion
|
|
7749
|
-
export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, matchWalletProvidersToCatalogGroup, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized };
|
|
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 };
|
|
7750
8070
|
//# sourceMappingURL=index.native.esm.js.map
|