@dynamic-labs-sdk/client 1.4.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-DEmLKJKZ.cjs → InvalidParamError-DKJhDrK8.cjs} +1007 -116
- package/dist/InvalidParamError-DKJhDrK8.cjs.map +1 -0
- package/dist/{InvalidParamError-BPMi0iWC.esm.js → InvalidParamError-DWjMfOZ5.esm.js} +800 -92
- package/dist/InvalidParamError-DWjMfOZ5.esm.js.map +1 -0
- package/dist/{InvalidParamError-CDmVW2DS.native.esm.js → InvalidParamError-DkAMYJOW.native.esm.js} +833 -92
- package/dist/InvalidParamError-DkAMYJOW.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-Cntietge.esm.js → NotWaasWalletAccountError-BVrvQzLz.native.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-BVrvQzLz.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-Chpne8_Q.native.esm.js → NotWaasWalletAccountError-C7NUlvvM.esm.js} +4 -4
- package/dist/NotWaasWalletAccountError-C7NUlvvM.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BZsBHRQe.cjs → NotWaasWalletAccountError-CHzpa9kk.cjs} +4 -4
- package/dist/NotWaasWalletAccountError-CHzpa9kk.cjs.map +1 -0
- package/dist/core.cjs +45 -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 +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-szJOsbQN.cjs → getNetworkProviderFromNetworkId-BJ27N-7S.cjs} +44 -341
- package/dist/getNetworkProviderFromNetworkId-BJ27N-7S.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-JGrKwBj7.native.esm.js → getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js} +38 -299
- package/dist/getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-CEeFL-gV.esm.js → getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js} +42 -270
- package/dist/getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js.map +1 -0
- package/dist/{getSignedSessionId-BOx1nFt_.esm.js → getSignedSessionId-CDdKrnw6.esm.js} +3 -3
- package/dist/{getSignedSessionId-BOx1nFt_.esm.js.map → getSignedSessionId-CDdKrnw6.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BxOK-Tdo.cjs → getSignedSessionId-CHDHr-hY.cjs} +3 -3
- package/dist/{getSignedSessionId-BxOK-Tdo.cjs.map → getSignedSessionId-CHDHr-hY.cjs.map} +1 -1
- package/dist/{getSignedSessionId-B5DikCap.native.esm.js → getSignedSessionId-D3KQrN8W.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-B5DikCap.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 +580 -253
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +514 -194
- 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-B0xNvBpU.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DUvZEpjA.native.esm.js.map → isMfaRequiredForAction-B0xNvBpU.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-6N6JB7wa.cjs → isMfaRequiredForAction-CLMvTTwl.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-6N6JB7wa.cjs.map → isMfaRequiredForAction-CLMvTTwl.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-D9p_du8C.esm.js → isMfaRequiredForAction-C_QPI1LH.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-D9p_du8C.esm.js.map → isMfaRequiredForAction-C_QPI1LH.esm.js.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/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.native.esm.js +3 -3
- package/package.json +4 -4
- 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/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.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B 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 scrubParameters, B as getNonce, D as formatWalletAccountId, E as CHAINS_INFO_MAP, F as onceEvent, G as InvalidExternalAuthError, H as MfaRateLimitedError, J as isCookieEnabled, K as APIError, M as emitEvent, N as offEvent, O as normalizeAddress, P as onEvent, Q as instrumentFunction, T as getChainFromVerifiedCredentialChain, U as MfaInvalidOtpError, V as SandboxMaximumThresholdReachedError, W as LinkCredentialError, X as ValueMustBeDefinedError, Y as assertDefined, Z as __getElevatedAccessToken_wrapped, _ as generateSessionKeys, a as DYNAMIC_ICONIC_SPRITE_URL, b as isSignedIn, c as createApiClient, ct as setDefaultClient, dt as getCore, et as DEFAULT_PII_FIELDS, f as getWalletProviderFromWalletAccount, ft as name, g as NoWalletProviderFoundError, j as retryOnFail, k as splitWalletProviderKey, l as UnauthorizedError, m as getWalletProviderRegistry, nt as extractSessionId, o as SDK_API_CORE_VERSION, ot as NONCE_POOL_SIZE, p as WalletProviderPriority, pt as version, rt as randomString, s as fetchAndStoreNonces, st as getDefaultClient, t as InvalidParamError, tt as getUserAgent, u as __logoutWithReason_wrapped, ut as BaseError, v as fetchProjectSettings, x as getWalletAccounts, y as createStorageKeySchema } from "./InvalidParamError-DWjMfOZ5.esm.js";
|
|
2
|
+
import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as createLocalStorageAdapter, 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 isCaptchaRequired, a as verifyMessageSignatureOwnership, b as NoNetworkProvidersError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as consumeCaptchaToken, h as __setCaptchaToken_wrapped, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as getAppMetadata, m as hasExtension, o as removeUnverifiedWalletAccount, p as createVisit, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as MethodNotImplementedError, w as createLogger, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError } from "./getNetworkProviderFromNetworkId-Cqp9eRSs.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-BuUCX040.esm.js";
|
|
4
|
+
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-C7NUlvvM.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-C_QPI1LH.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";
|
|
9
|
-
import EventEmitter, { EventEmitter
|
|
9
|
+
import EventEmitter$1, { EventEmitter } from "eventemitter3";
|
|
10
10
|
import { browserSupportsWebAuthn, startAuthentication, startRegistration } from "@simplewebauthn/browser";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/state/raiseStateEvents/events.ts
|
|
@@ -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
|
/**
|
|
@@ -565,7 +565,7 @@ const createAsyncTrack = () => {
|
|
|
565
565
|
* This ensures no process is missed (as it would throw when tracked on a different node tick).
|
|
566
566
|
*/
|
|
567
567
|
let isTrackEnabled = true;
|
|
568
|
-
const eventEmitter = new EventEmitter
|
|
568
|
+
const eventEmitter = new EventEmitter();
|
|
569
569
|
const allSettledPromise = createDeferredPromise();
|
|
570
570
|
const tracker = /* @__PURE__ */ new Map();
|
|
571
571
|
/**
|
|
@@ -612,7 +612,7 @@ const createAsyncTrack = () => {
|
|
|
612
612
|
//#endregion
|
|
613
613
|
//#region src/services/eventEmitter/createEventEmitter.ts
|
|
614
614
|
/** @not-instrumented */
|
|
615
|
-
const createEventEmitter = () => new EventEmitter();
|
|
615
|
+
const createEventEmitter = () => new EventEmitter$1();
|
|
616
616
|
|
|
617
617
|
//#endregion
|
|
618
618
|
//#region src/errors/UnavailableInServerSideError.ts
|
|
@@ -2318,18 +2318,25 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2318
2318
|
});
|
|
2319
2319
|
|
|
2320
2320
|
//#endregion
|
|
2321
|
-
//#region src/modules/balances/
|
|
2321
|
+
//#region src/modules/balances/getTokenBalances/getTokenBalances.ts
|
|
2322
2322
|
/**
|
|
2323
|
-
* Retrieves the token balances for a wallet account.
|
|
2323
|
+
* Retrieves the token balances for a wallet account on one chain. Fetched
|
|
2324
|
+
* from the Dynamic API.
|
|
2324
2325
|
*
|
|
2325
|
-
*
|
|
2326
|
+
* Use this for ERC-20-style token balances scoped to a single wallet
|
|
2327
|
+
* account. Supports optional spam filtering, price inclusion, native-token
|
|
2328
|
+
* inclusion, and one-or-many networks within the wallet's chain.
|
|
2329
|
+
*
|
|
2330
|
+
* For native-only balance, use {@link getNativeBalance}. For a
|
|
2331
|
+
* multi-chain portfolio across many addresses, use
|
|
2332
|
+
* {@link getMultichainTokenBalances}.
|
|
2326
2333
|
*
|
|
2327
2334
|
* @param params.walletAccount - The wallet account to get the balances for.
|
|
2328
2335
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2329
2336
|
* @returns A promise that resolves to an array of token balances.
|
|
2330
2337
|
* @not-instrumented
|
|
2331
2338
|
*/
|
|
2332
|
-
const
|
|
2339
|
+
const getTokenBalances = async ({ walletAccount, networkId, networkIds, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2333
2340
|
const core = getCore(client);
|
|
2334
2341
|
const apiClient = createApiClient({}, client);
|
|
2335
2342
|
if (!networkId && !networkIds) {
|
|
@@ -2351,19 +2358,22 @@ const getBalances = async ({ walletAccount, networkId, networkIds, includePrices
|
|
|
2351
2358
|
};
|
|
2352
2359
|
|
|
2353
2360
|
//#endregion
|
|
2354
|
-
//#region src/modules/balances/
|
|
2361
|
+
//#region src/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.ts
|
|
2355
2362
|
/**
|
|
2356
|
-
* Retrieves token balances across multiple
|
|
2363
|
+
* Retrieves token balances across multiple chains, networks, and addresses
|
|
2364
|
+
* in a single batched API request.
|
|
2357
2365
|
*
|
|
2358
|
-
*
|
|
2359
|
-
*
|
|
2366
|
+
* Use this for portfolio-style views that need to render a user's holdings
|
|
2367
|
+
* across their entire multi-chain wallet set. For a single account on one
|
|
2368
|
+
* chain, use {@link getTokenBalances}; for native-only balance, use
|
|
2369
|
+
* {@link getNativeBalance}.
|
|
2360
2370
|
*
|
|
2361
2371
|
* @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
|
|
2362
2372
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2363
2373
|
* @returns A promise that resolves to the chain balances across multiple networks.
|
|
2364
2374
|
* @not-instrumented
|
|
2365
2375
|
*/
|
|
2366
|
-
const
|
|
2376
|
+
const getMultichainTokenBalances = async ({ balanceRequest }, client = getDefaultClient()) => {
|
|
2367
2377
|
const core = getCore(client);
|
|
2368
2378
|
return (await createApiClient({}, client).postMultichainAccountBalances({
|
|
2369
2379
|
environmentId: core.environmentId,
|
|
@@ -2778,7 +2788,7 @@ const ensureCorrectActiveNetwork = async ({ requiredNetworkId, walletProvider },
|
|
|
2778
2788
|
* @returns The transaction hash.
|
|
2779
2789
|
* @instrumented
|
|
2780
2790
|
*/
|
|
2781
|
-
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = getDefaultClient()) => {
|
|
2791
|
+
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange, sponsorshipMode }, client = getDefaultClient()) => {
|
|
2782
2792
|
if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
|
|
2783
2793
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
2784
2794
|
assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
|
|
@@ -2789,6 +2799,7 @@ const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepCha
|
|
|
2789
2799
|
const { transactionHash } = await walletProvider.executeSwapTransaction({
|
|
2790
2800
|
onStepChange,
|
|
2791
2801
|
signingPayload,
|
|
2802
|
+
sponsorshipMode,
|
|
2792
2803
|
walletAccount
|
|
2793
2804
|
});
|
|
2794
2805
|
return { transactionHash };
|
|
@@ -2973,7 +2984,7 @@ const detectDeviceRegistrationRedirect = ({ url }) => {
|
|
|
2973
2984
|
/** @not-instrumented */
|
|
2974
2985
|
const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
2975
2986
|
const core = getCore(client);
|
|
2976
|
-
const apiClient = createApiClient({}, client);
|
|
2987
|
+
const apiClient = createApiClient({ skipSessionExpiryLogout: true }, client);
|
|
2977
2988
|
try {
|
|
2978
2989
|
return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
|
|
2979
2990
|
} catch (error) {
|
|
@@ -3252,6 +3263,115 @@ const __createCryptoDotComPayment_wrapped = instrumentFunction({
|
|
|
3252
3263
|
}
|
|
3253
3264
|
});
|
|
3254
3265
|
|
|
3266
|
+
//#endregion
|
|
3267
|
+
//#region src/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.ts
|
|
3268
|
+
/**
|
|
3269
|
+
* Fetches the list of crypto currencies supported by MoonPay for the given chain
|
|
3270
|
+
* and network, filtered to active currencies only. Requires a MoonPay publishable
|
|
3271
|
+
* API key to be configured for the environment.
|
|
3272
|
+
*
|
|
3273
|
+
* @param params - The chain and optional network ID to filter currencies by.
|
|
3274
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3275
|
+
* @returns An array of supported MoonPay currencies.
|
|
3276
|
+
* @instrumented
|
|
3277
|
+
*/
|
|
3278
|
+
const getMoonPayCurrencies = async (params, client = getDefaultClient()) => {
|
|
3279
|
+
const core = getCore(client);
|
|
3280
|
+
return (await createApiClient({ includeMfaToken: true }, client).getMoonPayCurrencies({
|
|
3281
|
+
chain: params.chain,
|
|
3282
|
+
environmentId: core.environmentId,
|
|
3283
|
+
...params.networkId ? { networkId: params.networkId } : {}
|
|
3284
|
+
})).currencies ?? [];
|
|
3285
|
+
};
|
|
3286
|
+
const __getMoonPayCurrencies_impl = getMoonPayCurrencies;
|
|
3287
|
+
const __getMoonPayCurrencies_wrapped = instrumentFunction({
|
|
3288
|
+
fn: __getMoonPayCurrencies_impl,
|
|
3289
|
+
functionName: "getMoonPayCurrencies",
|
|
3290
|
+
getCore: () => {
|
|
3291
|
+
try {
|
|
3292
|
+
return getCore(getDefaultClient());
|
|
3293
|
+
} catch {
|
|
3294
|
+
return;
|
|
3295
|
+
}
|
|
3296
|
+
}
|
|
3297
|
+
});
|
|
3298
|
+
|
|
3299
|
+
//#endregion
|
|
3300
|
+
//#region src/modules/funding/moonpay/errors/MoonPayInvalidUrlError.ts
|
|
3301
|
+
var MoonPayInvalidUrlError = class extends BaseError {
|
|
3302
|
+
constructor() {
|
|
3303
|
+
super({
|
|
3304
|
+
cause: null,
|
|
3305
|
+
code: "moonpay_invalid_url_error",
|
|
3306
|
+
docsUrl: null,
|
|
3307
|
+
name: "MoonPayInvalidUrlError",
|
|
3308
|
+
shortMessage: "MoonPay is configured but returned an invalid or untrusted URL. This may indicate a misconfiguration — please contact support if the issue persists."
|
|
3309
|
+
});
|
|
3310
|
+
}
|
|
3311
|
+
};
|
|
3312
|
+
|
|
3313
|
+
//#endregion
|
|
3314
|
+
//#region src/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.ts
|
|
3315
|
+
var MoonPayProviderNotAvailableError = class extends BaseError {
|
|
3316
|
+
constructor() {
|
|
3317
|
+
super({
|
|
3318
|
+
cause: null,
|
|
3319
|
+
code: "moonpay_provider_not_available_error",
|
|
3320
|
+
docsUrl: null,
|
|
3321
|
+
name: "MoonPayProviderNotAvailableError",
|
|
3322
|
+
shortMessage: "MoonPay provider not available. Ensure MoonPay is enabled and a publishable API key is configured in the Dynamic dashboard."
|
|
3323
|
+
});
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3326
|
+
|
|
3327
|
+
//#endregion
|
|
3328
|
+
//#region src/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.ts
|
|
3329
|
+
/**
|
|
3330
|
+
* Returns the signed MoonPay URL for the given wallet and token.
|
|
3331
|
+
*
|
|
3332
|
+
* Uses the Dynamic onramp API to retrieve the pre-signed URL that can be
|
|
3333
|
+
* opened in a browser tab to allow the user to purchase crypto via MoonPay.
|
|
3334
|
+
*
|
|
3335
|
+
* @param params - Parameters including chain, wallet address, and optional token/currency filters.
|
|
3336
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3337
|
+
* @returns The signed MoonPay URL.
|
|
3338
|
+
* @instrumented
|
|
3339
|
+
*/
|
|
3340
|
+
const getMoonPayUrl = async (params, client = getDefaultClient()) => {
|
|
3341
|
+
const core = getCore(client);
|
|
3342
|
+
const moonPayProvider = (await createApiClient({ includeMfaToken: true }, client).getSupportedOnramps({
|
|
3343
|
+
chain: params.chain,
|
|
3344
|
+
currency: params.currency,
|
|
3345
|
+
environmentId: core.environmentId,
|
|
3346
|
+
includeDisabled: true,
|
|
3347
|
+
merchantName: params.merchantName,
|
|
3348
|
+
networkId: params.networkId,
|
|
3349
|
+
token: params.token,
|
|
3350
|
+
tokenAmount: params.tokenAmount,
|
|
3351
|
+
walletAddress: params.walletAddress
|
|
3352
|
+
})).onramps?.find((provider) => provider.provider === ProviderEnum.MoonPay);
|
|
3353
|
+
if (!moonPayProvider?.url) throw new MoonPayProviderNotAvailableError();
|
|
3354
|
+
const parsedUrl = new URL(moonPayProvider.url);
|
|
3355
|
+
const isValidHost = parsedUrl.hostname === "moonpay.com" || parsedUrl.hostname.endsWith(".moonpay.com");
|
|
3356
|
+
if (parsedUrl.protocol !== "https:" || !isValidHost) {
|
|
3357
|
+
core.logger.error("[getMoonPayUrl] Invalid URL returned by onramp API", { url: moonPayProvider.url });
|
|
3358
|
+
throw new MoonPayInvalidUrlError();
|
|
3359
|
+
}
|
|
3360
|
+
return moonPayProvider.url;
|
|
3361
|
+
};
|
|
3362
|
+
const __getMoonPayUrl_impl = getMoonPayUrl;
|
|
3363
|
+
const __getMoonPayUrl_wrapped = instrumentFunction({
|
|
3364
|
+
fn: __getMoonPayUrl_impl,
|
|
3365
|
+
functionName: "getMoonPayUrl",
|
|
3366
|
+
getCore: () => {
|
|
3367
|
+
try {
|
|
3368
|
+
return getCore(getDefaultClient());
|
|
3369
|
+
} catch {
|
|
3370
|
+
return;
|
|
3371
|
+
}
|
|
3372
|
+
}
|
|
3373
|
+
});
|
|
3374
|
+
|
|
3255
3375
|
//#endregion
|
|
3256
3376
|
//#region src/modules/funding/kraken/createKrakenExchangeTransfer/createKrakenExchangeTransfer.ts
|
|
3257
3377
|
/**
|
|
@@ -3569,30 +3689,39 @@ const transformGroup = ({ group }) => {
|
|
|
3569
3689
|
};
|
|
3570
3690
|
|
|
3571
3691
|
//#endregion
|
|
3572
|
-
//#region src/
|
|
3692
|
+
//#region src/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.ts
|
|
3573
3693
|
/**
|
|
3574
|
-
*
|
|
3694
|
+
* Resolves a wallet-book chain identifier (as found in
|
|
3695
|
+
* `injectedConfig[].chain` or as an alias embedded in a wallet key) to a
|
|
3696
|
+
* {@link Chain}. Looks up by `apiChainName` first, then by any
|
|
3697
|
+
* `legacyWalletBookAliases` declared on the corresponding `CHAINS_INFO_MAP`
|
|
3698
|
+
* entry.
|
|
3699
|
+
*
|
|
3700
|
+
* Returns `undefined` when the identifier doesn't match any known chain,
|
|
3701
|
+
* letting the caller pick its own fallback (e.g. defaulting to EVM, or
|
|
3702
|
+
* trying a different lookup strategy).
|
|
3703
|
+
*
|
|
3704
|
+
* Centralised here rather than in `legacyWalletBook` so all chain naming
|
|
3705
|
+
* knowledge stays alongside `CHAINS_INFO_MAP`.
|
|
3575
3706
|
* @not-instrumented
|
|
3576
3707
|
*/
|
|
3577
|
-
const
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
eclipse: "ECLIPSE",
|
|
3584
|
-
evm: "EVM",
|
|
3585
|
-
flow: "FLOW",
|
|
3586
|
-
sol: "SOL",
|
|
3587
|
-
spark: "SPARK",
|
|
3588
|
-
starknet: "STARK",
|
|
3589
|
-
sui: "SUI",
|
|
3590
|
-
ton: "TON",
|
|
3591
|
-
tron: "TRON"
|
|
3708
|
+
const getChainFromWalletBookIdentifier = ({ identifier }) => {
|
|
3709
|
+
const normalised = identifier.toLowerCase();
|
|
3710
|
+
return Object.keys(CHAINS_INFO_MAP).find((chain) => {
|
|
3711
|
+
const info = CHAINS_INFO_MAP[chain];
|
|
3712
|
+
return info.apiChainName === normalised || info.legacyWalletBookAliases?.includes(normalised) === true;
|
|
3713
|
+
});
|
|
3592
3714
|
};
|
|
3715
|
+
|
|
3716
|
+
//#endregion
|
|
3717
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.ts
|
|
3593
3718
|
/**
|
|
3594
3719
|
* Extracts the chain prefix from a chain identifier string.
|
|
3595
3720
|
* For example, "eip155:1" -> "eip155", "solana:..." -> "solana"
|
|
3721
|
+
*
|
|
3722
|
+
* Exported so {@link getChainsFromWalletSchema} can apply the same
|
|
3723
|
+
* parsing to its multi-chain pass without duplicating the logic.
|
|
3724
|
+
* @not-instrumented
|
|
3596
3725
|
*/
|
|
3597
3726
|
const extractChainPrefix = ({ chainIdentifier }) => {
|
|
3598
3727
|
const colonIndex = chainIdentifier.indexOf(":");
|
|
@@ -3600,80 +3729,22 @@ const extractChainPrefix = ({ chainIdentifier }) => {
|
|
|
3600
3729
|
return chainIdentifier.substring(0, colonIndex);
|
|
3601
3730
|
};
|
|
3602
3731
|
/**
|
|
3603
|
-
*
|
|
3604
|
-
*
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
chain: "SOL",
|
|
3609
|
-
pattern: "sol"
|
|
3610
|
-
},
|
|
3611
|
-
{
|
|
3612
|
-
chain: "SOL",
|
|
3613
|
-
pattern: "solana"
|
|
3614
|
-
},
|
|
3615
|
-
{
|
|
3616
|
-
chain: "BTC",
|
|
3617
|
-
pattern: "btc"
|
|
3618
|
-
},
|
|
3619
|
-
{
|
|
3620
|
-
chain: "BTC",
|
|
3621
|
-
pattern: "bitcoin"
|
|
3622
|
-
},
|
|
3623
|
-
{
|
|
3624
|
-
chain: "STARK",
|
|
3625
|
-
pattern: "stark"
|
|
3626
|
-
},
|
|
3627
|
-
{
|
|
3628
|
-
chain: "STARK",
|
|
3629
|
-
pattern: "starknet"
|
|
3630
|
-
},
|
|
3631
|
-
{
|
|
3632
|
-
chain: "SUI",
|
|
3633
|
-
pattern: "sui"
|
|
3634
|
-
},
|
|
3635
|
-
{
|
|
3636
|
-
chain: "APTOS",
|
|
3637
|
-
pattern: "aptos"
|
|
3638
|
-
},
|
|
3639
|
-
{
|
|
3640
|
-
chain: "COSMOS",
|
|
3641
|
-
pattern: "cosmos"
|
|
3642
|
-
},
|
|
3643
|
-
{
|
|
3644
|
-
chain: "FLOW",
|
|
3645
|
-
pattern: "flow"
|
|
3646
|
-
},
|
|
3647
|
-
{
|
|
3648
|
-
chain: "ALGO",
|
|
3649
|
-
pattern: "algo"
|
|
3650
|
-
},
|
|
3651
|
-
{
|
|
3652
|
-
chain: "TRON",
|
|
3653
|
-
pattern: "tron"
|
|
3654
|
-
},
|
|
3655
|
-
{
|
|
3656
|
-
chain: "TON",
|
|
3657
|
-
pattern: "ton"
|
|
3658
|
-
},
|
|
3659
|
-
{
|
|
3660
|
-
chain: "SPARK",
|
|
3661
|
-
pattern: "spark"
|
|
3662
|
-
},
|
|
3663
|
-
{
|
|
3664
|
-
chain: "ECLIPSE",
|
|
3665
|
-
pattern: "eclipse"
|
|
3666
|
-
}
|
|
3667
|
-
];
|
|
3668
|
-
/**
|
|
3669
|
-
* Attempts to extract the chain from a wallet key by looking for embedded chain identifiers.
|
|
3732
|
+
* Attempts to extract the chain from a wallet key by looking for embedded
|
|
3733
|
+
* chain identifiers (apiChainName + legacyWalletBookAliases from CHAINS_INFO_MAP).
|
|
3734
|
+
*
|
|
3735
|
+
* Derives patterns dynamically so adding a chain in `CHAINS_INFO_MAP`
|
|
3736
|
+
* picks it up here — no parallel hardcoded list.
|
|
3670
3737
|
*
|
|
3671
3738
|
* @param params.walletKey - The wallet key identifier.
|
|
3672
3739
|
* @returns The chain type if found, undefined otherwise.
|
|
3673
3740
|
*/
|
|
3674
3741
|
const getChainFromWalletKey = ({ walletKey }) => {
|
|
3675
3742
|
const lowerKey = walletKey.toLowerCase();
|
|
3676
|
-
|
|
3743
|
+
const chains = Object.keys(CHAINS_INFO_MAP);
|
|
3744
|
+
for (const chain of chains) {
|
|
3745
|
+
const info = CHAINS_INFO_MAP[chain];
|
|
3746
|
+
if ([info.apiChainName, ...info.legacyWalletBookAliases ?? []].some((pattern) => lowerKey.includes(pattern))) return chain;
|
|
3747
|
+
}
|
|
3677
3748
|
};
|
|
3678
3749
|
/**
|
|
3679
3750
|
* Gets the chain from a wallet book entry.
|
|
@@ -3687,8 +3758,11 @@ const getChainFromWalletKey = ({ walletKey }) => {
|
|
|
3687
3758
|
*/
|
|
3688
3759
|
const getChainFromWalletSchema = ({ wallet, walletKey }) => {
|
|
3689
3760
|
if (wallet.injectedConfig && wallet.injectedConfig.length > 0) {
|
|
3690
|
-
const injectedChain = wallet.injectedConfig[0].chain
|
|
3691
|
-
if (injectedChain
|
|
3761
|
+
const injectedChain = wallet.injectedConfig[0].chain;
|
|
3762
|
+
if (injectedChain) {
|
|
3763
|
+
const chain = getChainFromWalletBookIdentifier({ identifier: injectedChain });
|
|
3764
|
+
if (chain) return chain;
|
|
3765
|
+
}
|
|
3692
3766
|
}
|
|
3693
3767
|
if (wallet.chains && wallet.chains.length > 0) {
|
|
3694
3768
|
const firstChain = wallet.chains[0];
|
|
@@ -3936,6 +4010,106 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3936
4010
|
}
|
|
3937
4011
|
};
|
|
3938
4012
|
|
|
4013
|
+
//#endregion
|
|
4014
|
+
//#region src/utils/isMobile/isMobile.ts
|
|
4015
|
+
/**
|
|
4016
|
+
* Sourced from http://detectmobilebrowsers.com/
|
|
4017
|
+
* @not-instrumented
|
|
4018
|
+
*/
|
|
4019
|
+
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;
|
|
4020
|
+
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;
|
|
4021
|
+
/** @not-instrumented */
|
|
4022
|
+
const isMobile = (maxTouchPointsOverride) => {
|
|
4023
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4024
|
+
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
|
|
4025
|
+
};
|
|
4026
|
+
/** @not-instrumented */
|
|
4027
|
+
const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
|
|
4028
|
+
/**
|
|
4029
|
+
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
4030
|
+
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
4031
|
+
* to mock it
|
|
4032
|
+
* @not-instrumented
|
|
4033
|
+
*/
|
|
4034
|
+
const isIPad = (maxTouchPointsOverride) => {
|
|
4035
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4036
|
+
const maxTouchPoints = maxTouchPointsOverride || navigator.maxTouchPoints;
|
|
4037
|
+
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
4038
|
+
};
|
|
4039
|
+
/** @not-instrumented */
|
|
4040
|
+
const isIOS = (maxTouchPointsOverride) => {
|
|
4041
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4042
|
+
return isIPhone() || isIPad(maxTouchPointsOverride);
|
|
4043
|
+
};
|
|
4044
|
+
/** @not-instrumented */
|
|
4045
|
+
const isAndroid = () => isMobile() && !isIOS();
|
|
4046
|
+
/** @not-instrumented */
|
|
4047
|
+
const isSafariBrowser = () => {
|
|
4048
|
+
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
4049
|
+
const { userAgent } = navigator;
|
|
4050
|
+
return userAgent.includes("Safari") && !userAgent.includes("Chrome") && !userAgent.includes("Chromium");
|
|
4051
|
+
};
|
|
4052
|
+
/** @not-instrumented */
|
|
4053
|
+
const isEdgeBrowser = () => {
|
|
4054
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4055
|
+
return /\bEdg\//.test(navigator.userAgent);
|
|
4056
|
+
};
|
|
4057
|
+
/** @not-instrumented */
|
|
4058
|
+
const isOperaBrowser = () => {
|
|
4059
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4060
|
+
return /\b(OPR|Opera)\//.test(navigator.userAgent);
|
|
4061
|
+
};
|
|
4062
|
+
/** @not-instrumented */
|
|
4063
|
+
const isFirefoxBrowser = () => {
|
|
4064
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4065
|
+
return /\bFirefox\//.test(navigator.userAgent);
|
|
4066
|
+
};
|
|
4067
|
+
/** @not-instrumented */
|
|
4068
|
+
const isChromeBrowser = () => {
|
|
4069
|
+
if (globalThis.window === void 0 || globalThis.navigator === void 0) return false;
|
|
4070
|
+
return /\bChrome\//.test(navigator.userAgent) && !isEdgeBrowser() && !isOperaBrowser();
|
|
4071
|
+
};
|
|
4072
|
+
|
|
4073
|
+
//#endregion
|
|
4074
|
+
//#region src/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.ts
|
|
4075
|
+
/**
|
|
4076
|
+
* Resolves the {@link InstallationUrls} field that matches the platform
|
|
4077
|
+
* the SDK is currently running on:
|
|
4078
|
+
*
|
|
4079
|
+
* - iOS → `ios`
|
|
4080
|
+
* - Android → `android`
|
|
4081
|
+
* - Edge → `edge`
|
|
4082
|
+
* - Opera → `opera`
|
|
4083
|
+
* - Firefox → `firefox`
|
|
4084
|
+
* - Safari → `safari`
|
|
4085
|
+
* - Chrome (or other Chromium-based browsers) → `chrome`
|
|
4086
|
+
*
|
|
4087
|
+
* Returns `undefined` when no entry exists for the detected platform —
|
|
4088
|
+
* callers typically render a "not available on this device" affordance
|
|
4089
|
+
* in that case rather than offering a download targeted at a different
|
|
4090
|
+
* browser/OS.
|
|
4091
|
+
*
|
|
4092
|
+
* Each branch returns exactly the field for the detected platform — no
|
|
4093
|
+
* fallback to a different browser's URL. If you'd rather surface every
|
|
4094
|
+
* link a wallet's manifest publishes so the user can pick where to
|
|
4095
|
+
* install, read `installationUrls` directly instead of going through
|
|
4096
|
+
* this helper.
|
|
4097
|
+
*
|
|
4098
|
+
* @param params.installationUrls - The wallet option's `installationUrls`
|
|
4099
|
+
* record (from `getWalletOptionsCatalogue`).
|
|
4100
|
+
* @returns The install URL for the detected platform, or `undefined`.
|
|
4101
|
+
* @not-instrumented
|
|
4102
|
+
*/
|
|
4103
|
+
const getInstallationLinkForCurrentPlatform = ({ installationUrls }) => {
|
|
4104
|
+
if (isIOS()) return installationUrls.ios;
|
|
4105
|
+
if (isAndroid()) return installationUrls.android;
|
|
4106
|
+
if (isEdgeBrowser()) return installationUrls.edge;
|
|
4107
|
+
if (isOperaBrowser()) return installationUrls.opera;
|
|
4108
|
+
if (isFirefoxBrowser()) return installationUrls.firefox;
|
|
4109
|
+
if (isSafariBrowser()) return installationUrls.safari;
|
|
4110
|
+
if (isChromeBrowser()) return installationUrls.chrome;
|
|
4111
|
+
};
|
|
4112
|
+
|
|
3939
4113
|
//#endregion
|
|
3940
4114
|
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
3941
4115
|
/**
|
|
@@ -4095,50 +4269,156 @@ const buildInstallationUrlsByWalletOptionKey = ({ walletBook }) => {
|
|
|
4095
4269
|
};
|
|
4096
4270
|
|
|
4097
4271
|
//#endregion
|
|
4098
|
-
//#region src/modules/
|
|
4272
|
+
//#region src/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.ts
|
|
4099
4273
|
/**
|
|
4100
|
-
*
|
|
4101
|
-
*
|
|
4102
|
-
*
|
|
4103
|
-
*
|
|
4104
|
-
*
|
|
4274
|
+
* Whether a wallet book entry exposes at least one mobile deeplink the
|
|
4275
|
+
* catalogue can drive — either a native scheme (`metamask://`) or a
|
|
4276
|
+
* universal link (`https://metamask.app.link`). Used by the URI-deeplink
|
|
4277
|
+
* builders (`buildWalletConnectOptions`, `buildMetaMaskSdkUriOptions`)
|
|
4278
|
+
* to skip wallets that have no app to launch.
|
|
4105
4279
|
*
|
|
4106
|
-
* @param params.
|
|
4107
|
-
* @returns
|
|
4280
|
+
* @param params.wallet - The wallet schema from the wallet book.
|
|
4281
|
+
* @returns True when the wallet has a native or universal mobile link.
|
|
4108
4282
|
* @not-instrumented
|
|
4109
4283
|
*/
|
|
4110
|
-
const
|
|
4284
|
+
const hasUsableDeeplink = ({ wallet }) => Boolean(wallet.mobile?.native || wallet.mobile?.universal);
|
|
4111
4285
|
|
|
4112
4286
|
//#endregion
|
|
4113
|
-
//#region src/modules/walletOptionsCatalogue/
|
|
4287
|
+
//#region src/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.ts
|
|
4114
4288
|
/**
|
|
4115
|
-
*
|
|
4116
|
-
* least one mobile deeplink — that's the value-add the option provides
|
|
4117
|
-
* over the bare pairing URI. Wallets that exist in the wallet book but
|
|
4118
|
-
* don't expose a deeplink (rare, but present) are silently skipped.
|
|
4289
|
+
* Wallet option key the MetaMask SDK URI extension targets.
|
|
4119
4290
|
*/
|
|
4120
|
-
const
|
|
4291
|
+
const METAMASK_WALLET_OPTION_KEY = "metamask";
|
|
4121
4292
|
/**
|
|
4122
|
-
*
|
|
4123
|
-
*
|
|
4293
|
+
* Chains the MetaMask SDK URI pairing supports.
|
|
4294
|
+
*
|
|
4295
|
+
* Unlike WalletConnect — whose per-wallet chain support is read from the
|
|
4296
|
+
* wallet book — the MetaMask SDK URI is a single Dynamic integration whose
|
|
4297
|
+
* chain coverage is defined by which `connectWithMetaMaskUri<Chain>`
|
|
4298
|
+
* primitives the SDK ships (EVM + SOL). The MetaMask wallet-book entry only
|
|
4299
|
+
* advertises its EVM (`eip155`) chains, so deriving the chain from the book
|
|
4300
|
+
* would never surface the Solana pairing; the SDK's own capabilities are
|
|
4301
|
+
* listed explicitly instead.
|
|
4302
|
+
*/
|
|
4303
|
+
const METAMASK_SDK_URI_SUPPORTED_CHAINS = ["EVM", "SOL"];
|
|
4304
|
+
/**
|
|
4305
|
+
* Builds the `metamaskSdkUri`-discriminator catalogue options from a
|
|
4306
|
+
* fetched wallet book. The MetaMask SDK URI extension only targets the
|
|
4307
|
+
* MetaMask wallet, so the builder iterates the book looking for the
|
|
4308
|
+
* entry whose resolved wallet option key is `'metamask'`.
|
|
4309
|
+
*
|
|
4310
|
+
* Applies the generic `shouldFilterWallet` rules (drops embedded keys +
|
|
4311
|
+
* injected-only-without-links entries). Crucially does NOT require WC
|
|
4312
|
+
* `sign_v2` support — MetaMask SDK URI is a different protocol from
|
|
4313
|
+
* WalletConnect, so the WC-specific filter does not apply here.
|
|
4314
|
+
*
|
|
4315
|
+
* Emits one `metamaskSdkUri` option per chain the MetaMask SDK URI pairing
|
|
4316
|
+
* supports (see {@link METAMASK_SDK_URI_SUPPORTED_CHAINS}) so the picker can
|
|
4317
|
+
* offer both the EVM and Solana pairings for the single MetaMask entry.
|
|
4318
|
+
*
|
|
4319
|
+
* @param params.walletBook - The fetched wallet book.
|
|
4320
|
+
* @returns Tagged `metamaskSdkUri` options for MetaMask if eligible, otherwise an empty array.
|
|
4321
|
+
* @not-instrumented
|
|
4322
|
+
*/
|
|
4323
|
+
const buildMetaMaskSdkUriOptions = ({ walletBook }) => {
|
|
4324
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4325
|
+
const walletOptionKey = resolveWalletBookWalletOptionKey({
|
|
4326
|
+
wallet,
|
|
4327
|
+
walletKey
|
|
4328
|
+
});
|
|
4329
|
+
if (walletOptionKey !== METAMASK_WALLET_OPTION_KEY) continue;
|
|
4330
|
+
if (shouldFilterWallet({
|
|
4331
|
+
wallet,
|
|
4332
|
+
walletKey
|
|
4333
|
+
})) continue;
|
|
4334
|
+
if (!hasUsableDeeplink({ wallet })) continue;
|
|
4335
|
+
const deeplinks = {
|
|
4336
|
+
native: wallet.mobile?.native,
|
|
4337
|
+
universal: wallet.mobile?.universal
|
|
4338
|
+
};
|
|
4339
|
+
return METAMASK_SDK_URI_SUPPORTED_CHAINS.map((chain) => ({
|
|
4340
|
+
option: {
|
|
4341
|
+
chain,
|
|
4342
|
+
deeplinks,
|
|
4343
|
+
type: "metamaskSdkUri"
|
|
4344
|
+
},
|
|
4345
|
+
walletOptionKey
|
|
4346
|
+
}));
|
|
4347
|
+
}
|
|
4348
|
+
return [];
|
|
4349
|
+
};
|
|
4350
|
+
|
|
4351
|
+
//#endregion
|
|
4352
|
+
//#region src/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.ts
|
|
4353
|
+
/**
|
|
4354
|
+
* Returns every chain a wallet book entry advertises support for —
|
|
4355
|
+
* deduped, in `injectedConfig` order, then `chains` order. Used by the
|
|
4356
|
+
* catalogue's WalletConnect builder so a multi-chain wallet (e.g. Trust
|
|
4357
|
+
* supports EVM + SOL) gets one option per chain rather than one option
|
|
4358
|
+
* for whichever chain `getChainFromWalletSchema` happened to pick first.
|
|
4359
|
+
*
|
|
4360
|
+
* Falls back to {@link getChainFromWalletSchema}'s single-result behavior
|
|
4361
|
+
* (`['EVM']` default) when neither field is populated, so the helper
|
|
4362
|
+
* never returns an empty array — every eligible wallet emits at least
|
|
4363
|
+
* one option.
|
|
4364
|
+
*
|
|
4365
|
+
* @param params.wallet - The wallet schema from the wallet book.
|
|
4366
|
+
* @param [params.walletKey] - The wallet key identifier (used as last-resort fallback).
|
|
4367
|
+
* @returns Ordered, deduped array of Chains.
|
|
4368
|
+
* @not-instrumented
|
|
4369
|
+
*/
|
|
4370
|
+
const getChainsFromWalletSchema = ({ wallet, walletKey }) => {
|
|
4371
|
+
const chains = /* @__PURE__ */ new Set();
|
|
4372
|
+
for (const entry of wallet.injectedConfig ?? []) {
|
|
4373
|
+
if (!entry.chain) continue;
|
|
4374
|
+
const chain = getChainFromWalletBookIdentifier({ identifier: entry.chain });
|
|
4375
|
+
if (chain) chains.add(chain);
|
|
4376
|
+
}
|
|
4377
|
+
for (const identifier of wallet.chains ?? []) {
|
|
4378
|
+
const prefix = extractChainPrefix({ chainIdentifier: identifier });
|
|
4379
|
+
try {
|
|
4380
|
+
const chain = getChainFromVerifiedCredentialChain(prefix);
|
|
4381
|
+
chains.add(chain);
|
|
4382
|
+
} catch {}
|
|
4383
|
+
}
|
|
4384
|
+
if (chains.size === 0) {
|
|
4385
|
+
const chain = getChainFromWalletSchema({
|
|
4386
|
+
wallet,
|
|
4387
|
+
walletKey
|
|
4388
|
+
});
|
|
4389
|
+
chains.add(chain);
|
|
4390
|
+
}
|
|
4391
|
+
return Array.from(chains);
|
|
4392
|
+
};
|
|
4393
|
+
|
|
4394
|
+
//#endregion
|
|
4395
|
+
//#region src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts
|
|
4396
|
+
/**
|
|
4397
|
+
* Chains Dynamic ships a WalletConnect extension for. Anything else a
|
|
4398
|
+
* wallet book entry advertises (Cosmos, BTC, …) gets filtered out — the
|
|
4399
|
+
* catalogue should not surface a chain the SDK has no `connectWithWalletConnect<Chain>`
|
|
4400
|
+
* primitive for.
|
|
4401
|
+
*/
|
|
4402
|
+
const WALLETCONNECT_SUPPORTED_CHAINS = new Set(["EVM", "SOL"]);
|
|
4403
|
+
/**
|
|
4404
|
+
* Builds the `walletConnect`-discriminator catalogue options from a fetched
|
|
4405
|
+
* wallet book. Applies the WalletConnect-specific eligibility filter
|
|
4124
4406
|
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
4125
4407
|
* without `sign_v2` support are excluded — same surface as
|
|
4126
4408
|
* `getWalletConnectCatalog`.
|
|
4127
4409
|
*
|
|
4128
|
-
*
|
|
4129
|
-
*
|
|
4130
|
-
*
|
|
4131
|
-
*
|
|
4132
|
-
*
|
|
4133
|
-
*
|
|
4134
|
-
* `connectWithMetaMaskUriSolana`. Emitted only for the MetaMask
|
|
4135
|
-
* wallet entry — see `resolveUriConnectionType`.
|
|
4410
|
+
* Skips the MetaMask wallet entry: MetaMask is steered to its own URI
|
|
4411
|
+
* connection extension via `buildMetaMaskSdkUriOptions`. Keeping the two
|
|
4412
|
+
* builders separate means each protocol owns its own eligibility rules
|
|
4413
|
+
* (WC needs `sign_v2`; MM SDK URI does not), so excluding one
|
|
4414
|
+
* discriminator via `excludedConnectionOptionTypes` doesn't accidentally
|
|
4415
|
+
* gate the other.
|
|
4136
4416
|
*
|
|
4137
4417
|
* @param params.walletBook - The fetched wallet book.
|
|
4138
|
-
* @returns Tagged options paired with their wallet option keys.
|
|
4418
|
+
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
4139
4419
|
* @not-instrumented
|
|
4140
4420
|
*/
|
|
4141
|
-
const
|
|
4421
|
+
const buildWalletConnectOptions = ({ walletBook }) => {
|
|
4142
4422
|
const result = [];
|
|
4143
4423
|
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
4144
4424
|
if (shouldFilterWalletForWalletConnect({
|
|
@@ -4150,18 +4430,19 @@ const buildUriDeeplinkOptions = ({ walletBook }) => {
|
|
|
4150
4430
|
wallet,
|
|
4151
4431
|
walletKey
|
|
4152
4432
|
});
|
|
4153
|
-
|
|
4433
|
+
if (walletOptionKey === "metamask") continue;
|
|
4434
|
+
const chains = getChainsFromWalletSchema({
|
|
4154
4435
|
wallet,
|
|
4155
4436
|
walletKey
|
|
4156
|
-
});
|
|
4157
|
-
result.push({
|
|
4437
|
+
}).filter((chain) => WALLETCONNECT_SUPPORTED_CHAINS.has(chain));
|
|
4438
|
+
for (const chain of chains) result.push({
|
|
4158
4439
|
option: {
|
|
4159
4440
|
chain,
|
|
4160
4441
|
deeplinks: {
|
|
4161
4442
|
native: wallet.mobile?.native,
|
|
4162
4443
|
universal: wallet.mobile?.universal
|
|
4163
4444
|
},
|
|
4164
|
-
type:
|
|
4445
|
+
type: "walletConnect"
|
|
4165
4446
|
},
|
|
4166
4447
|
walletOptionKey
|
|
4167
4448
|
});
|
|
@@ -4178,12 +4459,19 @@ const buildUriDeeplinkOptions = ({ walletBook }) => {
|
|
|
4178
4459
|
*
|
|
4179
4460
|
* Display merge rules (provider self-announced metadata wins where set):
|
|
4180
4461
|
*
|
|
4181
|
-
* - `name`: `displayOverride.name` ?? wallet book group name ??
|
|
4182
|
-
*
|
|
4183
|
-
* - `
|
|
4184
|
-
*
|
|
4462
|
+
* - `name`: `displayOverride.name` ?? wallet book group name ?? wallet
|
|
4463
|
+
* book wallet name ?? bare key.
|
|
4464
|
+
* - `iconUrl`: `displayOverride.iconUrl` ?? wallet book group sprite URL
|
|
4465
|
+
* ?? wallet book wallet sprite URL ?? `''`.
|
|
4466
|
+
* - `primaryColor`: wallet book group brand color ?? wallet book wallet
|
|
4467
|
+
* brand color (providers do not ship a primary color in their
|
|
4468
|
+
* announcement metadata).
|
|
4185
4469
|
* - `installationUrls`: copied through if present.
|
|
4186
4470
|
*
|
|
4471
|
+
* The per-wallet fallback handles wallets that exist as individual entries
|
|
4472
|
+
* in the book (e.g. Rainbow) rather than as members of a multi-wallet group
|
|
4473
|
+
* — those don't get a `walletBook.groups[…]` shell.
|
|
4474
|
+
*
|
|
4187
4475
|
* Why provider precedence: a registered wallet provider knows its own
|
|
4188
4476
|
* brand best (EIP-6963 / Wallet Standard / vendor SDK announcement is the
|
|
4189
4477
|
* wallet authoring its own identity). The wallet book fills in fields the
|
|
@@ -4201,16 +4489,42 @@ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrl
|
|
|
4201
4489
|
const group = walletBook.groups[walletOptionKey];
|
|
4202
4490
|
const groupSpriteId = group?.brand?.spriteId;
|
|
4203
4491
|
const groupIconUrl = groupSpriteId ? getSpriteUrl({ spriteId: groupSpriteId }) : void 0;
|
|
4492
|
+
const walletEntry = walletBook.wallets[walletOptionKey];
|
|
4493
|
+
const walletSpriteId = walletEntry?.brand?.spriteId;
|
|
4494
|
+
const walletIconUrl = walletSpriteId ? getSpriteUrl({ spriteId: walletSpriteId }) : void 0;
|
|
4204
4495
|
return {
|
|
4205
4496
|
connectionOptions,
|
|
4206
|
-
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? "",
|
|
4497
|
+
iconUrl: displayOverride?.iconUrl ?? groupIconUrl ?? walletIconUrl ?? "",
|
|
4207
4498
|
installationUrls,
|
|
4208
4499
|
key: walletOptionKey,
|
|
4209
|
-
name: displayOverride?.name ?? group?.name ?? walletOptionKey,
|
|
4210
|
-
primaryColor: group?.brand?.primaryColor
|
|
4500
|
+
name: displayOverride?.name ?? group?.name ?? walletEntry?.name ?? walletOptionKey,
|
|
4501
|
+
primaryColor: group?.brand?.primaryColor ?? walletEntry?.brand?.primaryColor
|
|
4211
4502
|
};
|
|
4212
4503
|
};
|
|
4213
4504
|
|
|
4505
|
+
//#endregion
|
|
4506
|
+
//#region src/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.ts
|
|
4507
|
+
/**
|
|
4508
|
+
* Returns true when the given wallet provider exposes a `connect` method,
|
|
4509
|
+
* which is the signal we use to decide whether it belongs in the external
|
|
4510
|
+
* wallet picker as an `available provider`.
|
|
4511
|
+
*
|
|
4512
|
+
* Providers that don't expose `connect` (embedded wallets,
|
|
4513
|
+
* account-abstraction wrappers, MetaMask SDK / WalletConnect-backed
|
|
4514
|
+
* providers) are still sign-in capable, but via different SDK entry
|
|
4515
|
+
* points — they should not appear in the external picker as a
|
|
4516
|
+
* `withWalletProvider`-style option.
|
|
4517
|
+
*
|
|
4518
|
+
* Centralizing the predicate means future tweaks (e.g. a registry of
|
|
4519
|
+
* provider keys to exclude) land in one place and every consumer stays
|
|
4520
|
+
* in lockstep.
|
|
4521
|
+
*
|
|
4522
|
+
* @param params.walletProvider - The wallet provider to test.
|
|
4523
|
+
* @returns True when the provider exposes a `connect` method.
|
|
4524
|
+
* @not-instrumented
|
|
4525
|
+
*/
|
|
4526
|
+
const hasWalletProviderConnectMethod = ({ walletProvider }) => Boolean(walletProvider.connect);
|
|
4527
|
+
|
|
4214
4528
|
//#endregion
|
|
4215
4529
|
//#region src/modules/walletOptionsCatalogue/classifyWithWalletProviderSource/classifyWithWalletProviderSource.ts
|
|
4216
4530
|
/**
|
|
@@ -4290,7 +4604,7 @@ const normalizeWalletDisplayName = (displayName) => displayName.toLowerCase().re
|
|
|
4290
4604
|
|
|
4291
4605
|
//#endregion
|
|
4292
4606
|
//#region src/modules/walletOptionsCatalogue/findWalletOptionKeyForProviderKey/findByNameMatch/findByNameMatch.ts
|
|
4293
|
-
const normalize = (value) => value.toLowerCase().replace(/\s+/g, "");
|
|
4607
|
+
const normalize = (value) => value === void 0 ? void 0 : value.toLowerCase().replace(/\s+/g, "");
|
|
4294
4608
|
/**
|
|
4295
4609
|
* Looks for a wallet book entry whose `name` or `shortName` normalizes to
|
|
4296
4610
|
* the same string as `candidate`. Used as a fallback by
|
|
@@ -4410,6 +4724,7 @@ const findWalletOptionKeyForProviderKey = ({ chain, walletBook, walletProvider }
|
|
|
4410
4724
|
const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
|
|
4411
4725
|
const result = [];
|
|
4412
4726
|
for (const entry of entries) {
|
|
4727
|
+
if (!hasWalletProviderConnectMethod({ walletProvider: entry.walletProvider })) continue;
|
|
4413
4728
|
const source = classifyWithWalletProviderSource({ entry });
|
|
4414
4729
|
if (!source) {
|
|
4415
4730
|
getCore(client).logger.error("buildWithWalletProviderOptions: registered wallet provider has an unrecognised priority — unable to identify how this wallet was registered", {
|
|
@@ -4704,7 +5019,12 @@ const EMPTY_WALLET_BOOK = {
|
|
|
4704
5019
|
* pass `includeMobileOptions: true` to additionally surface
|
|
4705
5020
|
* WalletConnect, in-app-browser, and install links.
|
|
4706
5021
|
*
|
|
4707
|
-
*
|
|
5022
|
+
* Pass `excludedConnectionOptionTypes` to drop specific connection types
|
|
5023
|
+
* from the catalogue (e.g. `['inAppBrowser']` on desktop). Wallets whose
|
|
5024
|
+
* only connection was an excluded type fall through to the install-only
|
|
5025
|
+
* tier of the relevance ordering.
|
|
5026
|
+
*
|
|
5027
|
+
* @param [params] - Inclusion flag + ordering preference + exclusions.
|
|
4708
5028
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4709
5029
|
* @returns A promise that resolves to the wallet options catalogue.
|
|
4710
5030
|
* @not-instrumented
|
|
@@ -4712,14 +5032,21 @@ const EMPTY_WALLET_BOOK = {
|
|
|
4712
5032
|
const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient()) => {
|
|
4713
5033
|
const includeMobileOptions = params.includeMobileOptions ?? false;
|
|
4714
5034
|
const walletOptionOrdering = params.walletOptionOrdering ?? "relevance";
|
|
5035
|
+
const excludedConnectionOptionTypes = new Set(params.excludedConnectionOptionTypes ?? []);
|
|
4715
5036
|
const walletBook = includeMobileOptions ? await fetchLegacyWalletBook(client) : EMPTY_WALLET_BOOK;
|
|
4716
5037
|
const allConnectionOptions = [];
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
5038
|
+
if (!excludedConnectionOptionTypes.has("withWalletProvider")) {
|
|
5039
|
+
const entries = getWalletProviderRegistry(client).listProviderEntries();
|
|
5040
|
+
allConnectionOptions.push(...buildWithWalletProviderOptions({
|
|
5041
|
+
entries,
|
|
5042
|
+
walletBook
|
|
5043
|
+
}, client));
|
|
5044
|
+
}
|
|
5045
|
+
if (includeMobileOptions) {
|
|
5046
|
+
if (!excludedConnectionOptionTypes.has("walletConnect")) allConnectionOptions.push(...buildWalletConnectOptions({ walletBook }));
|
|
5047
|
+
if (!excludedConnectionOptionTypes.has("metamaskSdkUri")) allConnectionOptions.push(...buildMetaMaskSdkUriOptions({ walletBook }));
|
|
5048
|
+
if (!excludedConnectionOptionTypes.has("inAppBrowser")) allConnectionOptions.push(...buildInAppBrowserOptions({ walletBook }));
|
|
5049
|
+
}
|
|
4723
5050
|
const installationUrlsByKey = includeMobileOptions ? buildInstallationUrlsByWalletOptionKey({ walletBook }) : /* @__PURE__ */ new Map();
|
|
4724
5051
|
const grouped = groupOptionsByWalletOption({ options: allConnectionOptions });
|
|
4725
5052
|
const allWalletOptionKeys = new Set([...grouped.keys(), ...installationUrlsByKey.keys()]);
|
|
@@ -6645,33 +6972,6 @@ const __confirmTransaction_wrapped = instrumentFunction({
|
|
|
6645
6972
|
}
|
|
6646
6973
|
});
|
|
6647
6974
|
|
|
6648
|
-
//#endregion
|
|
6649
|
-
//#region src/utils/isMobile/isMobile.ts
|
|
6650
|
-
/**
|
|
6651
|
-
* Sourced from http://detectmobilebrowsers.com/
|
|
6652
|
-
* @not-instrumented
|
|
6653
|
-
*/
|
|
6654
|
-
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;
|
|
6655
|
-
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;
|
|
6656
|
-
/** @not-instrumented */
|
|
6657
|
-
const isMobile = (maxTouchPointsOverride) => {
|
|
6658
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6659
|
-
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIPhone();
|
|
6660
|
-
};
|
|
6661
|
-
/** @not-instrumented */
|
|
6662
|
-
const isIPhone = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|ios/.test(navigator.userAgent);
|
|
6663
|
-
/**
|
|
6664
|
-
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
6665
|
-
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
6666
|
-
* to mock it
|
|
6667
|
-
* @not-instrumented
|
|
6668
|
-
*/
|
|
6669
|
-
const isIPad = (maxTouchPointsOverride) => {
|
|
6670
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
6671
|
-
const maxTouchPoints = maxTouchPointsOverride || navigator.maxTouchPoints;
|
|
6672
|
-
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
6673
|
-
};
|
|
6674
|
-
|
|
6675
6975
|
//#endregion
|
|
6676
6976
|
//#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
|
|
6677
6977
|
/** @not-instrumented */
|
|
@@ -7013,7 +7313,7 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
7013
7313
|
* @not-instrumented
|
|
7014
7314
|
*/
|
|
7015
7315
|
const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
7016
|
-
return getWalletProviders(client).filter((walletProvider) =>
|
|
7316
|
+
return getWalletProviders(client).filter((walletProvider) => hasWalletProviderConnectMethod({ walletProvider })).map((walletProvider) => ({
|
|
7017
7317
|
chain: walletProvider.chain,
|
|
7018
7318
|
groupKey: walletProvider.groupKey,
|
|
7019
7319
|
key: walletProvider.key,
|
|
@@ -7076,6 +7376,22 @@ const getWalletProviderDataByKey = ({ walletProviderKey }, client = getDefaultCl
|
|
|
7076
7376
|
};
|
|
7077
7377
|
};
|
|
7078
7378
|
|
|
7379
|
+
//#endregion
|
|
7380
|
+
//#region src/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.ts
|
|
7381
|
+
/**
|
|
7382
|
+
* Checks whether the session has at least one connected wallet account.
|
|
7383
|
+
*
|
|
7384
|
+
* Both verified and unverified wallet accounts count as connected. This is a
|
|
7385
|
+
* single building block for a custom signed-in check — combine it with whatever
|
|
7386
|
+
* else your app considers "signed in" (e.g. `client.user`, completed onboarding,
|
|
7387
|
+
* a required embedded wallet, …).
|
|
7388
|
+
*
|
|
7389
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7390
|
+
* @returns True if the session has at least one wallet account, false otherwise.
|
|
7391
|
+
* @not-instrumented
|
|
7392
|
+
*/
|
|
7393
|
+
const isAnyWalletAccountConnected = (client = getDefaultClient()) => getWalletAccounts(client).length > 0;
|
|
7394
|
+
|
|
7079
7395
|
//#endregion
|
|
7080
7396
|
//#region src/modules/wallets/hardwareWallet/canConnectWithHardwareWallet/canConnectWithHardwareWallet.ts
|
|
7081
7397
|
/**
|
|
@@ -7187,19 +7503,23 @@ const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
|
|
|
7187
7503
|
};
|
|
7188
7504
|
|
|
7189
7505
|
//#endregion
|
|
7190
|
-
//#region src/modules/wallets/networks/
|
|
7506
|
+
//#region src/modules/wallets/networks/getNativeBalance/getNativeBalance.ts
|
|
7191
7507
|
/**
|
|
7192
|
-
* Retrieves the native token balance for a wallet account
|
|
7508
|
+
* Retrieves the native token balance for a wallet account on its active
|
|
7509
|
+
* network. Reads directly from the chain's network provider (RPC), not
|
|
7510
|
+
* the Dynamic API.
|
|
7193
7511
|
*
|
|
7194
|
-
*
|
|
7195
|
-
* (
|
|
7512
|
+
* Use this when you only need the user's gas / native-currency balance
|
|
7513
|
+
* (ETH, SOL, BTC, etc.). For token balances, use
|
|
7514
|
+
* {@link getTokenBalances}; for a multi-chain portfolio snapshot, use
|
|
7515
|
+
* {@link getMultichainTokenBalances}.
|
|
7196
7516
|
*
|
|
7197
7517
|
* @param params.walletAccount - The wallet account to get the balance for.
|
|
7198
7518
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7199
7519
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
7200
7520
|
* @not-instrumented
|
|
7201
7521
|
*/
|
|
7202
|
-
const
|
|
7522
|
+
const getNativeBalance = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
7203
7523
|
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
7204
7524
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
7205
7525
|
return getNetworkProviderFromNetworkId({
|
|
@@ -7657,5 +7977,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
7657
7977
|
assertPackageVersion(name, version);
|
|
7658
7978
|
|
|
7659
7979
|
//#endregion
|
|
7660
|
-
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 };
|
|
7980
|
+
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 };
|
|
7661
7981
|
//# sourceMappingURL=index.esm.js.map
|