@dynamic-labs-sdk/client 1.31.1 → 1.32.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/{apiClient-BZfdx9fH.native.esm.js → apiClient-Bwd6cllS.native.esm.js} +2 -2
- package/dist/{apiClient-BZfdx9fH.native.esm.js.map → apiClient-Bwd6cllS.native.esm.js.map} +1 -1
- package/dist/core.cjs +7 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +6 -6
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +8 -8
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/AmbiguousWalletChainError.d.ts +30 -0
- package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -0
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts +35 -0
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts.map +1 -0
- package/dist/errors/NoConnectionOptionAvailableError.d.ts +39 -0
- package/dist/errors/NoConnectionOptionAvailableError.d.ts.map +1 -0
- package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts +39 -0
- package/dist/errors/WalletBrowserRedirectHandlerMissingError.d.ts.map +1 -0
- package/dist/errors/WalletOptionNotFoundError.d.ts +30 -0
- package/dist/errors/WalletOptionNotFoundError.d.ts.map +1 -0
- package/dist/exports/core.d.ts +4 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +12 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DNIuJp20.cjs → getNetworkProviderFromNetworkId-5UBZwUg2.cjs} +78 -2
- package/dist/getNetworkProviderFromNetworkId-5UBZwUg2.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js → getNetworkProviderFromNetworkId-DSsGkava.native.esm.js} +79 -9
- package/dist/getNetworkProviderFromNetworkId-DSsGkava.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-CbMpiSub.esm.js → getNetworkProviderFromNetworkId-TTqmAiJh.esm.js} +73 -3
- package/dist/getNetworkProviderFromNetworkId-TTqmAiJh.esm.js.map +1 -0
- package/dist/{getSignedSessionId-DKKSCpj9.native.esm.js → getSignedSessionId-BkYhH1zc.native.esm.js} +34 -4
- package/dist/getSignedSessionId-BkYhH1zc.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId--wpV_VKs.cjs → getSignedSessionId-DBUnRGjt.cjs} +39 -3
- package/dist/getSignedSessionId-DBUnRGjt.cjs.map +1 -0
- package/dist/{getSignedSessionId-DHn6yhGX.esm.js → getSignedSessionId-DeeDyino.esm.js} +34 -4
- package/dist/getSignedSessionId-DeeDyino.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs.map → getVerifiedCredentialForWalletAccount-BSxiaaVp.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js.map → getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js.map} +1 -1
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts +55 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.d.ts.map +1 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts +46 -0
- package/dist/highLevelFunctions/connectWalletOption/connectWalletOption.types.d.ts.map +1 -0
- package/dist/highLevelFunctions/connectWalletOption/index.d.ts +2 -0
- package/dist/highLevelFunctions/connectWalletOption/index.d.ts.map +1 -0
- package/dist/index.cjs +802 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +795 -58
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +755 -60
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs → isMfaRequiredForAction-62zh3W-2.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs.map → isMfaRequiredForAction-62zh3W-2.cjs.map} +1 -1
- package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js → isMfaRequiredForAction-BPEXPqSt.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js.map → isMfaRequiredForAction-BPEXPqSt.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js → isMfaRequiredForAction-DfrEFvU2.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js.map → isMfaRequiredForAction-DfrEFvU2.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js → isUserOnboardingComplete-BWrCHXXO.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js.map → isUserOnboardingComplete-BWrCHXXO.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js → isUserOnboardingComplete-Dmck83_2.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js.map → isUserOnboardingComplete-Dmck83_2.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs → isUserOnboardingComplete-DtxIznZD.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs.map → isUserOnboardingComplete-DtxIznZD.cjs.map} +1 -1
- package/dist/{logoutWithReason-BcWQGREO.native.esm.js → logoutWithReason-DIc7cC6T.native.esm.js} +2 -2
- package/dist/{logoutWithReason-BcWQGREO.native.esm.js.map → logoutWithReason-DIc7cC6T.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-BqsgA8gI.esm.js → logoutWithReason-x8mE7EAy.esm.js} +2 -2
- package/dist/{logoutWithReason-BqsgA8gI.esm.js.map → logoutWithReason-x8mE7EAy.esm.js.map} +1 -1
- package/dist/{logoutWithReason-D6ruPOvJ.cjs → logoutWithReason-yDqQ0UIt.cjs} +2 -2
- package/dist/{logoutWithReason-D6ruPOvJ.cjs.map → logoutWithReason-yDqQ0UIt.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js → migrateFromFireblocks-BUhWQCqm.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js.map → migrateFromFireblocks-BUhWQCqm.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-zazAx6WV.esm.js → migrateFromFireblocks-BapjEhra.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-zazAx6WV.esm.js.map → migrateFromFireblocks-BapjEhra.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-CCNTDCmW.cjs → migrateFromFireblocks-qYPrnWF8.cjs} +2 -2
- package/dist/{migrateFromFireblocks-CCNTDCmW.cjs.map → migrateFromFireblocks-qYPrnWF8.cjs.map} +1 -1
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts +7 -1
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.types.d.ts +4 -0
- package/dist/modules/auth/social/oauth/clearSocialRedirectParams/clearSocialRedirectParams.types.d.ts.map +1 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts +9 -0
- package/dist/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +2 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +53 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map +1 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.d.ts +34 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.d.ts.map +1 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/index.d.ts +2 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/index.d.ts.map +1 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/index.d.ts +2 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/index.d.ts.map +1 -0
- package/dist/modules/wallets/redirectToInAppBrowser/index.d.ts +2 -0
- package/dist/modules/wallets/redirectToInAppBrowser/index.d.ts.map +1 -0
- package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts +60 -0
- package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts.map +1 -0
- package/dist/modules/wallets/resolveWalletConnectionOption/index.d.ts +3 -0
- package/dist/modules/wallets/resolveWalletConnectionOption/index.d.ts.map +1 -0
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts +36 -0
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/createUriConnectionStarterRegistry.d.ts +22 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/createUriConnectionStarterRegistry.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/index.d.ts +2 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/createUriConnectionStarterRegistry/index.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/events.d.ts +18 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/events.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/getUriConnectionStarterRegistry.d.ts +22 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/getUriConnectionStarterRegistry.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/index.d.ts +2 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterRegistry/index.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/index.d.ts +3 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/index.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/uriConnectionStarterRegistry.types.d.ts +32 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/uriConnectionStarterRegistry.types.d.ts.map +1 -0
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts +62 -0
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts.map +1 -0
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts +19 -0
- package/dist/modules/wallets/walletProviderUriConnection.types.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.d.ts +32 -0
- package/dist/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.d.ts.map +1 -0
- package/dist/utils/buildInAppBrowserUrl/index.d.ts +2 -0
- package/dist/utils/buildInAppBrowserUrl/index.d.ts.map +1 -0
- package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts +15 -0
- package/dist/utils/getCurrentPageUrl/getCurrentPageUrl.d.ts.map +1 -0
- package/dist/utils/getCurrentPageUrl/index.d.ts +2 -0
- package/dist/utils/getCurrentPageUrl/index.d.ts.map +1 -0
- package/dist/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts +33 -0
- package/dist/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.d.ts.map +1 -0
- package/dist/utils/getPreferredWalletDeepLink/index.d.ts +2 -0
- package/dist/utils/getPreferredWalletDeepLink/index.d.ts.map +1 -0
- package/dist/utils/isAndroid/index.d.ts +2 -0
- package/dist/utils/isAndroid/index.d.ts.map +1 -0
- package/dist/utils/isAndroid/isAndroid.d.ts +20 -0
- package/dist/utils/isAndroid/isAndroid.d.ts.map +1 -0
- package/dist/utils/isIOS/index.d.ts +2 -0
- package/dist/utils/isIOS/index.d.ts.map +1 -0
- package/dist/utils/isIOS/isIOS.d.ts +23 -0
- package/dist/utils/isIOS/isIOS.d.ts.map +1 -0
- package/dist/utils/isMobile/isMobile.d.ts +17 -36
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/utils/userAgentChecks/userAgentChecks.d.ts +35 -0
- package/dist/utils/userAgentChecks/userAgentChecks.d.ts.map +1 -0
- package/dist/{waas-DidjjQjB.native.esm.js → waas-CyUrvkQr.native.esm.js} +4 -4
- package/dist/{waas-DidjjQjB.native.esm.js.map → waas-CyUrvkQr.native.esm.js.map} +1 -1
- package/dist/{waas-C2PbR02F.esm.js → waas-DzcYsWU8.esm.js} +4 -4
- package/dist/{waas-C2PbR02F.esm.js.map → waas-DzcYsWU8.esm.js.map} +1 -1
- package/dist/{waas-ZWlJHeXc.cjs → waas-WID2Fy_N.cjs} +4 -4
- package/dist/{waas-ZWlJHeXc.cjs.map → waas-WID2Fy_N.cjs.map} +1 -1
- package/dist/waas.cjs +4 -4
- package/dist/waas.esm.js +4 -4
- package/dist/waas.native.esm.js +4 -4
- package/dist/waasCore.cjs +10 -40
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +5 -35
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +5 -35
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +2 -2
- package/dist/getNetworkProviderFromNetworkId-CbMpiSub.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DNIuJp20.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js.map +0 -1
- package/dist/getSignedSessionId--wpV_VKs.cjs.map +0 -1
- package/dist/getSignedSessionId-DHn6yhGX.esm.js.map +0 -1
- package/dist/getSignedSessionId-DKKSCpj9.native.esm.js.map +0 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as updateNoncePoolStorage, A as getWalletProviders, C as initializeWaasClientsForEagerRecovery, Ct as BaseError, Et as version, F as onEvent, G as splitWalletProviderKey, H as CHAINS_INFO_MAP, I as onceEvent, M as getWalletProviderRegistry, N as emitEvent, P as offEvent, Q as fetchAndStoreNonces, R as getWalletAccounts, St as getCore, Tt as name, U as formatWalletAccountId, V as getChainFromVerifiedCredentialChain, W as normalizeAddress, Z as getNonce, _ as upsertElevatedAccessToken, _t as randomString, a as retryOnFail, at as MfaInvalidOtpError, b as InvalidParamError, bt as setDefaultClient, c as createApiClient, ct as APIError, d as scrubParameters, dt as SDK_API_CORE_VERSION, et as createStorageKeySchema, f as DEFAULT_PII_FIELDS, g as updateAuthFromVerifyResponse, gt as getElevatedAccessToken, h as extractSessionId, ht as ValueMustBeDefinedError, i as isSignedIn, it as MfaRateLimitedError, j as WalletProviderPriority, l as __refreshAuth_wrapped, m as getOperatingSystem, mt as assertDefined, n as generateSessionKeys, nt as UnauthorizedError, o as getWalletProviderFromWalletAccount, ot as LinkCredentialError, p as getUserAgent, pt as isCookieEnabled, q as isUserMissingMfaAuth, r as fetchProjectSettings, rt as SandboxMaximumThresholdReachedError, s as NoWalletProviderFoundError, st as InvalidExternalAuthError, t as __logoutWithReason_wrapped, tt as NONCE_POOL_SIZE, u as instrumentFunction, ut as DYNAMIC_ICONIC_SPRITE_URL, v as parseElevatedAccessToken, vt as getPlatform, wt as TokenScope, x as checkAndRaiseWalletAccountsChangedEvent, y as decodeJwt, yt as getDefaultClient } from "./logoutWithReason-
|
|
2
|
-
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-
|
|
3
|
-
import { Q as WaasChainEnum } from "./waas-
|
|
4
|
-
import { A as
|
|
5
|
-
import { n as getWalletProviderByKey, t as getVerifiedCredentialForWalletAccount } from "./getVerifiedCredentialForWalletAccount-
|
|
6
|
-
import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-
|
|
7
|
-
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
1
|
+
import { $ as updateNoncePoolStorage, A as getWalletProviders, C as initializeWaasClientsForEagerRecovery, Ct as BaseError, Et as version, F as onEvent, G as splitWalletProviderKey, H as CHAINS_INFO_MAP, I as onceEvent, M as getWalletProviderRegistry, N as emitEvent, P as offEvent, Q as fetchAndStoreNonces, R as getWalletAccounts, St as getCore, Tt as name, U as formatWalletAccountId, V as getChainFromVerifiedCredentialChain, W as normalizeAddress, Z as getNonce, _ as upsertElevatedAccessToken, _t as randomString, a as retryOnFail, at as MfaInvalidOtpError, b as InvalidParamError, bt as setDefaultClient, c as createApiClient, ct as APIError, d as scrubParameters, dt as SDK_API_CORE_VERSION, et as createStorageKeySchema, f as DEFAULT_PII_FIELDS, g as updateAuthFromVerifyResponse, gt as getElevatedAccessToken, h as extractSessionId, ht as ValueMustBeDefinedError, i as isSignedIn, it as MfaRateLimitedError, j as WalletProviderPriority, l as __refreshAuth_wrapped, m as getOperatingSystem, mt as assertDefined, n as generateSessionKeys, nt as UnauthorizedError, o as getWalletProviderFromWalletAccount, ot as LinkCredentialError, p as getUserAgent, pt as isCookieEnabled, q as isUserMissingMfaAuth, r as fetchProjectSettings, rt as SandboxMaximumThresholdReachedError, s as NoWalletProviderFoundError, st as InvalidExternalAuthError, t as __logoutWithReason_wrapped, tt as NONCE_POOL_SIZE, u as instrumentFunction, ut as DYNAMIC_ICONIC_SPRITE_URL, v as parseElevatedAccessToken, vt as getPlatform, wt as TokenScope, x as checkAndRaiseWalletAccountsChangedEvent, y as decodeJwt, yt as getDefaultClient } from "./logoutWithReason-x8mE7EAy.esm.js";
|
|
2
|
+
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-BapjEhra.esm.js";
|
|
3
|
+
import { Q as WaasChainEnum } from "./waas-DzcYsWU8.esm.js";
|
|
4
|
+
import { A as createLogger, B as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, C as MergeAccountsConfirmationError, D as createKeychainService, E as assertSafeDeeplinkUrl, F as createDeferredPromise, G as createStorage, H as getBuffer, I as createAppForegroundSubscriber, J as isServerSideRendering, L as FETCH_PROJECT_SETTINGS_TRACKER_KEY, M as createCrossTabBroadcast, O as assertSafeNavigationUrl, P as CannotTrackError, R as GENERATE_SESSION_KEYS_TRACKER_KEY, S as NoNetworkProvidersError, T as createRealtimeService, U as subscribeWithSelector, V as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, W as isEqualShallow, Y as UnavailableInServerSideError, _ as MethodNotImplementedError, a as verifyMessageSignatureOwnership, b as WalletScreeningBlockedError, c as formatSignInMessage, d as updateWalletProviderKeysForVerifiedCredentials, f as setUnverifiedWalletAccounts, g as __setCaptchaToken_wrapped, h as hasExtension, i as getUriConnectionStarterRegistry, j as createEventEmitter, l as getAppMetadata, m as getNetworkProviderBuilderRegistry, o as removeUnverifiedWalletAccount, p as createVisit, q as createLocalStorageAdapter, r as getNetworksData, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as reconcileWalletAccountsAgainstClient, v as consumeCaptchaToken, w as getKeychainIndexedDBName, x as WalletAlreadyLinkedToAnotherUserError, y as isCaptchaRequired, z as INITIALIZE_STORAGE_SYNC_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-TTqmAiJh.esm.js";
|
|
5
|
+
import { n as getWalletProviderByKey, t as getVerifiedCredentialForWalletAccount } from "./getVerifiedCredentialForWalletAccount-C--Dza_K.esm.js";
|
|
6
|
+
import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Dmck83_2.esm.js";
|
|
7
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BPEXPqSt.esm.js";
|
|
8
8
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
9
9
|
import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ChainEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction as MFAAction$1, MfaBackupCodeAcknowledgement, ProviderEnum as ProviderEnum$1, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
10
10
|
import * as z from "zod/mini";
|
|
@@ -556,7 +556,7 @@ const initializeClient = async (client = getDefaultClient()) => {
|
|
|
556
556
|
*/
|
|
557
557
|
if (isCookieEnabled(client)) await __refreshAuth_wrapped(client).catch(async (error) => {
|
|
558
558
|
if (error.status === 401) {
|
|
559
|
-
core.logger.
|
|
559
|
+
core.logger.warn("Session expired during initialization", error);
|
|
560
560
|
if (client.user) await __logoutWithReason_wrapped({ reason: "session-refresh-unauthorized" }, client);
|
|
561
561
|
} else throw error;
|
|
562
562
|
});
|
|
@@ -1203,6 +1203,44 @@ const __createDynamicClient_wrapped = instrumentFunction({
|
|
|
1203
1203
|
}
|
|
1204
1204
|
});
|
|
1205
1205
|
|
|
1206
|
+
//#endregion
|
|
1207
|
+
//#region src/errors/AmbiguousWalletChainError.ts
|
|
1208
|
+
/**
|
|
1209
|
+
* Thrown when a wallet can be connected on more than one of the client's
|
|
1210
|
+
* enabled chains and no chain was passed to `connectWalletOption`.
|
|
1211
|
+
*
|
|
1212
|
+
* Multi-chain wallets such as MetaMask or Phantom connect to a different
|
|
1213
|
+
* account per chain, so the chain has to be an explicit choice rather than one
|
|
1214
|
+
* Dynamic makes on the customer's behalf.
|
|
1215
|
+
*
|
|
1216
|
+
* @example
|
|
1217
|
+
* ```ts
|
|
1218
|
+
* // Throws, since Phantom connects on both SOL and EVM
|
|
1219
|
+
* await connectWalletOption({ walletKey: 'phantom' });
|
|
1220
|
+
*
|
|
1221
|
+
* // Connects the wallet's Solana account
|
|
1222
|
+
* await connectWalletOption({ chain: 'SOL', walletKey: 'phantom' });
|
|
1223
|
+
* ```
|
|
1224
|
+
* @see connectWalletOption
|
|
1225
|
+
* @see getWalletOptionsCatalogue
|
|
1226
|
+
*/
|
|
1227
|
+
var AmbiguousWalletChainError = class extends BaseError {
|
|
1228
|
+
constructor({ chains, walletKey }) {
|
|
1229
|
+
super({
|
|
1230
|
+
cause: null,
|
|
1231
|
+
code: "ambiguous_wallet_chain",
|
|
1232
|
+
docsUrl: null,
|
|
1233
|
+
metaMessages: [
|
|
1234
|
+
`Wallet key: ${walletKey}`,
|
|
1235
|
+
`Available chains: ${chains.join(", ")}`,
|
|
1236
|
+
"Pass the chain param to pick which one to connect on."
|
|
1237
|
+
],
|
|
1238
|
+
name: "AmbiguousWalletChainError",
|
|
1239
|
+
shortMessage: `Wallet ${walletKey} can be connected on more than one chain, so the chain param is required.`
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
|
|
1206
1244
|
//#endregion
|
|
1207
1245
|
//#region src/errors/CheckoutSessionTokenMissingError.ts
|
|
1208
1246
|
var CheckoutSessionTokenMissingError = class extends BaseError {
|
|
@@ -1361,6 +1399,48 @@ var CoinbaseTravelRuleRequiredError = class extends BaseError {
|
|
|
1361
1399
|
}
|
|
1362
1400
|
};
|
|
1363
1401
|
|
|
1402
|
+
//#endregion
|
|
1403
|
+
//#region src/errors/ConnectionUriHandlerMissingError.ts
|
|
1404
|
+
/**
|
|
1405
|
+
* Thrown when the only connection path for a wallet is a URI pairing and no
|
|
1406
|
+
* `onConnectionUri` handler was passed to `connectWalletOption`.
|
|
1407
|
+
*
|
|
1408
|
+
* The pairing URI has to reach the user — as a QR code on desktop, or by opening
|
|
1409
|
+
* the wallet's deeplink on mobile — for the wallet to be able to
|
|
1410
|
+
* approve the connection.
|
|
1411
|
+
*
|
|
1412
|
+
* @example
|
|
1413
|
+
* ```ts
|
|
1414
|
+
* // Throws, since the wallet can only be reached through a URI pairing
|
|
1415
|
+
* await connectWalletOption({ walletKey: 'trust' });
|
|
1416
|
+
*
|
|
1417
|
+
* // Connects, once the user approves the pairing
|
|
1418
|
+
* await connectWalletOption({
|
|
1419
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
1420
|
+
* walletKey: 'trust',
|
|
1421
|
+
* });
|
|
1422
|
+
* ```
|
|
1423
|
+
* @see connectWalletOption
|
|
1424
|
+
* @see ConnectionUriHandlerParams
|
|
1425
|
+
*/
|
|
1426
|
+
var ConnectionUriHandlerMissingError = class extends BaseError {
|
|
1427
|
+
constructor({ chain, type, walletKey }) {
|
|
1428
|
+
super({
|
|
1429
|
+
cause: null,
|
|
1430
|
+
code: "connection_uri_handler_missing",
|
|
1431
|
+
docsUrl: null,
|
|
1432
|
+
metaMessages: [
|
|
1433
|
+
`Wallet key: ${walletKey}`,
|
|
1434
|
+
`Chain: ${chain}`,
|
|
1435
|
+
`URI connection type: ${type}`,
|
|
1436
|
+
"Pass onConnectionUri to render the pairing URI it hands you as a QR code, or to open it as a link on mobile."
|
|
1437
|
+
],
|
|
1438
|
+
name: "ConnectionUriHandlerMissingError",
|
|
1439
|
+
shortMessage: `Connecting to ${walletKey} requires a URI pairing, so the onConnectionUri param is required.`
|
|
1440
|
+
});
|
|
1441
|
+
}
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1364
1444
|
//#endregion
|
|
1365
1445
|
//#region src/errors/DeeplinkConnectAndVerifyUnsupportedError.ts
|
|
1366
1446
|
var DeeplinkConnectAndVerifyUnsupportedError = class extends BaseError {
|
|
@@ -1602,6 +1682,54 @@ var NoAddressFoundError = class extends BaseError {
|
|
|
1602
1682
|
}
|
|
1603
1683
|
};
|
|
1604
1684
|
|
|
1685
|
+
//#endregion
|
|
1686
|
+
//#region src/errors/NoConnectionOptionAvailableError.ts
|
|
1687
|
+
/**
|
|
1688
|
+
* Thrown when a wallet exists in the catalogue but has no connection option
|
|
1689
|
+
* this client can drive.
|
|
1690
|
+
*
|
|
1691
|
+
* Happens when the wallet is not installed on the device and no URI pairing is
|
|
1692
|
+
* available for it — either the wallet does not support one, or the chain
|
|
1693
|
+
* extension providing that pairing was not added to the client.
|
|
1694
|
+
*
|
|
1695
|
+
* @example
|
|
1696
|
+
* ```ts
|
|
1697
|
+
* try {
|
|
1698
|
+
* await connectWalletOption({ walletKey: 'rainbow' });
|
|
1699
|
+
* } catch (error) {
|
|
1700
|
+
* if (error instanceof NoConnectionOptionAvailableError) {
|
|
1701
|
+
* promptWalletInstall(error.installationUrls);
|
|
1702
|
+
* }
|
|
1703
|
+
* }
|
|
1704
|
+
* ```
|
|
1705
|
+
* @see connectWalletOption
|
|
1706
|
+
* @see getWalletOptionsCatalogue
|
|
1707
|
+
*/
|
|
1708
|
+
var NoConnectionOptionAvailableError = class extends BaseError {
|
|
1709
|
+
/**
|
|
1710
|
+
* Install / download links for the wallet, when the wallet book carries any
|
|
1711
|
+
* for this device. Prompt the user to install the wallet with these.
|
|
1712
|
+
*/
|
|
1713
|
+
installationUrls;
|
|
1714
|
+
constructor({ chain, installationUrls, walletKey }) {
|
|
1715
|
+
super({
|
|
1716
|
+
cause: null,
|
|
1717
|
+
code: "no_connection_option_available",
|
|
1718
|
+
docsUrl: null,
|
|
1719
|
+
metaMessages: [
|
|
1720
|
+
`Wallet key: ${walletKey}`,
|
|
1721
|
+
...chain ? [`Chain: ${chain}`] : [],
|
|
1722
|
+
"The wallet is not installed and no URI pairing is available for it on this client.",
|
|
1723
|
+
"URI pairing requires the chain extension that provides it — addWalletConnect<Chain>Extension for WalletConnect, addMetaMask<Chain>Extension for MetaMask.",
|
|
1724
|
+
"Use this error's installationUrls to prompt the user to install the wallet."
|
|
1725
|
+
],
|
|
1726
|
+
name: "NoConnectionOptionAvailableError",
|
|
1727
|
+
shortMessage: `No connection option available for wallet: ${walletKey}`
|
|
1728
|
+
});
|
|
1729
|
+
this.installationUrls = installationUrls;
|
|
1730
|
+
}
|
|
1731
|
+
};
|
|
1732
|
+
|
|
1605
1733
|
//#endregion
|
|
1606
1734
|
//#region src/errors/NoPasskeyCredentialsFoundError.ts
|
|
1607
1735
|
var NoPasskeyCredentialsFoundError = class extends BaseError {
|
|
@@ -1796,6 +1924,93 @@ var WalletAccountNotSelectedError = class extends BaseError {
|
|
|
1796
1924
|
}
|
|
1797
1925
|
};
|
|
1798
1926
|
|
|
1927
|
+
//#endregion
|
|
1928
|
+
//#region src/errors/WalletBrowserRedirectHandlerMissingError.ts
|
|
1929
|
+
/**
|
|
1930
|
+
* Thrown when the connection option resolved for a wallet is its in-app
|
|
1931
|
+
* browser, no `handleWalletBrowserRedirect` handler was passed to
|
|
1932
|
+
* `connectWalletOption`, and there is no current page URL to redirect into
|
|
1933
|
+
* that browser — as on React Native and during server-side rendering.
|
|
1934
|
+
*
|
|
1935
|
+
* That path connects by reloading your app inside the wallet's own browser,
|
|
1936
|
+
* so it needs the URL of the page to reload.
|
|
1937
|
+
*
|
|
1938
|
+
* @example
|
|
1939
|
+
* ```ts
|
|
1940
|
+
* // Throws on React Native, where there is no page URL to reuse
|
|
1941
|
+
* await connectWalletOption({ walletKey: 'coinbase' });
|
|
1942
|
+
*
|
|
1943
|
+
* // Connects, redirecting into the wallet's browser
|
|
1944
|
+
* await connectWalletOption({
|
|
1945
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
1946
|
+
* redirectToInAppBrowser({
|
|
1947
|
+
* appUrl: 'https://mydapp.xyz/login',
|
|
1948
|
+
* chain,
|
|
1949
|
+
* walletKey,
|
|
1950
|
+
* }),
|
|
1951
|
+
* walletKey: 'coinbase',
|
|
1952
|
+
* });
|
|
1953
|
+
* ```
|
|
1954
|
+
* @see connectWalletOption
|
|
1955
|
+
* @see redirectToInAppBrowser
|
|
1956
|
+
*/
|
|
1957
|
+
var WalletBrowserRedirectHandlerMissingError = class extends BaseError {
|
|
1958
|
+
constructor({ chain, walletKey }) {
|
|
1959
|
+
super({
|
|
1960
|
+
cause: null,
|
|
1961
|
+
code: "wallet_browser_redirect_handler_missing",
|
|
1962
|
+
docsUrl: null,
|
|
1963
|
+
metaMessages: [
|
|
1964
|
+
`Wallet key: ${walletKey}`,
|
|
1965
|
+
`Chain: ${chain}`,
|
|
1966
|
+
"Pass handleWalletBrowserRedirect and call redirectToInAppBrowser from it with the URL of the page to reload inside the wallet's browser."
|
|
1967
|
+
],
|
|
1968
|
+
name: "WalletBrowserRedirectHandlerMissingError",
|
|
1969
|
+
shortMessage: `Connecting to ${walletKey} requires opening its in-app browser, so the handleWalletBrowserRedirect param is required where there is no page URL to redirect.`
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
|
|
1974
|
+
//#endregion
|
|
1975
|
+
//#region src/errors/WalletOptionNotFoundError.ts
|
|
1976
|
+
/**
|
|
1977
|
+
* Thrown when `connectWalletOption` is given a wallet key that no wallet option in
|
|
1978
|
+
* the catalogue matches.
|
|
1979
|
+
*
|
|
1980
|
+
* A wallet is only surfaced for the chains this client has an extension for, so
|
|
1981
|
+
* this also covers keys that are valid in the wallet book but not reachable
|
|
1982
|
+
* with the client's current chain extensions.
|
|
1983
|
+
*
|
|
1984
|
+
* @example
|
|
1985
|
+
* ```ts
|
|
1986
|
+
* try {
|
|
1987
|
+
* await connectWalletOption({ walletKey: 'metmask' });
|
|
1988
|
+
* } catch (error) {
|
|
1989
|
+
* if (error instanceof WalletOptionNotFoundError) {
|
|
1990
|
+
* showUnknownWalletMessage();
|
|
1991
|
+
* }
|
|
1992
|
+
* }
|
|
1993
|
+
* ```
|
|
1994
|
+
* @see connectWalletOption
|
|
1995
|
+
* @see getWalletOptionsCatalogue
|
|
1996
|
+
*/
|
|
1997
|
+
var WalletOptionNotFoundError = class extends BaseError {
|
|
1998
|
+
constructor({ walletKey }) {
|
|
1999
|
+
super({
|
|
2000
|
+
cause: null,
|
|
2001
|
+
code: "wallet_option_not_found",
|
|
2002
|
+
docsUrl: null,
|
|
2003
|
+
metaMessages: [
|
|
2004
|
+
`Wallet key: ${walletKey}`,
|
|
2005
|
+
"The key must match a wallet option surfaced by getWalletOptionsCatalogue (e.g. \"metamask\", \"phantom\").",
|
|
2006
|
+
"A wallet is only surfaced on chains this client has an extension for, so make sure the relevant chain extension is added."
|
|
2007
|
+
],
|
|
2008
|
+
name: "WalletOptionNotFoundError",
|
|
2009
|
+
shortMessage: `No wallet option found for key: ${walletKey}`
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
};
|
|
2013
|
+
|
|
1799
2014
|
//#endregion
|
|
1800
2015
|
//#region src/errors/WalletProviderMethodUnavailableError.ts
|
|
1801
2016
|
var WalletProviderMethodUnavailableError = class extends BaseError {
|
|
@@ -2521,6 +2736,10 @@ const __authenticateWithSocial_wrapped = instrumentFunction({
|
|
|
2521
2736
|
* browser. Calling it during server-side rendering (no `window`) throws
|
|
2522
2737
|
* `UnavailableInServerSideError`.
|
|
2523
2738
|
*
|
|
2739
|
+
* @param [params.expectedState] - When given, the parameters are only removed
|
|
2740
|
+
* while the current URL still carries this `dynamicOauthState`. Use it to
|
|
2741
|
+
* clean up after a specific callback without touching a newer one that has
|
|
2742
|
+
* meanwhile landed in the address bar.
|
|
2524
2743
|
* @returns Nothing. The current URL is rewritten in place via
|
|
2525
2744
|
* `window.history.replaceState`.
|
|
2526
2745
|
*
|
|
@@ -2540,9 +2759,12 @@ const __authenticateWithSocial_wrapped = instrumentFunction({
|
|
|
2540
2759
|
*
|
|
2541
2760
|
* @notInstrumented
|
|
2542
2761
|
*/
|
|
2543
|
-
const clearSocialRedirectParams = () => {
|
|
2762
|
+
const clearSocialRedirectParams = ({ expectedState } = {}) => {
|
|
2544
2763
|
if (isServerSideRendering()) throw new UnavailableInServerSideError("clearSocialRedirectParams");
|
|
2545
|
-
|
|
2764
|
+
const currentHref = window.location.href;
|
|
2765
|
+
const currentState = new URL(currentHref).searchParams.get("dynamicOauthState");
|
|
2766
|
+
if (expectedState !== void 0 && currentState !== expectedState) return;
|
|
2767
|
+
window.history.replaceState({}, "", removeDynamicOauthParamsFromUrl(currentHref));
|
|
2546
2768
|
};
|
|
2547
2769
|
|
|
2548
2770
|
//#endregion
|
|
@@ -2626,6 +2848,14 @@ const __processSocialCallback_wrapped = instrumentFunction({
|
|
|
2626
2848
|
* authenticating (or linking) the user with the social provider. This is the
|
|
2627
2849
|
* final step after `signInWithSocialRedirect` + `detectSocialRedirectUrl`.
|
|
2628
2850
|
*
|
|
2851
|
+
* A callback URL whose stored redirect state is missing or does not match can
|
|
2852
|
+
* never complete, so its OAuth parameters are stripped from the browser URL
|
|
2853
|
+
* before the error is rethrown. Callers that decide whether to complete a
|
|
2854
|
+
* redirect by inspecting the URL therefore see the failure once instead of
|
|
2855
|
+
* retrying the same doomed callback on every render. The clean-up is scoped to
|
|
2856
|
+
* the state of the callback it failed on, so a newer callback sitting in the
|
|
2857
|
+
* address bar is left alone.
|
|
2858
|
+
*
|
|
2629
2859
|
* @example
|
|
2630
2860
|
* ```ts
|
|
2631
2861
|
* const redirectUrl = detectSocialRedirectUrl();
|
|
@@ -2639,16 +2869,30 @@ const __processSocialCallback_wrapped = instrumentFunction({
|
|
|
2639
2869
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2640
2870
|
* @returns A promise that resolves to the authenticated user or null.
|
|
2641
2871
|
* @throws MissingSocialUrlParamError If required OAuth parameters are missing.
|
|
2872
|
+
* @throws MissingRedirectStorageStateError If no stored redirect state exists.
|
|
2642
2873
|
* @throws InvalidRedirectStorageStateError If the stored state doesn't match.
|
|
2643
2874
|
* @see signInWithSocialRedirect
|
|
2644
2875
|
* @see detectSocialRedirectUrl
|
|
2645
2876
|
* @see clearSocialRedirectParams
|
|
2646
2877
|
* @instrumented
|
|
2647
2878
|
*/
|
|
2648
|
-
const completeSocialRedirect = ({ url, requestedScopes }, client = getDefaultClient()) =>
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2879
|
+
const completeSocialRedirect = async ({ url, requestedScopes }, client = getDefaultClient()) => {
|
|
2880
|
+
try {
|
|
2881
|
+
return await __processSocialCallback_wrapped({
|
|
2882
|
+
requestedScopes,
|
|
2883
|
+
url
|
|
2884
|
+
}, client);
|
|
2885
|
+
} catch (error) {
|
|
2886
|
+
const hasUnusableRedirectState = error instanceof MissingRedirectStorageStateError || error instanceof InvalidRedirectStorageStateError;
|
|
2887
|
+
const failedState = url.searchParams.get("dynamicOauthState");
|
|
2888
|
+
if (hasUnusableRedirectState && failedState !== null) try {
|
|
2889
|
+
clearSocialRedirectParams({ expectedState: failedState });
|
|
2890
|
+
} catch (clearError) {
|
|
2891
|
+
getCore(client).logger.debug("[completeSocialRedirect] failed to clear the social redirect params", clearError);
|
|
2892
|
+
}
|
|
2893
|
+
throw error;
|
|
2894
|
+
}
|
|
2895
|
+
};
|
|
2652
2896
|
const __completeSocialRedirect_impl = completeSocialRedirect;
|
|
2653
2897
|
const __completeSocialRedirect_wrapped = instrumentFunction({
|
|
2654
2898
|
fn: __completeSocialRedirect_impl,
|
|
@@ -7241,20 +7485,46 @@ const hasAllGoogleDriveBackupScopes = (grantedScopes) => findMissingGoogleDriveB
|
|
|
7241
7485
|
const isInsufficientGoogleDriveScopesError = (err) => err instanceof Error && err.message.includes(ACCESS_DENIED_PHRASE);
|
|
7242
7486
|
|
|
7243
7487
|
//#endregion
|
|
7244
|
-
//#region src/utils/
|
|
7488
|
+
//#region src/utils/isAndroid/isAndroid.ts
|
|
7489
|
+
/**
|
|
7490
|
+
* Tells whether the SDK is running on Android.
|
|
7491
|
+
*
|
|
7492
|
+
* The operating system comes from {@link getOperatingSystem}, which reads
|
|
7493
|
+
* `Platform.OS` in React Native and the user agent on web.
|
|
7494
|
+
*
|
|
7495
|
+
* @example
|
|
7496
|
+
* ```ts
|
|
7497
|
+
* if (isAndroid()) {
|
|
7498
|
+
* return installationUrls.android;
|
|
7499
|
+
* }
|
|
7500
|
+
* ```
|
|
7501
|
+
*
|
|
7502
|
+
* @returns `true` when the current device runs Android.
|
|
7503
|
+
* @see getOperatingSystem
|
|
7504
|
+
* @see isIOS
|
|
7505
|
+
* @notInstrumented
|
|
7506
|
+
*/
|
|
7507
|
+
const isAndroid = () => getOperatingSystem() === "android";
|
|
7508
|
+
|
|
7509
|
+
//#endregion
|
|
7510
|
+
//#region src/utils/userAgentChecks/userAgentChecks.ts
|
|
7245
7511
|
/**
|
|
7246
7512
|
* Sourced from http://detectmobilebrowsers.com/
|
|
7513
|
+
*
|
|
7514
|
+
* iOS devices are matched by {@link isIOSUserAgent} instead of a bare `ios`
|
|
7515
|
+
* alternative, which would also match unrelated words such as `kiosk`.
|
|
7247
7516
|
* @notInstrumented
|
|
7248
7517
|
*/
|
|
7249
|
-
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|
|
|
7518
|
+
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|ipad|playbook|silk/i;
|
|
7250
7519
|
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;
|
|
7251
|
-
/**
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7520
|
+
/**
|
|
7521
|
+
* Matches the device names Apple's handhelds report, plus the standalone `ios`
|
|
7522
|
+
* token that embedded web views and custom in-app browsers use in place of a
|
|
7523
|
+
* device name. The token must stand alone so that unrelated words containing
|
|
7524
|
+
* `ios` (`kiosk`, for instance) don't match.
|
|
7525
|
+
* @notInstrumented
|
|
7526
|
+
*/
|
|
7527
|
+
const isIOSUserAgent = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|iPod|(?:^|[^a-z])ios(?:[^a-z]|$)/i.test(navigator.userAgent);
|
|
7258
7528
|
/**
|
|
7259
7529
|
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
7260
7530
|
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
@@ -7267,13 +7537,11 @@ const isIPad = (maxTouchPointsOverride) => {
|
|
|
7267
7537
|
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
7268
7538
|
};
|
|
7269
7539
|
/** @notInstrumented */
|
|
7270
|
-
const
|
|
7540
|
+
const isMobileUserAgent = (maxTouchPointsOverride) => {
|
|
7271
7541
|
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
7272
|
-
return
|
|
7542
|
+
return userAgentRegex1.test(navigator.userAgent) || userAgentRegex2.test(navigator.userAgent.substring(0, 4)) || isIPad(maxTouchPointsOverride) || isIOSUserAgent();
|
|
7273
7543
|
};
|
|
7274
7544
|
/** @notInstrumented */
|
|
7275
|
-
const isAndroid = () => isMobile() && !isIOS();
|
|
7276
|
-
/** @notInstrumented */
|
|
7277
7545
|
const isSafariBrowser = () => {
|
|
7278
7546
|
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
7279
7547
|
const { userAgent } = navigator;
|
|
@@ -7300,6 +7568,31 @@ const isChromeBrowser = () => {
|
|
|
7300
7568
|
return /\bChrome\//.test(navigator.userAgent) && !isEdgeBrowser() && !isOperaBrowser();
|
|
7301
7569
|
};
|
|
7302
7570
|
|
|
7571
|
+
//#endregion
|
|
7572
|
+
//#region src/utils/isIOS/isIOS.ts
|
|
7573
|
+
/**
|
|
7574
|
+
* Tells whether the SDK is running on iOS or iPadOS.
|
|
7575
|
+
*
|
|
7576
|
+
* The operating system comes from {@link getOperatingSystem}, which reads
|
|
7577
|
+
* `Platform.OS` in React Native and the user agent on web. Two user agents
|
|
7578
|
+
* escape it: an iPad in desktop mode announces itself as macOS, and embedded
|
|
7579
|
+
* web views may carry a lowercase `ios` token instead of a device name.
|
|
7580
|
+
*
|
|
7581
|
+
* @example
|
|
7582
|
+
* ```ts
|
|
7583
|
+
* if (isIOS()) {
|
|
7584
|
+
* return installationUrls.ios;
|
|
7585
|
+
* }
|
|
7586
|
+
* ```
|
|
7587
|
+
*
|
|
7588
|
+
* @returns `true` when the current device runs iOS or iPadOS.
|
|
7589
|
+
* @see getOperatingSystem
|
|
7590
|
+
* @see isIPad
|
|
7591
|
+
* @see isIOSUserAgent
|
|
7592
|
+
* @notInstrumented
|
|
7593
|
+
*/
|
|
7594
|
+
const isIOS = () => getOperatingSystem() === "ios" || isIOSUserAgent() || isIPad();
|
|
7595
|
+
|
|
7303
7596
|
//#endregion
|
|
7304
7597
|
//#region src/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.ts
|
|
7305
7598
|
/**
|
|
@@ -8446,6 +8739,29 @@ const __confirmTransaction_wrapped = instrumentFunction({
|
|
|
8446
8739
|
}
|
|
8447
8740
|
});
|
|
8448
8741
|
|
|
8742
|
+
//#endregion
|
|
8743
|
+
//#region src/utils/isMobile/isMobile.ts
|
|
8744
|
+
/**
|
|
8745
|
+
* Tells whether the SDK is running on a mobile device.
|
|
8746
|
+
*
|
|
8747
|
+
* This is the web implementation, which sniffs the browser's user agent. It
|
|
8748
|
+
* lives on its own so the React Native bundler can resolve
|
|
8749
|
+
* `isMobile.native.ts` instead, which always reports `true`.
|
|
8750
|
+
*
|
|
8751
|
+
* @example
|
|
8752
|
+
* ```ts
|
|
8753
|
+
* if (isMobile()) {
|
|
8754
|
+
* // hand the pairing to the wallet app instead of rendering a QR code
|
|
8755
|
+
* }
|
|
8756
|
+
* ```
|
|
8757
|
+
*
|
|
8758
|
+
* @returns `true` when the user agent belongs to a mobile device.
|
|
8759
|
+
* @see isMobileUserAgent
|
|
8760
|
+
* @see getPlatform
|
|
8761
|
+
* @notInstrumented
|
|
8762
|
+
*/
|
|
8763
|
+
const isMobile = () => isMobileUserAgent();
|
|
8764
|
+
|
|
8449
8765
|
//#endregion
|
|
8450
8766
|
//#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
|
|
8451
8767
|
/** @notInstrumented */
|
|
@@ -8845,6 +9161,457 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
8845
9161
|
}
|
|
8846
9162
|
});
|
|
8847
9163
|
|
|
9164
|
+
//#endregion
|
|
9165
|
+
//#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
|
|
9166
|
+
/**
|
|
9167
|
+
* Appends a wallet connection URI to a deeplink URL.
|
|
9168
|
+
*
|
|
9169
|
+
* Generic across URI-deeplink connection options — works for both
|
|
9170
|
+
* WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
|
|
9171
|
+
* appropriate query parameter separator based on whether the deeplink
|
|
9172
|
+
* already contains query parameters.
|
|
9173
|
+
*
|
|
9174
|
+
* @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
|
|
9175
|
+
* @param params.connectionUri - The connection URI to append.
|
|
9176
|
+
* @returns The deeplink URL with the connection URI appended as a query parameter.
|
|
9177
|
+
*
|
|
9178
|
+
* @example
|
|
9179
|
+
* ```ts
|
|
9180
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
|
|
9181
|
+
* // Returns: 'walletapp://wc?uri=wc%3A123-456'
|
|
9182
|
+
*
|
|
9183
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
|
|
9184
|
+
* // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
|
|
9185
|
+
* ```
|
|
9186
|
+
* @notInstrumented
|
|
9187
|
+
*/
|
|
9188
|
+
const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
9189
|
+
const url = new URL(deeplinkUrl);
|
|
9190
|
+
url.searchParams.set("uri", connectionUri);
|
|
9191
|
+
return url.href;
|
|
9192
|
+
};
|
|
9193
|
+
|
|
9194
|
+
//#endregion
|
|
9195
|
+
//#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
|
|
9196
|
+
/**
|
|
9197
|
+
* Picks the most appropriate deep link variant for the current platform.
|
|
9198
|
+
*
|
|
9199
|
+
* Mobile (Android, iOS, tablets) prefers `native` because the OS treats
|
|
9200
|
+
* custom URL schemes as first-class app links and gives the wallet a faster
|
|
9201
|
+
* round-trip back to the dApp. Desktop prefers `universal` because browsers
|
|
9202
|
+
* cannot resolve mobile-only custom schemes and need an `https://` link
|
|
9203
|
+
* that opens the wallet's web flow.
|
|
9204
|
+
*
|
|
9205
|
+
* In either case, the alternative is used as a fallback when the preferred
|
|
9206
|
+
* variant is missing. Returns `undefined` only when both variants are
|
|
9207
|
+
* absent.
|
|
9208
|
+
*
|
|
9209
|
+
* @example
|
|
9210
|
+
* ```ts
|
|
9211
|
+
* const deepLink = getPreferredWalletDeepLink({
|
|
9212
|
+
* deeplinks: wallet.deeplinks,
|
|
9213
|
+
* });
|
|
9214
|
+
* ```
|
|
9215
|
+
*
|
|
9216
|
+
* @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
|
|
9217
|
+
* @returns The preferred deep link URL, or `undefined` if neither variant is available.
|
|
9218
|
+
* @see appendConnectionUriToDeeplink
|
|
9219
|
+
* @see getConnectionUriDeeplink
|
|
9220
|
+
* @notInstrumented
|
|
9221
|
+
*/
|
|
9222
|
+
const getPreferredWalletDeepLink = ({ deeplinks }) => {
|
|
9223
|
+
const { native, universal } = deeplinks;
|
|
9224
|
+
if (isMobile()) return native ?? universal;
|
|
9225
|
+
return universal ?? native;
|
|
9226
|
+
};
|
|
9227
|
+
|
|
9228
|
+
//#endregion
|
|
9229
|
+
//#region src/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.ts
|
|
9230
|
+
/**
|
|
9231
|
+
* Builds the single deeplink that hands a pairing URI to the wallet, picking
|
|
9232
|
+
* the shape the URI's protocol expects.
|
|
9233
|
+
*
|
|
9234
|
+
* A WalletConnect URI travels as the `uri` query parameter of the wallet's own
|
|
9235
|
+
* deeplink, whereas the MetaMask SDK mints a launch link that already targets
|
|
9236
|
+
* MetaMask, so it is handed over untouched.
|
|
9237
|
+
*
|
|
9238
|
+
* @example
|
|
9239
|
+
* ```ts
|
|
9240
|
+
* const deeplink = getConnectionUriDeeplink({
|
|
9241
|
+
* deeplinks: connectionOption.deeplinks,
|
|
9242
|
+
* type: connectionOption.type,
|
|
9243
|
+
* uri,
|
|
9244
|
+
* });
|
|
9245
|
+
* ```
|
|
9246
|
+
*
|
|
9247
|
+
* @param params.deeplinks - The wallet's deeplink variants, as carried by the wallet book.
|
|
9248
|
+
* @param params.type - The URI connection type that minted the URI.
|
|
9249
|
+
* @param params.uri - The pairing URI.
|
|
9250
|
+
* @returns The deeplink to open, or `undefined` when the wallet publishes no deeplink to carry the URI.
|
|
9251
|
+
* @see getPreferredWalletDeepLink
|
|
9252
|
+
* @see appendConnectionUriToDeeplink
|
|
9253
|
+
* @notInstrumented
|
|
9254
|
+
*/
|
|
9255
|
+
const getConnectionUriDeeplink = ({ deeplinks, type, uri }) => {
|
|
9256
|
+
if (type === "metamaskSdkUri") return uri;
|
|
9257
|
+
const deeplinkUrl = getPreferredWalletDeepLink({ deeplinks });
|
|
9258
|
+
if (!deeplinkUrl) return;
|
|
9259
|
+
return appendConnectionUriToDeeplink({
|
|
9260
|
+
connectionUri: uri,
|
|
9261
|
+
deeplinkUrl
|
|
9262
|
+
});
|
|
9263
|
+
};
|
|
9264
|
+
|
|
9265
|
+
//#endregion
|
|
9266
|
+
//#region src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts
|
|
9267
|
+
/**
|
|
9268
|
+
* Connects to a wallet through a URI pairing and returns the connected wallet
|
|
9269
|
+
* account.
|
|
9270
|
+
*
|
|
9271
|
+
* Mints the pairing URI with the starter the chain extension registered for
|
|
9272
|
+
* the option's chain and URI type, hands it to `onConnectionUri` as the
|
|
9273
|
+
* wallet's deeplink carrying the pairing so the customer can render a QR code
|
|
9274
|
+
* or open the wallet app, then waits for the user to approve the pairing on
|
|
9275
|
+
* the wallet side.
|
|
9276
|
+
*
|
|
9277
|
+
* The handler is awaited, so an async handler that fails to open the wallet
|
|
9278
|
+
* rejects the connection rather than letting the pairing resolve into an
|
|
9279
|
+
* account nobody asked for.
|
|
9280
|
+
*
|
|
9281
|
+
* @example
|
|
9282
|
+
* ```ts
|
|
9283
|
+
* const walletAccount = await connectWithUriConnectionOption(
|
|
9284
|
+
* {
|
|
9285
|
+
* addToDynamicWalletAccounts: true,
|
|
9286
|
+
* connectionOption,
|
|
9287
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
9288
|
+
* walletKey: 'trust',
|
|
9289
|
+
* },
|
|
9290
|
+
* client
|
|
9291
|
+
* );
|
|
9292
|
+
* ```
|
|
9293
|
+
*
|
|
9294
|
+
* @param params.addToDynamicWalletAccounts - Whether the connected wallet account should be added to the client's wallet accounts.
|
|
9295
|
+
* @param params.connectionOption - The URI deeplink connection option to drive.
|
|
9296
|
+
* @param params.onConnectionUri - Called with the pairing URI once it is minted. Awaited before the approval is waited on.
|
|
9297
|
+
* @param params.walletKey - The wallet being connected, keyed as in the wallet options catalogue.
|
|
9298
|
+
* @param client - The Dynamic client instance.
|
|
9299
|
+
* @returns A promise that resolves to the connected wallet account.
|
|
9300
|
+
* @throws ConnectionUriHandlerMissingError If no onConnectionUri handler was passed.
|
|
9301
|
+
* @throws NoConnectionOptionAvailableError If no URI connection starter is registered for the option's chain and type.
|
|
9302
|
+
* @throws NoAddressFoundError If the pairing was approved but no address was shared with your app.
|
|
9303
|
+
* @see getUriConnectionStarterRegistry
|
|
9304
|
+
* @see getWalletOptionsCatalogue
|
|
9305
|
+
* @notInstrumented
|
|
9306
|
+
*/
|
|
9307
|
+
const connectWithUriConnectionOption = async ({ addToDynamicWalletAccounts, connectionOption, onConnectionUri, walletKey }, client) => {
|
|
9308
|
+
const { chain, deeplinks, type } = connectionOption;
|
|
9309
|
+
if (!onConnectionUri) throw new ConnectionUriHandlerMissingError({
|
|
9310
|
+
chain,
|
|
9311
|
+
type,
|
|
9312
|
+
walletKey
|
|
9313
|
+
});
|
|
9314
|
+
const starter = getUriConnectionStarterRegistry(client).get({
|
|
9315
|
+
chain,
|
|
9316
|
+
type
|
|
9317
|
+
});
|
|
9318
|
+
if (!starter) throw new NoConnectionOptionAvailableError({
|
|
9319
|
+
chain,
|
|
9320
|
+
walletKey
|
|
9321
|
+
});
|
|
9322
|
+
const { approval, uri } = await starter.start({ addToDynamicWalletAccounts });
|
|
9323
|
+
const walletAccountsPromise = approval();
|
|
9324
|
+
walletAccountsPromise.catch(() => void 0);
|
|
9325
|
+
await onConnectionUri({ uri: getConnectionUriDeeplink({
|
|
9326
|
+
deeplinks,
|
|
9327
|
+
type,
|
|
9328
|
+
uri
|
|
9329
|
+
}) ?? uri });
|
|
9330
|
+
const { walletAccounts } = await walletAccountsPromise;
|
|
9331
|
+
const [walletAccount] = walletAccounts;
|
|
9332
|
+
if (!walletAccount) throw new NoAddressFoundError();
|
|
9333
|
+
return walletAccount;
|
|
9334
|
+
};
|
|
9335
|
+
|
|
9336
|
+
//#endregion
|
|
9337
|
+
//#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
|
|
9338
|
+
/**
|
|
9339
|
+
* Placeholder the wallet book leaves in in-app-browser URLs for the app URL
|
|
9340
|
+
* the wallet should open.
|
|
9341
|
+
*/
|
|
9342
|
+
const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
|
|
9343
|
+
/**
|
|
9344
|
+
* Fills a wallet's in-app-browser URL template with the app URL to open.
|
|
9345
|
+
*
|
|
9346
|
+
* Wallet book entries carry the entry point as a template (e.g.
|
|
9347
|
+
* `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
|
|
9348
|
+
* usable once every occurrence of the placeholder is substituted in,
|
|
9349
|
+
* percent-encoded. Templates without the placeholder are returned untouched —
|
|
9350
|
+
* some wallets open a fixed landing page.
|
|
9351
|
+
*
|
|
9352
|
+
* @example
|
|
9353
|
+
* ```ts
|
|
9354
|
+
* buildInAppBrowserUrl({
|
|
9355
|
+
* appUrl: 'https://myapp.xyz/login',
|
|
9356
|
+
* inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
|
|
9357
|
+
* });
|
|
9358
|
+
* // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
|
|
9359
|
+
* ```
|
|
9360
|
+
*
|
|
9361
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9362
|
+
* @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
|
|
9363
|
+
* @returns The in-app-browser URL to open.
|
|
9364
|
+
* @see redirectToInAppBrowser
|
|
9365
|
+
* @see getWalletOptionsCatalogue
|
|
9366
|
+
* @notInstrumented
|
|
9367
|
+
*/
|
|
9368
|
+
const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
|
|
9369
|
+
|
|
9370
|
+
//#endregion
|
|
9371
|
+
//#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
|
|
9372
|
+
/**
|
|
9373
|
+
* Leaves your app for a wallet's in-app browser, which reloads `appUrl`
|
|
9374
|
+
* inside it.
|
|
9375
|
+
*
|
|
9376
|
+
* Call this from `handleWalletBrowserRedirect` with the URL of the page the
|
|
9377
|
+
* wallet should reload. The wallet's in-app-browser entry point is read from
|
|
9378
|
+
* the wallet options catalogue, so you only need the wallet's key. The wallet
|
|
9379
|
+
* is only injected on that reload, so the connection is made on the next page
|
|
9380
|
+
* load rather than in the current one.
|
|
9381
|
+
*
|
|
9382
|
+
* @example
|
|
9383
|
+
* ```ts
|
|
9384
|
+
* await connectWalletOption({
|
|
9385
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
9386
|
+
* redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
|
|
9387
|
+
* walletKey: 'coinbase',
|
|
9388
|
+
* });
|
|
9389
|
+
* ```
|
|
9390
|
+
*
|
|
9391
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9392
|
+
* @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
|
|
9393
|
+
* @param [params.chain] - The chain to open the wallet's browser for. Required only when the wallet exposes an in-app browser on more than one enabled chain.
|
|
9394
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9395
|
+
* @returns A promise that resolves once the redirect is triggered.
|
|
9396
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9397
|
+
* @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
|
|
9398
|
+
* @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
|
|
9399
|
+
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
9400
|
+
* @see connectWalletOption
|
|
9401
|
+
* @see WalletBrowserRedirectHandlerParams
|
|
9402
|
+
* @instrumented
|
|
9403
|
+
*/
|
|
9404
|
+
const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
|
|
9405
|
+
const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
|
|
9406
|
+
if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
|
|
9407
|
+
const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
|
|
9408
|
+
if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
|
|
9409
|
+
chain,
|
|
9410
|
+
installationUrls: walletOption.installationUrls,
|
|
9411
|
+
walletKey
|
|
9412
|
+
});
|
|
9413
|
+
const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
|
|
9414
|
+
if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
|
|
9415
|
+
chains: availableChains,
|
|
9416
|
+
walletKey
|
|
9417
|
+
});
|
|
9418
|
+
const [inAppBrowserOption] = inAppBrowserOptions;
|
|
9419
|
+
const urlToOpen = buildInAppBrowserUrl({
|
|
9420
|
+
appUrl,
|
|
9421
|
+
inAppBrowserUrl: inAppBrowserOption.url
|
|
9422
|
+
});
|
|
9423
|
+
assertSafeDeeplinkUrl(urlToOpen);
|
|
9424
|
+
await getCore(client).openDeeplink(urlToOpen);
|
|
9425
|
+
};
|
|
9426
|
+
const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
|
|
9427
|
+
const __redirectToInAppBrowser_wrapped = instrumentFunction({
|
|
9428
|
+
fn: __redirectToInAppBrowser_impl,
|
|
9429
|
+
functionName: "redirectToInAppBrowser",
|
|
9430
|
+
getCore: () => {
|
|
9431
|
+
try {
|
|
9432
|
+
return getCore(getDefaultClient());
|
|
9433
|
+
} catch {
|
|
9434
|
+
return;
|
|
9435
|
+
}
|
|
9436
|
+
}
|
|
9437
|
+
});
|
|
9438
|
+
|
|
9439
|
+
//#endregion
|
|
9440
|
+
//#region src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts
|
|
9441
|
+
/**
|
|
9442
|
+
* Picks the connection option `connectWalletOption` should drive for a wallet.
|
|
9443
|
+
*
|
|
9444
|
+
* Reads the wallet options catalogue, keeps the options this client can
|
|
9445
|
+
* actually drive — a registered wallet provider, an in-app-browser entry, or
|
|
9446
|
+
* a URI pairing whose starter a chain extension has registered — and returns
|
|
9447
|
+
* the best one by the catalogue's ordering.
|
|
9448
|
+
*
|
|
9449
|
+
* @example
|
|
9450
|
+
* ```ts
|
|
9451
|
+
* const connectionOption = await resolveWalletConnectionOption(
|
|
9452
|
+
* { walletKey: 'metamask' },
|
|
9453
|
+
* client
|
|
9454
|
+
* );
|
|
9455
|
+
* ```
|
|
9456
|
+
*
|
|
9457
|
+
* @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue.
|
|
9458
|
+
* @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
|
|
9459
|
+
* @param client - The Dynamic client instance.
|
|
9460
|
+
* @returns A promise that resolves to the connection option to drive.
|
|
9461
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9462
|
+
* @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
|
|
9463
|
+
* @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
|
|
9464
|
+
* @see connectWalletOption
|
|
9465
|
+
* @see getWalletOptionsCatalogue
|
|
9466
|
+
* @notInstrumented
|
|
9467
|
+
*/
|
|
9468
|
+
const resolveWalletConnectionOption = async ({ walletKey, chain }, client) => {
|
|
9469
|
+
const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
|
|
9470
|
+
if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
|
|
9471
|
+
const uriConnectionStarterRegistry = getUriConnectionStarterRegistry(client);
|
|
9472
|
+
const availableOptions = walletOption.connectionOptions.filter((option) => !chain || option.chain === chain).filter((option) => {
|
|
9473
|
+
if (option.type !== "walletConnect" && option.type !== "metamaskSdkUri") return true;
|
|
9474
|
+
const starter = uriConnectionStarterRegistry.get({
|
|
9475
|
+
chain: option.chain,
|
|
9476
|
+
type: option.type
|
|
9477
|
+
});
|
|
9478
|
+
return Boolean(starter);
|
|
9479
|
+
});
|
|
9480
|
+
if (availableOptions.length === 0) throw new NoConnectionOptionAvailableError({
|
|
9481
|
+
chain,
|
|
9482
|
+
installationUrls: walletOption.installationUrls,
|
|
9483
|
+
walletKey
|
|
9484
|
+
});
|
|
9485
|
+
const availableChains = [...new Set(availableOptions.map((option) => option.chain))];
|
|
9486
|
+
if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
|
|
9487
|
+
chains: availableChains,
|
|
9488
|
+
walletKey
|
|
9489
|
+
});
|
|
9490
|
+
const [connectionOption] = availableOptions;
|
|
9491
|
+
return connectionOption;
|
|
9492
|
+
};
|
|
9493
|
+
|
|
9494
|
+
//#endregion
|
|
9495
|
+
//#region src/utils/getCurrentPageUrl/getCurrentPageUrl.ts
|
|
9496
|
+
/**
|
|
9497
|
+
* Returns the URL of the page the app is running in.
|
|
9498
|
+
*
|
|
9499
|
+
* @example
|
|
9500
|
+
* ```ts
|
|
9501
|
+
* const appUrl = getCurrentPageUrl() ?? 'https://mydapp.xyz';
|
|
9502
|
+
* ```
|
|
9503
|
+
*
|
|
9504
|
+
* @returns The current page URL, or null where there is no page to read it from, such as on React Native and during server-side rendering.
|
|
9505
|
+
* @see isServerSideRendering
|
|
9506
|
+
* @see redirectToInAppBrowser
|
|
9507
|
+
* @notInstrumented
|
|
9508
|
+
*/
|
|
9509
|
+
const getCurrentPageUrl = () => {
|
|
9510
|
+
if (typeof window === "undefined") return null;
|
|
9511
|
+
const href = window.location?.href;
|
|
9512
|
+
if (typeof href !== "string") return null;
|
|
9513
|
+
return href;
|
|
9514
|
+
};
|
|
9515
|
+
|
|
9516
|
+
//#endregion
|
|
9517
|
+
//#region src/highLevelFunctions/connectWalletOption/connectWalletOption.ts
|
|
9518
|
+
/**
|
|
9519
|
+
* Connects to an external wallet by its wallet options catalogue key and
|
|
9520
|
+
* returns the connected wallet account.
|
|
9521
|
+
*
|
|
9522
|
+
* Picks the connection path for the wallet so the customer does not have to:
|
|
9523
|
+
* a registered wallet provider when the user has the wallet installed,
|
|
9524
|
+
* otherwise a URI pairing (WalletConnect or the MetaMask SDK), with the
|
|
9525
|
+
* pairing URI handed to `onConnectionUri` while the returned promise waits for
|
|
9526
|
+
* the user to approve on the wallet side.
|
|
9527
|
+
*
|
|
9528
|
+
* Wallets that can only be reached through their own in-app browser — no
|
|
9529
|
+
* extension, no URI pairing — resolve to a redirect instead: the wallet and
|
|
9530
|
+
* chain are handed to `handleWalletBrowserRedirect`, which leaves for that
|
|
9531
|
+
* browser with `redirectToInAppBrowser`. Without that handler, the current
|
|
9532
|
+
* page is redirected into the wallet's browser directly, so the handler is
|
|
9533
|
+
* only needed to pick a different page to come back to, or where there is no
|
|
9534
|
+
* page URL to reuse (React Native, server-side rendering). The returned
|
|
9535
|
+
* promise never settles either way, since the connection completes on the
|
|
9536
|
+
* next page load inside the wallet's browser.
|
|
9537
|
+
*
|
|
9538
|
+
* Note: This function does not verify the wallet account — use
|
|
9539
|
+
* `verifyWalletAccount` afterwards to link it to the user.
|
|
9540
|
+
*
|
|
9541
|
+
* @example
|
|
9542
|
+
* ```ts
|
|
9543
|
+
* const walletAccount = await connectWalletOption({
|
|
9544
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
9545
|
+
* redirectToInAppBrowser({ appUrl: 'https://mydapp.xyz', chain, walletKey }),
|
|
9546
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
9547
|
+
* walletKey: 'metamask',
|
|
9548
|
+
* });
|
|
9549
|
+
* console.log(walletAccount.address);
|
|
9550
|
+
* ```
|
|
9551
|
+
*
|
|
9552
|
+
* @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue (e.g. 'metamask', 'phantom').
|
|
9553
|
+
* @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
|
|
9554
|
+
* @param [params.onConnectionUri] - Called with the pairing URI when the connection runs through a URI pairing.
|
|
9555
|
+
* @param [params.handleWalletBrowserRedirect] - Called with the wallet and chain when the wallet can only be connected through its own in-app browser. Defaults to redirecting the current page into that browser.
|
|
9556
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9557
|
+
* @returns A promise that resolves to the connected wallet account, or that never settles on the in-app-browser path.
|
|
9558
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9559
|
+
* @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
|
|
9560
|
+
* @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
|
|
9561
|
+
* @throws ConnectionUriHandlerMissingError If the wallet resolves to a URI pairing and no onConnectionUri handler was passed.
|
|
9562
|
+
* @throws WalletBrowserRedirectHandlerMissingError If the wallet resolves to its in-app browser, no handleWalletBrowserRedirect handler was passed, and there is no current page URL to redirect.
|
|
9563
|
+
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
9564
|
+
* @see verifyWalletAccount
|
|
9565
|
+
* @see redirectToInAppBrowser
|
|
9566
|
+
* @see getWalletOptionsCatalogue
|
|
9567
|
+
* @instrumented
|
|
9568
|
+
*/
|
|
9569
|
+
const connectWalletOption = async ({ walletKey, chain, handleWalletBrowserRedirect, onConnectionUri }, client = getDefaultClient()) => {
|
|
9570
|
+
const connectionOption = await resolveWalletConnectionOption({
|
|
9571
|
+
chain,
|
|
9572
|
+
walletKey
|
|
9573
|
+
}, client);
|
|
9574
|
+
if (connectionOption.type === "withWalletProvider") return __connectWithWalletProvider_wrapped({ walletProviderKey: connectionOption.walletProviderKey }, client);
|
|
9575
|
+
if (connectionOption.type === "inAppBrowser") {
|
|
9576
|
+
const { chain: inAppBrowserChain } = connectionOption;
|
|
9577
|
+
if (handleWalletBrowserRedirect) handleWalletBrowserRedirect({
|
|
9578
|
+
chain: inAppBrowserChain,
|
|
9579
|
+
walletKey
|
|
9580
|
+
});
|
|
9581
|
+
else {
|
|
9582
|
+
const currentPageUrl = getCurrentPageUrl();
|
|
9583
|
+
if (!currentPageUrl) throw new WalletBrowserRedirectHandlerMissingError({
|
|
9584
|
+
chain: inAppBrowserChain,
|
|
9585
|
+
walletKey
|
|
9586
|
+
});
|
|
9587
|
+
await __redirectToInAppBrowser_wrapped({
|
|
9588
|
+
appUrl: currentPageUrl,
|
|
9589
|
+
chain: inAppBrowserChain,
|
|
9590
|
+
walletKey
|
|
9591
|
+
}, client);
|
|
9592
|
+
}
|
|
9593
|
+
return new Promise(() => void 0);
|
|
9594
|
+
}
|
|
9595
|
+
return connectWithUriConnectionOption({
|
|
9596
|
+
addToDynamicWalletAccounts: true,
|
|
9597
|
+
connectionOption,
|
|
9598
|
+
onConnectionUri,
|
|
9599
|
+
walletKey
|
|
9600
|
+
}, client);
|
|
9601
|
+
};
|
|
9602
|
+
const __connectWalletOption_impl = connectWalletOption;
|
|
9603
|
+
const __connectWalletOption_wrapped = instrumentFunction({
|
|
9604
|
+
fn: __connectWalletOption_impl,
|
|
9605
|
+
functionName: "connectWalletOption",
|
|
9606
|
+
getCore: () => {
|
|
9607
|
+
try {
|
|
9608
|
+
return getCore(getDefaultClient());
|
|
9609
|
+
} catch {
|
|
9610
|
+
return;
|
|
9611
|
+
}
|
|
9612
|
+
}
|
|
9613
|
+
});
|
|
9614
|
+
|
|
8848
9615
|
//#endregion
|
|
8849
9616
|
//#region src/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.ts
|
|
8850
9617
|
/**
|
|
@@ -10043,36 +10810,6 @@ const __withdrawFromYieldVault_wrapped = instrumentFunction({
|
|
|
10043
10810
|
}
|
|
10044
10811
|
});
|
|
10045
10812
|
|
|
10046
|
-
//#endregion
|
|
10047
|
-
//#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
|
|
10048
|
-
/**
|
|
10049
|
-
* Appends a wallet connection URI to a deeplink URL.
|
|
10050
|
-
*
|
|
10051
|
-
* Generic across URI-deeplink connection options — works for both
|
|
10052
|
-
* WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
|
|
10053
|
-
* appropriate query parameter separator based on whether the deeplink
|
|
10054
|
-
* already contains query parameters.
|
|
10055
|
-
*
|
|
10056
|
-
* @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
|
|
10057
|
-
* @param params.connectionUri - The connection URI to append.
|
|
10058
|
-
* @returns The deeplink URL with the connection URI appended as a query parameter.
|
|
10059
|
-
*
|
|
10060
|
-
* @example
|
|
10061
|
-
* ```ts
|
|
10062
|
-
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
|
|
10063
|
-
* // Returns: 'walletapp://wc?uri=wc%3A123-456'
|
|
10064
|
-
*
|
|
10065
|
-
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
|
|
10066
|
-
* // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
|
|
10067
|
-
* ```
|
|
10068
|
-
* @notInstrumented
|
|
10069
|
-
*/
|
|
10070
|
-
const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
10071
|
-
const url = new URL(deeplinkUrl);
|
|
10072
|
-
url.searchParams.set("uri", connectionUri);
|
|
10073
|
-
return url.href;
|
|
10074
|
-
};
|
|
10075
|
-
|
|
10076
10813
|
//#endregion
|
|
10077
10814
|
//#region src/utils/parseUserAgent/parseUserAgent.ts
|
|
10078
10815
|
const browserMatchers = [
|
|
@@ -10154,5 +10891,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
10154
10891
|
assertPackageVersion(name, version);
|
|
10155
10892
|
|
|
10156
10893
|
//#endregion
|
|
10157
|
-
export { BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, DeeplinkConnectAndVerifyUnsupportedError, DeviceRegistrationIdentityMismatchError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MergeAccountsConfirmationError, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, WalletScreeningBlockedError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, checkUserScopes, __claimYieldRewards_wrapped as claimYieldRewards, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __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, createCoinbaseExchangeTransfer, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainBalances, getMultichainTokenBalances, getNativeBalance, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __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, screenTransaction, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __setSelectedWalletAccount_wrapped as setSelectedWalletAccount, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, __submitFlowTransaction_wrapped as submitFlowTransaction, 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, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
|
|
10894
|
+
export { AmbiguousWalletChainError, BaseError, COINBASE_TRAVEL_RULE_FIELD_DESCRIPTIONS, CaptchaProviderEnum, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, CoinbaseBeneficiaryWalletType, CoinbaseIsSelfTransfer, CoinbaseTransferMfaFailedError, CoinbaseTransferMfaRequiredError, CoinbaseTravelRuleFieldName, CoinbaseTravelRuleRequiredError, ConnectionUriHandlerMissingError, DeeplinkConnectAndVerifyUnsupportedError, DeviceRegistrationIdentityMismatchError, FeeEstimationFailedError, FlowSessionTokenMissingError, GOOGLE_DRIVE_BACKUP_REQUIRED_SCOPES, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, InvalidSocialCallbackOriginError, JwtVerifiedCredentialFormatEnum, LinkCredentialError, MFAAction, MergeAccountsConfirmationError, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoConnectionOptionAvailableError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, ProviderEnum, SandboxMaximumThresholdReachedError, ScreeningNotRequiredError, SimulationFailedError, TokenScope, TokenSwapError, TransactionBroadcastError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserCancelledSocialPopUpError, UserNotAuthenticatedError, UserRejectedError, WaasChainEnum, WaasLoadFailedError, WaasOnboardingIncompleteError, WaasRbacStaleRetryUnsafeError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletBrowserRedirectHandlerMissingError, WalletOptionNotFoundError, WalletProviderMethodUnavailableError, WalletScreeningBlockedError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, appendConnectionUriToDeeplink, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, __attachFlowSource_wrapped as attachFlowSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, __broadcastFlow_wrapped as broadcastFlow, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __cancelFlow_wrapped as cancelFlow, __checkStepUpAuth_wrapped as checkStepUpAuth, checkUserScopes, __claimYieldRewards_wrapped as claimYieldRewards, clearDeviceRegistrationRedirectParams, clearSocialRedirectParams, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWalletOption_wrapped as connectWalletOption, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, createCoinbaseExchangeTransfer, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, __depositToYieldVault_wrapped as depositToYieldVault, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, excludeInstalledFromCatalog, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, findMissingGoogleDriveBackupScopes, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCaptchaSettings, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseAccounts, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, __getMoonPayCurrencies_wrapped as getMoonPayCurrencies, __getMoonPayUrl_wrapped as getMoonPayUrl, getMultichainBalances, getMultichainTokenBalances, getNativeBalance, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPreferredWalletDeepLink, getPrimaryWalletAccount, getRegisteredDevices, getSelectedWalletAccount, getSwapQuote, getSwapStatus, getTokenBalances, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletOptionsCatalogue, getWalletProviderDataByKey, getYieldDetails, getYieldPosition, getYieldRewards, hasAllGoogleDriveBackupScopes, hasExtension, __initializeClient_wrapped as initializeClient, isAnyWalletAccountConnected, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isExternalWalletScreeningEnabled, isHardwareWalletAccount, isInsufficientGoogleDriveScopesError, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, listYieldVaults, logout, matchWalletProvidersToCatalogGroup, mergeUserAccounts, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __prepareFlowSigning_wrapped as prepareFlowSigning, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __redirectToInAppBrowser_wrapped as redirectToInAppBrowser, __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, screenTransaction, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __setSelectedWalletAccount_wrapped as setSelectedWalletAccount, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialPopUp_wrapped as signInWithSocialPopUp, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, __submitFlowTransaction_wrapped as submitFlowTransaction, 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, __withdrawFromYieldVault_wrapped as withdrawFromYieldVault };
|
|
10158
10895
|
//# sourceMappingURL=index.esm.js.map
|