@dynamic-labs-sdk/client 1.31.1 → 1.31.2
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-d2qJyIvx.native.esm.js} +2 -2
- package/dist/{apiClient-BZfdx9fH.native.esm.js.map → apiClient-d2qJyIvx.native.esm.js.map} +1 -1
- package/dist/core.cjs +77 -5
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +78 -8
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +76 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/AmbiguousWalletChainError.d.ts +32 -0
- package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -0
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts +37 -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/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 +7 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-CbMpiSub.esm.js → getNetworkProviderFromNetworkId-D9nx6Od5.esm.js} +7 -7
- package/dist/getNetworkProviderFromNetworkId-D9nx6Od5.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js → getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-DRA4M5Ab.native.esm.js.map → getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DNIuJp20.cjs → getNetworkProviderFromNetworkId-DueBnAl6.cjs} +2 -2
- package/dist/{getNetworkProviderFromNetworkId-DNIuJp20.cjs.map → getNetworkProviderFromNetworkId-DueBnAl6.cjs.map} +1 -1
- package/dist/{getSignedSessionId-DKKSCpj9.native.esm.js → getSignedSessionId-5q4uyZsv.native.esm.js} +34 -4
- package/dist/getSignedSessionId-5q4uyZsv.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId--wpV_VKs.cjs → getSignedSessionId-B5oxmSTs.cjs} +39 -3
- package/dist/getSignedSessionId-B5oxmSTs.cjs.map +1 -0
- package/dist/{getSignedSessionId-DHn6yhGX.esm.js → getSignedSessionId-BKfQycNo.esm.js} +34 -4
- package/dist/getSignedSessionId-BKfQycNo.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs → getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-B5LUGiDP.cjs.map → getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js → getVerifiedCredentialForWalletAccount-_3MExyld.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-C_GcjgC8.esm.js.map → getVerifiedCredentialForWalletAccount-_3MExyld.esm.js.map} +1 -1
- package/dist/index.cjs +398 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +396 -30
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +352 -28
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js → isMfaRequiredForAction-BDmY2_Sj.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-D1a1Nudo.esm.js.map → isMfaRequiredForAction-BDmY2_Sj.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js → isMfaRequiredForAction-BrRCSvEX.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CC7bjhqy.native.esm.js.map → isMfaRequiredForAction-BrRCSvEX.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs → isMfaRequiredForAction-DnKzPDZk.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-YjJLLFFs.cjs.map → isMfaRequiredForAction-DnKzPDZk.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs → isUserOnboardingComplete-7GzNYU2g.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-C2ZuLDT9.cjs.map → isUserOnboardingComplete-7GzNYU2g.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js → isUserOnboardingComplete-BfMMBtkF.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-BIjk67vX.native.esm.js.map → isUserOnboardingComplete-BfMMBtkF.native.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js → isUserOnboardingComplete-D1-QluDm.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-C4bE5xqM.esm.js.map → isUserOnboardingComplete-D1-QluDm.esm.js.map} +1 -1
- package/dist/{logoutWithReason-BcWQGREO.native.esm.js → logoutWithReason-3UICYir7.native.esm.js} +2 -2
- package/dist/{logoutWithReason-BcWQGREO.native.esm.js.map → logoutWithReason-3UICYir7.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-BqsgA8gI.esm.js → logoutWithReason-CHyuBHdx.esm.js} +2 -2
- package/dist/{logoutWithReason-BqsgA8gI.esm.js.map → logoutWithReason-CHyuBHdx.esm.js.map} +1 -1
- package/dist/{logoutWithReason-D6ruPOvJ.cjs → logoutWithReason-C_T7KddM.cjs} +2 -2
- package/dist/{logoutWithReason-D6ruPOvJ.cjs.map → logoutWithReason-C_T7KddM.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-zazAx6WV.esm.js → migrateFromFireblocks-BMO3u6rO.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-zazAx6WV.esm.js.map → migrateFromFireblocks-BMO3u6rO.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-CCNTDCmW.cjs → migrateFromFireblocks-C9Kuke5V.cjs} +2 -2
- package/dist/{migrateFromFireblocks-CCNTDCmW.cjs.map → migrateFromFireblocks-C9Kuke5V.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js → migrateFromFireblocks-DJt9bktR.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-BxPgqhbu.native.esm.js.map → migrateFromFireblocks-DJt9bktR.native.esm.js.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/connectWallet.types.d.ts +35 -0
- package/dist/modules/wallets/connectWallet.types.d.ts.map +1 -0
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +52 -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/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/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-9QajYGeK.native.esm.js} +4 -4
- package/dist/{waas-DidjjQjB.native.esm.js.map → waas-9QajYGeK.native.esm.js.map} +1 -1
- package/dist/{waas-ZWlJHeXc.cjs → waas-Bxsd0-HG.cjs} +4 -4
- package/dist/{waas-ZWlJHeXc.cjs.map → waas-Bxsd0-HG.cjs.map} +1 -1
- package/dist/{waas-C2PbR02F.esm.js → waas-T_dHXyI9.esm.js} +4 -4
- package/dist/{waas-C2PbR02F.esm.js.map → waas-T_dHXyI9.esm.js.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/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.native.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as NONCE_POOL_SIZE, A as onEvent, B as splitWalletProviderKey, D as getWalletProviderRegistry, E as WalletProviderPriority, Et as version, H as isUserMissingMfaAuth, I as getChainFromVerifiedCredentialChain, J as getNonce, L as CHAINS_INFO_MAP, N as getWalletAccounts, O as emitEvent, Q as createLocalStorageAdapter, R as formatWalletAccountId, St as BaseError, T as getWalletProviders, Tt as name, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _t as getPlatform, a as instrumentFunction, at as InvalidExternalAuthError, c as getUserAgent, d as updateAuthFromVerifyResponse, et as UnauthorizedError, f as upsertElevatedAccessToken, ft as isCookieEnabled, g as checkAndRaiseWalletAccountsChangedEvent, gt as randomString, h as InvalidParamError, ht as getElevatedAccessToken, i as __refreshAuth_wrapped, it as LinkCredentialError, j as onceEvent, k as offEvent, l as getOperatingSystem, lt as DYNAMIC_ICONIC_SPRITE_URL, m as decodeJwt, mt as ValueMustBeDefinedError, n as NoWalletProviderFoundError, nt as MfaRateLimitedError, o as scrubParameters, ot as APIError, p as parseElevatedAccessToken, pt as assertDefined, r as createApiClient, rt as MfaInvalidOtpError, s as DEFAULT_PII_FIELDS, t as getWalletProviderFromWalletAccount, tt as SandboxMaximumThresholdReachedError, u as extractSessionId, ut as SDK_API_CORE_VERSION, v as initializeWaasClientsForEagerRecovery, vt as getDefaultClient, wt as TokenScope, xt as getCore, yt as setDefaultClient, z as normalizeAddress } from "./apiClient-
|
|
2
|
-
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-
|
|
3
|
-
import { Q as WaasChainEnum } from "./waas-
|
|
4
|
-
import { A as createEventEmitter, B as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as createAppForegroundSubscriber, G as createStorage, H as getBuffer, I as FETCH_PROJECT_SETTINGS_TRACKER_KEY, L as GENERATE_SESSION_KEYS_TRACKER_KEY, N as CannotTrackError, P as createDeferredPromise, R as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as subscribeWithSelector, V as isServerSideRendering, W as isEqualShallow, _ as getAppMetadata, a as removeUnverifiedWalletAccount, b as WalletAlreadyLinkedToAnotherUserError, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getNetworkProviderBuilderRegistry, g as isCaptchaRequired, h as consumeCaptchaToken, i as verifyMessageSignatureOwnership, j as createCrossTabBroadcast, k as createLogger, l as updateWalletProviderKeysForVerifiedCredentials, m as __setCaptchaToken_wrapped, o as createSignInMessageStatement, p as hasExtension, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-
|
|
5
|
-
import { a as retryOnFail, i as isSignedIn, n as generateSessionKeys, o as getVerifiedCredentialForWalletAccount, r as fetchProjectSettings, s as getWalletProviderByKey, t as __logoutWithReason_wrapped } from "./logoutWithReason-
|
|
6
|
-
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
7
|
-
import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-
|
|
1
|
+
import { $ as NONCE_POOL_SIZE, A as onEvent, B as splitWalletProviderKey, D as getWalletProviderRegistry, E as WalletProviderPriority, Et as version, H as isUserMissingMfaAuth, I as getChainFromVerifiedCredentialChain, J as getNonce, L as CHAINS_INFO_MAP, N as getWalletAccounts, O as emitEvent, Q as createLocalStorageAdapter, R as formatWalletAccountId, St as BaseError, T as getWalletProviders, Tt as name, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _t as getPlatform, a as instrumentFunction, at as InvalidExternalAuthError, c as getUserAgent, d as updateAuthFromVerifyResponse, et as UnauthorizedError, f as upsertElevatedAccessToken, ft as isCookieEnabled, g as checkAndRaiseWalletAccountsChangedEvent, gt as randomString, h as InvalidParamError, ht as getElevatedAccessToken, i as __refreshAuth_wrapped, it as LinkCredentialError, j as onceEvent, k as offEvent, l as getOperatingSystem, lt as DYNAMIC_ICONIC_SPRITE_URL, m as decodeJwt, mt as ValueMustBeDefinedError, n as NoWalletProviderFoundError, nt as MfaRateLimitedError, o as scrubParameters, ot as APIError, p as parseElevatedAccessToken, pt as assertDefined, r as createApiClient, rt as MfaInvalidOtpError, s as DEFAULT_PII_FIELDS, t as getWalletProviderFromWalletAccount, tt as SandboxMaximumThresholdReachedError, u as extractSessionId, ut as SDK_API_CORE_VERSION, v as initializeWaasClientsForEagerRecovery, vt as getDefaultClient, wt as TokenScope, xt as getCore, yt as setDefaultClient, z as normalizeAddress } from "./apiClient-d2qJyIvx.native.esm.js";
|
|
2
|
+
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-DJt9bktR.native.esm.js";
|
|
3
|
+
import { Q as WaasChainEnum } from "./waas-9QajYGeK.native.esm.js";
|
|
4
|
+
import { A as createEventEmitter, B as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, C as getKeychainIndexedDBName, D as assertSafeNavigationUrl, E as createKeychainService, F as createAppForegroundSubscriber, G as createStorage, H as getBuffer, I as FETCH_PROJECT_SETTINGS_TRACKER_KEY, L as GENERATE_SESSION_KEYS_TRACKER_KEY, N as CannotTrackError, P as createDeferredPromise, R as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, S as MergeAccountsConfirmationError, T as assertSafeDeeplinkUrl, U as subscribeWithSelector, V as isServerSideRendering, W as isEqualShallow, _ as getAppMetadata, a as removeUnverifiedWalletAccount, b as WalletAlreadyLinkedToAnotherUserError, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getNetworkProviderBuilderRegistry, g as isCaptchaRequired, h as consumeCaptchaToken, i as verifyMessageSignatureOwnership, j as createCrossTabBroadcast, k as createLogger, l as updateWalletProviderKeysForVerifiedCredentials, m as __setCaptchaToken_wrapped, o as createSignInMessageStatement, p as hasExtension, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js";
|
|
5
|
+
import { a as retryOnFail, i as isSignedIn, n as generateSessionKeys, o as getVerifiedCredentialForWalletAccount, r as fetchProjectSettings, s as getWalletProviderByKey, t as __logoutWithReason_wrapped } from "./logoutWithReason-3UICYir7.native.esm.js";
|
|
6
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BrRCSvEX.native.esm.js";
|
|
7
|
+
import { a as WaasRbacStaleRetryUnsafeError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasOnboardingIncompleteError, r as isDeviceRegistrationRequired, s as WaasLoadFailedError, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-BfMMBtkF.native.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";
|
|
@@ -557,7 +557,7 @@ const initializeClient = async (client = getDefaultClient()) => {
|
|
|
557
557
|
*/
|
|
558
558
|
if (isCookieEnabled(client)) await __refreshAuth_wrapped(client).catch(async (error) => {
|
|
559
559
|
if (error.status === 401) {
|
|
560
|
-
core.logger.
|
|
560
|
+
core.logger.warn("Session expired during initialization", error);
|
|
561
561
|
if (client.user) await __logoutWithReason_wrapped({ reason: "session-refresh-unauthorized" }, client);
|
|
562
562
|
} else throw error;
|
|
563
563
|
});
|
|
@@ -1284,6 +1284,46 @@ const __createDynamicClient_wrapped = instrumentFunction({
|
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
1286
|
|
|
1287
|
+
//#endregion
|
|
1288
|
+
//#region src/errors/AmbiguousWalletChainError.ts
|
|
1289
|
+
/**
|
|
1290
|
+
* Thrown when a wallet can be connected on more than one of the client's
|
|
1291
|
+
* enabled chains and no chain was passed to `connectWallet`.
|
|
1292
|
+
*
|
|
1293
|
+
* Multi-chain wallets such as MetaMask or Phantom connect to a different
|
|
1294
|
+
* account per chain, so the chain has to be an explicit choice rather than one
|
|
1295
|
+
* Dynamic makes on the customer's behalf.
|
|
1296
|
+
*
|
|
1297
|
+
* @example
|
|
1298
|
+
* ```ts
|
|
1299
|
+
* try {
|
|
1300
|
+
* await connectWallet({ walletKey: 'phantom' });
|
|
1301
|
+
* } catch (error) {
|
|
1302
|
+
* if (error instanceof AmbiguousWalletChainError) {
|
|
1303
|
+
* await connectWallet({ chain: 'SOL', walletKey: 'phantom' });
|
|
1304
|
+
* }
|
|
1305
|
+
* }
|
|
1306
|
+
* ```
|
|
1307
|
+
* @see connectWallet
|
|
1308
|
+
* @see getWalletOptionsCatalogue
|
|
1309
|
+
*/
|
|
1310
|
+
var AmbiguousWalletChainError = class extends BaseError {
|
|
1311
|
+
constructor({ chains, walletKey }) {
|
|
1312
|
+
super({
|
|
1313
|
+
cause: null,
|
|
1314
|
+
code: "ambiguous_wallet_chain",
|
|
1315
|
+
docsUrl: null,
|
|
1316
|
+
metaMessages: [
|
|
1317
|
+
`Wallet key: ${walletKey}`,
|
|
1318
|
+
`Available chains: ${chains.join(", ")}`,
|
|
1319
|
+
"Pass the chain param to pick which one to connect on."
|
|
1320
|
+
],
|
|
1321
|
+
name: "AmbiguousWalletChainError",
|
|
1322
|
+
shortMessage: `Wallet ${walletKey} can be connected on more than one chain, so the chain param is required.`
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1287
1327
|
//#endregion
|
|
1288
1328
|
//#region src/errors/CheckoutSessionTokenMissingError.ts
|
|
1289
1329
|
var CheckoutSessionTokenMissingError = class extends BaseError {
|
|
@@ -1683,6 +1723,54 @@ var NoAddressFoundError = class extends BaseError {
|
|
|
1683
1723
|
}
|
|
1684
1724
|
};
|
|
1685
1725
|
|
|
1726
|
+
//#endregion
|
|
1727
|
+
//#region src/errors/NoConnectionOptionAvailableError.ts
|
|
1728
|
+
/**
|
|
1729
|
+
* Thrown when a wallet exists in the catalogue but has no connection option
|
|
1730
|
+
* this client can drive.
|
|
1731
|
+
*
|
|
1732
|
+
* Happens when the wallet is not installed on the device and no URI pairing is
|
|
1733
|
+
* available for it — either the wallet does not support one, or the chain
|
|
1734
|
+
* extension providing that pairing was not added to the client.
|
|
1735
|
+
*
|
|
1736
|
+
* @example
|
|
1737
|
+
* ```ts
|
|
1738
|
+
* try {
|
|
1739
|
+
* await connectWallet({ walletKey: 'rainbow' });
|
|
1740
|
+
* } catch (error) {
|
|
1741
|
+
* if (error instanceof NoConnectionOptionAvailableError) {
|
|
1742
|
+
* promptWalletInstall(error.installationUrls);
|
|
1743
|
+
* }
|
|
1744
|
+
* }
|
|
1745
|
+
* ```
|
|
1746
|
+
* @see connectWallet
|
|
1747
|
+
* @see getWalletOptionsCatalogue
|
|
1748
|
+
*/
|
|
1749
|
+
var NoConnectionOptionAvailableError = class extends BaseError {
|
|
1750
|
+
/**
|
|
1751
|
+
* Install / download links for the wallet, when the wallet book carries any
|
|
1752
|
+
* for this device. Prompt the user to install the wallet with these.
|
|
1753
|
+
*/
|
|
1754
|
+
installationUrls;
|
|
1755
|
+
constructor({ chain, installationUrls, walletKey }) {
|
|
1756
|
+
super({
|
|
1757
|
+
cause: null,
|
|
1758
|
+
code: "no_connection_option_available",
|
|
1759
|
+
docsUrl: null,
|
|
1760
|
+
metaMessages: [
|
|
1761
|
+
`Wallet key: ${walletKey}`,
|
|
1762
|
+
...chain ? [`Chain: ${chain}`] : [],
|
|
1763
|
+
"The wallet is not installed and no URI pairing is available for it on this client.",
|
|
1764
|
+
"URI pairing requires the chain extension that provides it — addWalletConnect<Chain>Extension for WalletConnect, addMetaMask<Chain>Extension for MetaMask.",
|
|
1765
|
+
"Use this error's installationUrls to prompt the user to install the wallet."
|
|
1766
|
+
],
|
|
1767
|
+
name: "NoConnectionOptionAvailableError",
|
|
1768
|
+
shortMessage: `No connection option available for wallet: ${walletKey}`
|
|
1769
|
+
});
|
|
1770
|
+
this.installationUrls = installationUrls;
|
|
1771
|
+
}
|
|
1772
|
+
};
|
|
1773
|
+
|
|
1686
1774
|
//#endregion
|
|
1687
1775
|
//#region src/errors/NoPasskeyCredentialsFoundError.ts
|
|
1688
1776
|
var NoPasskeyCredentialsFoundError = class extends BaseError {
|
|
@@ -1877,6 +1965,46 @@ var WalletAccountNotSelectedError = class extends BaseError {
|
|
|
1877
1965
|
}
|
|
1878
1966
|
};
|
|
1879
1967
|
|
|
1968
|
+
//#endregion
|
|
1969
|
+
//#region src/errors/WalletOptionNotFoundError.ts
|
|
1970
|
+
/**
|
|
1971
|
+
* Thrown when `connectWallet` is given a wallet key that no wallet option in
|
|
1972
|
+
* the catalogue matches.
|
|
1973
|
+
*
|
|
1974
|
+
* A wallet is only surfaced for the chains this client has an extension for, so
|
|
1975
|
+
* this also covers keys that are valid in the wallet book but not reachable
|
|
1976
|
+
* with the client's current chain extensions.
|
|
1977
|
+
*
|
|
1978
|
+
* @example
|
|
1979
|
+
* ```ts
|
|
1980
|
+
* try {
|
|
1981
|
+
* await connectWallet({ walletKey: 'metmask' });
|
|
1982
|
+
* } catch (error) {
|
|
1983
|
+
* if (error instanceof WalletOptionNotFoundError) {
|
|
1984
|
+
* showUnknownWalletMessage();
|
|
1985
|
+
* }
|
|
1986
|
+
* }
|
|
1987
|
+
* ```
|
|
1988
|
+
* @see connectWallet
|
|
1989
|
+
* @see getWalletOptionsCatalogue
|
|
1990
|
+
*/
|
|
1991
|
+
var WalletOptionNotFoundError = class extends BaseError {
|
|
1992
|
+
constructor({ walletKey }) {
|
|
1993
|
+
super({
|
|
1994
|
+
cause: null,
|
|
1995
|
+
code: "wallet_option_not_found",
|
|
1996
|
+
docsUrl: null,
|
|
1997
|
+
metaMessages: [
|
|
1998
|
+
`Wallet key: ${walletKey}`,
|
|
1999
|
+
"The key must match a wallet option surfaced by getWalletOptionsCatalogue (e.g. \"metamask\", \"phantom\").",
|
|
2000
|
+
"A wallet is only surfaced on chains this client has an extension for, so make sure the relevant chain extension is added."
|
|
2001
|
+
],
|
|
2002
|
+
name: "WalletOptionNotFoundError",
|
|
2003
|
+
shortMessage: `No wallet option found for key: ${walletKey}`
|
|
2004
|
+
});
|
|
2005
|
+
}
|
|
2006
|
+
};
|
|
2007
|
+
|
|
1880
2008
|
//#endregion
|
|
1881
2009
|
//#region src/errors/WalletProviderMethodUnavailableError.ts
|
|
1882
2010
|
var WalletProviderMethodUnavailableError = class extends BaseError {
|
|
@@ -2427,7 +2555,7 @@ const __authenticateWithSocial_wrapped = instrumentFunction({
|
|
|
2427
2555
|
* @throws MethodNotImplementedError Always on React Native.
|
|
2428
2556
|
* @notInstrumented
|
|
2429
2557
|
*/
|
|
2430
|
-
const clearSocialRedirectParams = () => {
|
|
2558
|
+
const clearSocialRedirectParams = ({ expectedState } = {}) => {
|
|
2431
2559
|
throw new MethodNotImplementedError("clearSocialRedirectParams (not needed on React Native — signInWithSocialPopUp processes the callback inline)");
|
|
2432
2560
|
};
|
|
2433
2561
|
|
|
@@ -7268,20 +7396,37 @@ const hasAllGoogleDriveBackupScopes = (grantedScopes) => findMissingGoogleDriveB
|
|
|
7268
7396
|
const isInsufficientGoogleDriveScopesError = (err) => err instanceof Error && err.message.includes(ACCESS_DENIED_PHRASE);
|
|
7269
7397
|
|
|
7270
7398
|
//#endregion
|
|
7271
|
-
//#region src/utils/
|
|
7399
|
+
//#region src/utils/isAndroid/isAndroid.ts
|
|
7272
7400
|
/**
|
|
7273
|
-
*
|
|
7401
|
+
* Tells whether the SDK is running on Android.
|
|
7402
|
+
*
|
|
7403
|
+
* The operating system comes from {@link getOperatingSystem}, which reads
|
|
7404
|
+
* `Platform.OS` in React Native and the user agent on web.
|
|
7405
|
+
*
|
|
7406
|
+
* @example
|
|
7407
|
+
* ```ts
|
|
7408
|
+
* if (isAndroid()) {
|
|
7409
|
+
* return installationUrls.android;
|
|
7410
|
+
* }
|
|
7411
|
+
* ```
|
|
7412
|
+
*
|
|
7413
|
+
* @returns `true` when the current device runs Android.
|
|
7414
|
+
* @see getOperatingSystem
|
|
7415
|
+
* @see isIOS
|
|
7274
7416
|
* @notInstrumented
|
|
7275
7417
|
*/
|
|
7276
|
-
const
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7418
|
+
const isAndroid = () => getOperatingSystem() === "android";
|
|
7419
|
+
|
|
7420
|
+
//#endregion
|
|
7421
|
+
//#region src/utils/userAgentChecks/userAgentChecks.ts
|
|
7422
|
+
/**
|
|
7423
|
+
* Matches the device names Apple's handhelds report, plus the standalone `ios`
|
|
7424
|
+
* token that embedded web views and custom in-app browsers use in place of a
|
|
7425
|
+
* device name. The token must stand alone so that unrelated words containing
|
|
7426
|
+
* `ios` (`kiosk`, for instance) don't match.
|
|
7427
|
+
* @notInstrumented
|
|
7428
|
+
*/
|
|
7429
|
+
const isIOSUserAgent = () => typeof window === "undefined" || typeof navigator === "undefined" ? false : /iPhone|iPod|(?:^|[^a-z])ios(?:[^a-z]|$)/i.test(navigator.userAgent);
|
|
7285
7430
|
/**
|
|
7286
7431
|
* @param [optional] maxTouchPointsOverride - this is used for testing since
|
|
7287
7432
|
* it seems that JSDOM doesn't support maxTouchPoints, so it was impossible
|
|
@@ -7294,13 +7439,6 @@ const isIPad = (maxTouchPointsOverride) => {
|
|
|
7294
7439
|
return /iPad/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && maxTouchPoints === 5;
|
|
7295
7440
|
};
|
|
7296
7441
|
/** @notInstrumented */
|
|
7297
|
-
const isIOS = (maxTouchPointsOverride) => {
|
|
7298
|
-
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
7299
|
-
return isIPhone() || isIPad(maxTouchPointsOverride);
|
|
7300
|
-
};
|
|
7301
|
-
/** @notInstrumented */
|
|
7302
|
-
const isAndroid = () => isMobile() && !isIOS();
|
|
7303
|
-
/** @notInstrumented */
|
|
7304
7442
|
const isSafariBrowser = () => {
|
|
7305
7443
|
if (typeof window === "undefined" || typeof navigator === "undefined") return false;
|
|
7306
7444
|
const { userAgent } = navigator;
|
|
@@ -7327,6 +7465,31 @@ const isChromeBrowser = () => {
|
|
|
7327
7465
|
return /\bChrome\//.test(navigator.userAgent) && !isEdgeBrowser() && !isOperaBrowser();
|
|
7328
7466
|
};
|
|
7329
7467
|
|
|
7468
|
+
//#endregion
|
|
7469
|
+
//#region src/utils/isIOS/isIOS.ts
|
|
7470
|
+
/**
|
|
7471
|
+
* Tells whether the SDK is running on iOS or iPadOS.
|
|
7472
|
+
*
|
|
7473
|
+
* The operating system comes from {@link getOperatingSystem}, which reads
|
|
7474
|
+
* `Platform.OS` in React Native and the user agent on web. Two user agents
|
|
7475
|
+
* escape it: an iPad in desktop mode announces itself as macOS, and embedded
|
|
7476
|
+
* web views may carry a lowercase `ios` token instead of a device name.
|
|
7477
|
+
*
|
|
7478
|
+
* @example
|
|
7479
|
+
* ```ts
|
|
7480
|
+
* if (isIOS()) {
|
|
7481
|
+
* return installationUrls.ios;
|
|
7482
|
+
* }
|
|
7483
|
+
* ```
|
|
7484
|
+
*
|
|
7485
|
+
* @returns `true` when the current device runs iOS or iPadOS.
|
|
7486
|
+
* @see getOperatingSystem
|
|
7487
|
+
* @see isIPad
|
|
7488
|
+
* @see isIOSUserAgent
|
|
7489
|
+
* @notInstrumented
|
|
7490
|
+
*/
|
|
7491
|
+
const isIOS = () => getOperatingSystem() === "ios" || isIOSUserAgent() || isIPad();
|
|
7492
|
+
|
|
7330
7493
|
//#endregion
|
|
7331
7494
|
//#region src/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.ts
|
|
7332
7495
|
/**
|
|
@@ -8473,6 +8636,30 @@ const __confirmTransaction_wrapped = instrumentFunction({
|
|
|
8473
8636
|
}
|
|
8474
8637
|
});
|
|
8475
8638
|
|
|
8639
|
+
//#endregion
|
|
8640
|
+
//#region src/utils/isMobile/isMobile.native.ts
|
|
8641
|
+
/**
|
|
8642
|
+
* React Native variant — always returns `true`.
|
|
8643
|
+
*
|
|
8644
|
+
* Metro resolves `.native.ts` over the plain `.ts` counterpart, so this file
|
|
8645
|
+
* is used exclusively in RN builds. The web implementation sniffs
|
|
8646
|
+
* `navigator.userAgent`, which React Native does not have, so it would report
|
|
8647
|
+
* every phone as a desktop.
|
|
8648
|
+
*
|
|
8649
|
+
* @example
|
|
8650
|
+
* ```ts
|
|
8651
|
+
* if (isMobile()) {
|
|
8652
|
+
* // hand the pairing to the wallet app instead of rendering a QR code
|
|
8653
|
+
* }
|
|
8654
|
+
* ```
|
|
8655
|
+
*
|
|
8656
|
+
* @returns Always `true`.
|
|
8657
|
+
* @see getPlatform
|
|
8658
|
+
* @see getOperatingSystem
|
|
8659
|
+
* @notInstrumented
|
|
8660
|
+
*/
|
|
8661
|
+
const isMobile = () => true;
|
|
8662
|
+
|
|
8476
8663
|
//#endregion
|
|
8477
8664
|
//#region src/modules/wallets/utils/getAddressesWithTypesFromConnectionResult/getAddressesWithTypesFromConnectionResult.ts
|
|
8478
8665
|
/** @notInstrumented */
|
|
@@ -9469,6 +9656,109 @@ const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
|
9469
9656
|
}
|
|
9470
9657
|
});
|
|
9471
9658
|
|
|
9659
|
+
//#endregion
|
|
9660
|
+
//#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
|
|
9661
|
+
/**
|
|
9662
|
+
* Placeholder the wallet book leaves in in-app-browser URLs for the app URL
|
|
9663
|
+
* the wallet should open.
|
|
9664
|
+
*/
|
|
9665
|
+
const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
|
|
9666
|
+
/**
|
|
9667
|
+
* Fills a wallet's in-app-browser URL template with the app URL to open.
|
|
9668
|
+
*
|
|
9669
|
+
* Wallet book entries carry the entry point as a template (e.g.
|
|
9670
|
+
* `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
|
|
9671
|
+
* usable once every occurrence of the placeholder is substituted in,
|
|
9672
|
+
* percent-encoded. Templates without the placeholder are returned untouched —
|
|
9673
|
+
* some wallets open a fixed landing page.
|
|
9674
|
+
*
|
|
9675
|
+
* @example
|
|
9676
|
+
* ```ts
|
|
9677
|
+
* buildInAppBrowserUrl({
|
|
9678
|
+
* appUrl: 'https://myapp.xyz/login',
|
|
9679
|
+
* inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
|
|
9680
|
+
* });
|
|
9681
|
+
* // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
|
|
9682
|
+
* ```
|
|
9683
|
+
*
|
|
9684
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9685
|
+
* @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
|
|
9686
|
+
* @returns The in-app-browser URL to open.
|
|
9687
|
+
* @see redirectToInAppBrowser
|
|
9688
|
+
* @see getWalletOptionsCatalogue
|
|
9689
|
+
* @notInstrumented
|
|
9690
|
+
*/
|
|
9691
|
+
const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
|
|
9692
|
+
|
|
9693
|
+
//#endregion
|
|
9694
|
+
//#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
|
|
9695
|
+
/**
|
|
9696
|
+
* Leaves your app for a wallet's in-app browser, which reloads `appUrl`
|
|
9697
|
+
* inside it.
|
|
9698
|
+
*
|
|
9699
|
+
* Call this from `handleWalletBrowserRedirect` with the URL of the page the
|
|
9700
|
+
* wallet should reload. The wallet's in-app-browser entry point is read from
|
|
9701
|
+
* the wallet options catalogue, so you only need the wallet's key. The wallet
|
|
9702
|
+
* is only injected on that reload, so the connection is made on the next page
|
|
9703
|
+
* load rather than in the current one.
|
|
9704
|
+
*
|
|
9705
|
+
* @example
|
|
9706
|
+
* ```ts
|
|
9707
|
+
* await connectWallet({
|
|
9708
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
9709
|
+
* redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
|
|
9710
|
+
* walletKey: 'coinbase',
|
|
9711
|
+
* });
|
|
9712
|
+
* ```
|
|
9713
|
+
*
|
|
9714
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9715
|
+
* @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
|
|
9716
|
+
* @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.
|
|
9717
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9718
|
+
* @returns A promise that resolves once the redirect is triggered.
|
|
9719
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9720
|
+
* @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
|
|
9721
|
+
* @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
|
|
9722
|
+
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
9723
|
+
* @see connectWallet
|
|
9724
|
+
* @see WalletBrowserRedirectHandlerParams
|
|
9725
|
+
* @instrumented
|
|
9726
|
+
*/
|
|
9727
|
+
const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
|
|
9728
|
+
const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
|
|
9729
|
+
if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
|
|
9730
|
+
const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
|
|
9731
|
+
if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
|
|
9732
|
+
chain,
|
|
9733
|
+
installationUrls: walletOption.installationUrls,
|
|
9734
|
+
walletKey
|
|
9735
|
+
});
|
|
9736
|
+
const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
|
|
9737
|
+
if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
|
|
9738
|
+
chains: availableChains,
|
|
9739
|
+
walletKey
|
|
9740
|
+
});
|
|
9741
|
+
const [inAppBrowserOption] = inAppBrowserOptions;
|
|
9742
|
+
const urlToOpen = buildInAppBrowserUrl({
|
|
9743
|
+
appUrl,
|
|
9744
|
+
inAppBrowserUrl: inAppBrowserOption.url
|
|
9745
|
+
});
|
|
9746
|
+
assertSafeDeeplinkUrl(urlToOpen);
|
|
9747
|
+
await getCore(client).openDeeplink(urlToOpen);
|
|
9748
|
+
};
|
|
9749
|
+
const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
|
|
9750
|
+
const __redirectToInAppBrowser_wrapped = instrumentFunction({
|
|
9751
|
+
fn: __redirectToInAppBrowser_impl,
|
|
9752
|
+
functionName: "redirectToInAppBrowser",
|
|
9753
|
+
getCore: () => {
|
|
9754
|
+
try {
|
|
9755
|
+
return getCore(getDefaultClient());
|
|
9756
|
+
} catch {
|
|
9757
|
+
return;
|
|
9758
|
+
}
|
|
9759
|
+
}
|
|
9760
|
+
});
|
|
9761
|
+
|
|
9472
9762
|
//#endregion
|
|
9473
9763
|
//#region src/modules/wallets/disconnectWalletAccount/disconnectWalletAccount.ts
|
|
9474
9764
|
/**
|
|
@@ -10100,6 +10390,40 @@ const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
|
10100
10390
|
return url.href;
|
|
10101
10391
|
};
|
|
10102
10392
|
|
|
10393
|
+
//#endregion
|
|
10394
|
+
//#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
|
|
10395
|
+
/**
|
|
10396
|
+
* Picks the most appropriate deep link variant for the current platform.
|
|
10397
|
+
*
|
|
10398
|
+
* Mobile (Android, iOS, tablets) prefers `native` because the OS treats
|
|
10399
|
+
* custom URL schemes as first-class app links and gives the wallet a faster
|
|
10400
|
+
* round-trip back to the dApp. Desktop prefers `universal` because browsers
|
|
10401
|
+
* cannot resolve mobile-only custom schemes and need an `https://` link
|
|
10402
|
+
* that opens the wallet's web flow.
|
|
10403
|
+
*
|
|
10404
|
+
* In either case, the alternative is used as a fallback when the preferred
|
|
10405
|
+
* variant is missing. Returns `undefined` only when both variants are
|
|
10406
|
+
* absent.
|
|
10407
|
+
*
|
|
10408
|
+
* @example
|
|
10409
|
+
* ```ts
|
|
10410
|
+
* const deepLink = getPreferredWalletDeepLink({
|
|
10411
|
+
* deeplinks: wallet.deeplinks,
|
|
10412
|
+
* });
|
|
10413
|
+
* ```
|
|
10414
|
+
*
|
|
10415
|
+
* @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
|
|
10416
|
+
* @returns The preferred deep link URL, or `undefined` if neither variant is available.
|
|
10417
|
+
* @see appendConnectionUriToDeeplink
|
|
10418
|
+
* @see getConnectionUriDeeplink
|
|
10419
|
+
* @notInstrumented
|
|
10420
|
+
*/
|
|
10421
|
+
const getPreferredWalletDeepLink = ({ deeplinks }) => {
|
|
10422
|
+
const { native, universal } = deeplinks;
|
|
10423
|
+
if (isMobile()) return native ?? universal;
|
|
10424
|
+
return universal ?? native;
|
|
10425
|
+
};
|
|
10426
|
+
|
|
10103
10427
|
//#endregion
|
|
10104
10428
|
//#region src/utils/parseUserAgent/parseUserAgent.ts
|
|
10105
10429
|
const browserMatchers = [
|
|
@@ -10181,5 +10505,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
10181
10505
|
assertPackageVersion(name, version);
|
|
10182
10506
|
|
|
10183
10507
|
//#endregion
|
|
10184
|
-
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 };
|
|
10508
|
+
export { AmbiguousWalletChainError, 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, 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, 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, __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 };
|
|
10185
10509
|
//# sourceMappingURL=index.native.esm.js.map
|