@dynamic-labs-sdk/client 1.31.2 → 1.33.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-d2qJyIvx.native.esm.js → apiClient-4r7VAsLC.native.esm.js} +45 -12
- package/dist/apiClient-4r7VAsLC.native.esm.js.map +1 -0
- package/dist/constants.d.ts +6 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/core.cjs +79 -76
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +79 -78
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +77 -76
- package/dist/core.native.esm.js.map +1 -1
- package/dist/errors/AmbiguousWalletChainError.d.ts +7 -9
- package/dist/errors/AmbiguousWalletChainError.d.ts.map +1 -1
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts +10 -12
- package/dist/errors/ConnectionUriHandlerMissingError.d.ts.map +1 -1
- package/dist/errors/NoConnectionOptionAvailableError.d.ts +2 -2
- package/dist/errors/UnexpectedConsentResponseError.d.ts +7 -0
- package/dist/errors/UnexpectedConsentResponseError.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 +3 -3
- package/dist/exports/core.d.ts +2 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +7 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +2 -1
- package/dist/exports/waas.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js → getNetworkProviderFromNetworkId-BV229QF3.native.esm.js} +107 -14
- package/dist/getNetworkProviderFromNetworkId-BV229QF3.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-D9nx6Od5.esm.js → getNetworkProviderFromNetworkId-D9oRzWA6.esm.js} +111 -18
- package/dist/getNetworkProviderFromNetworkId-D9oRzWA6.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-DueBnAl6.cjs → getNetworkProviderFromNetworkId-DOrcvuFv.cjs} +111 -12
- package/dist/getNetworkProviderFromNetworkId-DOrcvuFv.cjs.map +1 -0
- package/dist/{getSignedSessionId-B5oxmSTs.cjs → getSignedSessionId-4qHh_BOh.cjs} +3 -3
- package/dist/{getSignedSessionId-B5oxmSTs.cjs.map → getSignedSessionId-4qHh_BOh.cjs.map} +1 -1
- package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js → getSignedSessionId-Cd8CCp5d.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-5q4uyZsv.native.esm.js.map → getSignedSessionId-Cd8CCp5d.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BKfQycNo.esm.js → getSignedSessionId-DA-MMsJm.esm.js} +3 -3
- package/dist/{getSignedSessionId-BKfQycNo.esm.js.map → getSignedSessionId-DA-MMsJm.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-Bx0HlvfW.cjs.map → getVerifiedCredentialForWalletAccount-Bw5q7QZn.cjs.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js → getVerifiedCredentialForWalletAccount-Fr3bEKeU.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-_3MExyld.esm.js.map → getVerifiedCredentialForWalletAccount-Fr3bEKeU.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 +930 -815
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +925 -814
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +923 -812
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js → isMfaRequiredForAction-BdU62usM.esm.js} +3 -9
- package/dist/{isMfaRequiredForAction-BDmY2_Sj.esm.js.map → isMfaRequiredForAction-BdU62usM.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js → isMfaRequiredForAction-DZfEkyIU.native.esm.js} +3 -9
- package/dist/{isMfaRequiredForAction-BrRCSvEX.native.esm.js.map → isMfaRequiredForAction-DZfEkyIU.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs → isMfaRequiredForAction-Djd-jkSl.cjs} +3 -9
- package/dist/{isMfaRequiredForAction-DnKzPDZk.cjs.map → isMfaRequiredForAction-Djd-jkSl.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js → isUserOnboardingComplete-BEZOYohA.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-D1-QluDm.esm.js.map → isUserOnboardingComplete-BEZOYohA.esm.js.map} +1 -1
- package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs → isUserOnboardingComplete-Bwvv6Urs.cjs} +3 -3
- package/dist/{isUserOnboardingComplete-7GzNYU2g.cjs.map → isUserOnboardingComplete-Bwvv6Urs.cjs.map} +1 -1
- package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js → isUserOnboardingComplete-CEUkAzCi.native.esm.js} +3 -3
- package/dist/{isUserOnboardingComplete-BfMMBtkF.native.esm.js.map → isUserOnboardingComplete-CEUkAzCi.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-C_T7KddM.cjs → logoutWithReason-B-ZF0VmN.cjs} +57 -18
- package/dist/logoutWithReason-B-ZF0VmN.cjs.map +1 -0
- package/dist/{logoutWithReason-3UICYir7.native.esm.js → logoutWithReason-DvnEa2Uv.native.esm.js} +3 -9
- package/dist/{logoutWithReason-3UICYir7.native.esm.js.map → logoutWithReason-DvnEa2Uv.native.esm.js.map} +1 -1
- package/dist/{logoutWithReason-CHyuBHdx.esm.js → logoutWithReason-I6vShLpA.esm.js} +46 -19
- package/dist/logoutWithReason-I6vShLpA.esm.js.map +1 -0
- package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js → migrateFromFireblocks-6I7lkraQ.native.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-DJt9bktR.native.esm.js.map → migrateFromFireblocks-6I7lkraQ.native.esm.js.map} +1 -1
- package/dist/{migrateFromFireblocks-C9Kuke5V.cjs → migrateFromFireblocks-C23-24bK.cjs} +2 -2
- package/dist/{migrateFromFireblocks-C9Kuke5V.cjs.map → migrateFromFireblocks-C23-24bK.cjs.map} +1 -1
- package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js → migrateFromFireblocks-Dtk6t8hN.esm.js} +2 -2
- package/dist/{migrateFromFireblocks-BMO3u6rO.esm.js.map → migrateFromFireblocks-Dtk6t8hN.esm.js.map} +1 -1
- package/dist/modules/funding/coinbase/getCoinbaseAccounts/getCoinbaseAccounts.d.ts +1 -1
- package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
- package/dist/modules/funding/kraken/getKrakenAccounts/getKrakenAccounts.d.ts +1 -1
- package/dist/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.d.ts +1 -1
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts +95 -0
- package/dist/modules/sessionKeys/signBusinessAccountIntent/signBusinessAccountIntent.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +3 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts +15 -6
- package/dist/modules/waas/businessAccounts/addBusinessAccountSigner/addBusinessAccountSigner.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +7 -3
- package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts +115 -2
- package/dist/modules/waas/businessAccounts/businessAccounts.types.d.ts.map +1 -1
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts +2 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/index.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts +27 -0
- package/dist/modules/waas/businessAccounts/isBusinessAccountActionRequired/isBusinessAccountActionRequired.d.ts.map +1 -0
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts +13 -6
- package/dist/modules/waas/businessAccounts/updateBusinessAccountMemberRole/updateBusinessAccountMemberRole.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
- package/dist/modules/waas/waas.types.d.ts +5 -2
- package/dist/modules/waas/waas.types.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts +42 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +7 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +4 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts +3 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts +35 -0
- package/dist/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +7 -0
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts +6 -5
- package/dist/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.d.ts.map +1 -1
- package/dist/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.d.ts +3 -3
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts +2 -2
- package/dist/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.d.ts.map +1 -1
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts +27 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.d.ts.map +1 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts +2 -0
- package/dist/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/index.d.ts.map +1 -0
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts.map +1 -1
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts +62 -0
- package/dist/modules/wallets/walletConnectionHandlers.types.d.ts.map +1 -0
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts +6 -5
- package/dist/services/instrumentation/instrumentFunction/instrumentFunction.d.ts.map +1 -1
- package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts +2 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/index.d.ts.map +1 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts +19 -0
- package/dist/services/instrumentation/resolveInstrumentationCore/resolveInstrumentationCore.d.ts.map +1 -0
- package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts +4 -3
- package/dist/services/instrumentation/transports/createDynamicTransport/createDynamicTransport.d.ts.map +1 -1
- package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- 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/isScreeningBlockedError/index.d.ts +2 -0
- package/dist/utils/isScreeningBlockedError/index.d.ts.map +1 -0
- package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts +24 -0
- package/dist/utils/isScreeningBlockedError/isScreeningBlockedError.d.ts.map +1 -0
- package/dist/{waas-Bxsd0-HG.cjs → waas-C0IDCf3u.cjs} +81 -18
- package/dist/waas-C0IDCf3u.cjs.map +1 -0
- package/dist/{waas-9QajYGeK.native.esm.js → waas-DJeW02-Y.native.esm.js} +77 -20
- package/dist/waas-DJeW02-Y.native.esm.js.map +1 -0
- package/dist/{waas-T_dHXyI9.esm.js → waas-D_alZrtb.esm.js} +77 -20
- package/dist/waas-D_alZrtb.esm.js.map +1 -0
- package/dist/waas.cjs +5 -4
- package/dist/waas.esm.js +5 -5
- package/dist/waas.native.esm.js +5 -5
- package/dist/waasCore.cjs +8 -6
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +8 -6
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +8 -6
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +5 -4
- package/dist/apiClient-d2qJyIvx.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-D9nx6Od5.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DF9kPibD.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-DueBnAl6.cjs.map +0 -1
- package/dist/logoutWithReason-CHyuBHdx.esm.js.map +0 -1
- package/dist/logoutWithReason-C_T7KddM.cjs.map +0 -1
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts +0 -18
- package/dist/modules/walletOptionsCatalogue/hasInstalledProvider/hasInstalledProvider.d.ts.map +0 -1
- package/dist/modules/wallets/connectWallet.types.d.ts +0 -35
- package/dist/modules/wallets/connectWallet.types.d.ts.map +0 -1
- package/dist/waas-9QajYGeK.native.esm.js.map +0 -1
- package/dist/waas-Bxsd0-HG.cjs.map +0 -1
- package/dist/waas-T_dHXyI9.esm.js.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-
|
|
3
|
-
import {
|
|
4
|
-
import { A as
|
|
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 createLocalStorageAdapter, A as offEvent, B as normalizeAddress, Ct as getCore, D as WalletProviderPriority, Dt as name, E as getWalletProviders, Et as TokenScope, L as getChainFromVerifiedCredentialChain, M as onceEvent, O as getWalletProviderRegistry, Ot as version, P as getWalletAccounts, Q as createStorageKeySchema, R as CHAINS_INFO_MAP, U as isUserMissingMfaAuth, V as splitWalletProviderKey, X as fetchAndStoreNonces, Y as getNonce, Z as updateNoncePoolStorage, _ as checkAndRaiseWalletAccountsChangedEvent, _t as getElevatedAccessToken, a as resolveInstrumentationCore, at as LinkCredentialError, bt as getDefaultClient, c as DEFAULT_PII_FIELDS, d as extractSessionId, et as NONCE_POOL_SIZE, f as updateAuthFromVerifyResponse, ft as SDK_API_CORE_VERSION, g as InvalidParamError, gt as ValueMustBeDefinedError, h as decodeJwt, ht as assertDefined, i as __refreshAuth_wrapped, it as MfaInvalidOtpError, j as onEvent, k as emitEvent, l as getUserAgent, m as parseElevatedAccessToken, mt as isCookieEnabled, n as NoWalletProviderFoundError, nt as SandboxMaximumThresholdReachedError, o as instrumentFunction, ot as InvalidExternalAuthError, p as upsertElevatedAccessToken, r as createApiClient, rt as MfaRateLimitedError, s as scrubParameters, st as APIError, t as getWalletProviderFromWalletAccount, tt as UnauthorizedError, u as getOperatingSystem, ut as DYNAMIC_ICONIC_SPRITE_URL, vt as randomString, wt as BaseError, xt as setDefaultClient, y as initializeWaasClientsForEagerRecovery, yt as getPlatform, z as formatWalletAccountId } from "./apiClient-4r7VAsLC.native.esm.js";
|
|
2
|
+
import { a as TransactionBroadcastError, i as NotWaasWalletAccountError } from "./migrateFromFireblocks-6I7lkraQ.native.esm.js";
|
|
3
|
+
import { $ as WaasChainEnum } from "./waas-DJeW02-Y.native.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 isEqualShallow, H as isServerSideRendering, I as createAppForegroundSubscriber, K as createStorage, 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 getBuffer, V as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, W as subscribeWithSelector, _ as isCaptchaRequired, a as removeUnverifiedWalletAccount, b as WalletScreeningBlockedError, c as reconcileWalletAccountsAgainstClient, d as createVisit, f as getUriConnectionStarterRegistry, g as consumeCaptchaToken, h as __setCaptchaToken_wrapped, i as verifyMessageSignatureOwnership, j as createEventEmitter, l as updateWalletProviderKeysForVerifiedCredentials, m as hasExtension, o as createSignInMessageStatement, p as getNetworkProviderBuilderRegistry, r as getNetworksData, s as formatSignInMessage, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as getAppMetadata, w as getKeychainIndexedDBName, x as WalletAlreadyLinkedToAnotherUserError, y as MethodNotImplementedError, z as INITIALIZE_STORAGE_SYNC_TRACKER_KEY } from "./getNetworkProviderFromNetworkId-BV229QF3.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-DvnEa2Uv.native.esm.js";
|
|
6
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DZfEkyIU.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-CEUkAzCi.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";
|
|
@@ -412,13 +412,7 @@ const __refreshUser_impl = refreshUser;
|
|
|
412
412
|
const __refreshUser_wrapped = instrumentFunction({
|
|
413
413
|
fn: __refreshUser_impl,
|
|
414
414
|
functionName: "refreshUser",
|
|
415
|
-
getCore:
|
|
416
|
-
try {
|
|
417
|
-
return getCore(getDefaultClient());
|
|
418
|
-
} catch {
|
|
419
|
-
return;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
415
|
+
getCore: resolveInstrumentationCore
|
|
422
416
|
});
|
|
423
417
|
|
|
424
418
|
//#endregion
|
|
@@ -609,13 +603,7 @@ const __initializeClient_impl = initializeClient;
|
|
|
609
603
|
const __initializeClient_wrapped = instrumentFunction({
|
|
610
604
|
fn: __initializeClient_impl,
|
|
611
605
|
functionName: "initializeClient",
|
|
612
|
-
getCore:
|
|
613
|
-
try {
|
|
614
|
-
return getCore(getDefaultClient());
|
|
615
|
-
} catch {
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
606
|
+
getCore: resolveInstrumentationCore
|
|
619
607
|
});
|
|
620
608
|
|
|
621
609
|
//#endregion
|
|
@@ -792,8 +780,9 @@ const LOGS_BASE_URL = "https://logs.dynamicauth.com/api/v1";
|
|
|
792
780
|
* synchronous tick are coalesced into one request, avoiding a round-trip per
|
|
793
781
|
* event.
|
|
794
782
|
*
|
|
795
|
-
* Fetch errors are swallowed to prevent an instrumentation
|
|
796
|
-
* triggering another instrumentation event and causing an
|
|
783
|
+
* Fetch and serialization errors are swallowed to prevent an instrumentation
|
|
784
|
+
* failure from triggering another instrumentation event and causing an
|
|
785
|
+
* infinite loop.
|
|
797
786
|
*
|
|
798
787
|
* Works in both browser and SSR environments — fetch is injected and
|
|
799
788
|
* queueMicrotask is available in Node.js >= 11.
|
|
@@ -807,11 +796,13 @@ const createDynamicTransport = (params) => {
|
|
|
807
796
|
const events = queue.splice(0);
|
|
808
797
|
if (events.length === 0) return;
|
|
809
798
|
const url = `${LOGS_BASE_URL}/${params.environmentId}`;
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
799
|
+
try {
|
|
800
|
+
params.fetch(url, {
|
|
801
|
+
body: JSON.stringify(events),
|
|
802
|
+
headers: { "Content-Type": "application/json" },
|
|
803
|
+
method: "POST"
|
|
804
|
+
}).catch(() => {});
|
|
805
|
+
} catch {}
|
|
815
806
|
};
|
|
816
807
|
return { log: (event) => {
|
|
817
808
|
queue.push(event);
|
|
@@ -1275,20 +1266,14 @@ const __createDynamicClient_impl = createDynamicClient;
|
|
|
1275
1266
|
const __createDynamicClient_wrapped = instrumentFunction({
|
|
1276
1267
|
fn: __createDynamicClient_impl,
|
|
1277
1268
|
functionName: "createDynamicClient",
|
|
1278
|
-
getCore:
|
|
1279
|
-
try {
|
|
1280
|
-
return getCore(getDefaultClient());
|
|
1281
|
-
} catch {
|
|
1282
|
-
return;
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1269
|
+
getCore: resolveInstrumentationCore
|
|
1285
1270
|
});
|
|
1286
1271
|
|
|
1287
1272
|
//#endregion
|
|
1288
1273
|
//#region src/errors/AmbiguousWalletChainError.ts
|
|
1289
1274
|
/**
|
|
1290
1275
|
* Thrown when a wallet can be connected on more than one of the client's
|
|
1291
|
-
* enabled chains and no chain was passed to `
|
|
1276
|
+
* enabled chains and no chain was passed to `connectWalletOption`.
|
|
1292
1277
|
*
|
|
1293
1278
|
* Multi-chain wallets such as MetaMask or Phantom connect to a different
|
|
1294
1279
|
* account per chain, so the chain has to be an explicit choice rather than one
|
|
@@ -1296,15 +1281,13 @@ const __createDynamicClient_wrapped = instrumentFunction({
|
|
|
1296
1281
|
*
|
|
1297
1282
|
* @example
|
|
1298
1283
|
* ```ts
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1303
|
-
*
|
|
1304
|
-
* }
|
|
1305
|
-
* }
|
|
1284
|
+
* // Throws, since Phantom connects on both SOL and EVM
|
|
1285
|
+
* await connectWalletOption({ walletKey: 'phantom' });
|
|
1286
|
+
*
|
|
1287
|
+
* // Connects the wallet's Solana account
|
|
1288
|
+
* await connectWalletOption({ chain: 'SOL', walletKey: 'phantom' });
|
|
1306
1289
|
* ```
|
|
1307
|
-
* @see
|
|
1290
|
+
* @see connectWalletOption
|
|
1308
1291
|
* @see getWalletOptionsCatalogue
|
|
1309
1292
|
*/
|
|
1310
1293
|
var AmbiguousWalletChainError = class extends BaseError {
|
|
@@ -1482,6 +1465,48 @@ var CoinbaseTravelRuleRequiredError = class extends BaseError {
|
|
|
1482
1465
|
}
|
|
1483
1466
|
};
|
|
1484
1467
|
|
|
1468
|
+
//#endregion
|
|
1469
|
+
//#region src/errors/ConnectionUriHandlerMissingError.ts
|
|
1470
|
+
/**
|
|
1471
|
+
* Thrown when the only connection path for a wallet is a URI pairing and no
|
|
1472
|
+
* `onConnectionUri` handler was passed to `connectWalletOption`.
|
|
1473
|
+
*
|
|
1474
|
+
* The pairing URI has to reach the user — as a QR code on desktop, or by opening
|
|
1475
|
+
* the wallet's deeplink on mobile — for the wallet to be able to
|
|
1476
|
+
* approve the connection.
|
|
1477
|
+
*
|
|
1478
|
+
* @example
|
|
1479
|
+
* ```ts
|
|
1480
|
+
* // Throws, since the wallet can only be reached through a URI pairing
|
|
1481
|
+
* await connectWalletOption({ walletKey: 'trust' });
|
|
1482
|
+
*
|
|
1483
|
+
* // Connects, once the user approves the pairing
|
|
1484
|
+
* await connectWalletOption({
|
|
1485
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
1486
|
+
* walletKey: 'trust',
|
|
1487
|
+
* });
|
|
1488
|
+
* ```
|
|
1489
|
+
* @see connectWalletOption
|
|
1490
|
+
* @see ConnectionUriHandlerParams
|
|
1491
|
+
*/
|
|
1492
|
+
var ConnectionUriHandlerMissingError = class extends BaseError {
|
|
1493
|
+
constructor({ chain, type, walletKey }) {
|
|
1494
|
+
super({
|
|
1495
|
+
cause: null,
|
|
1496
|
+
code: "connection_uri_handler_missing",
|
|
1497
|
+
docsUrl: null,
|
|
1498
|
+
metaMessages: [
|
|
1499
|
+
`Wallet key: ${walletKey}`,
|
|
1500
|
+
`Chain: ${chain}`,
|
|
1501
|
+
`URI connection type: ${type}`,
|
|
1502
|
+
"Pass onConnectionUri to render the pairing URI it hands you as a QR code, or to open it as a link on mobile."
|
|
1503
|
+
],
|
|
1504
|
+
name: "ConnectionUriHandlerMissingError",
|
|
1505
|
+
shortMessage: `Connecting to ${walletKey} requires a URI pairing, so the onConnectionUri param is required.`
|
|
1506
|
+
});
|
|
1507
|
+
}
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1485
1510
|
//#endregion
|
|
1486
1511
|
//#region src/errors/DeeplinkConnectAndVerifyUnsupportedError.ts
|
|
1487
1512
|
var DeeplinkConnectAndVerifyUnsupportedError = class extends BaseError {
|
|
@@ -1736,14 +1761,14 @@ var NoAddressFoundError = class extends BaseError {
|
|
|
1736
1761
|
* @example
|
|
1737
1762
|
* ```ts
|
|
1738
1763
|
* try {
|
|
1739
|
-
* await
|
|
1764
|
+
* await connectWalletOption({ walletKey: 'rainbow' });
|
|
1740
1765
|
* } catch (error) {
|
|
1741
1766
|
* if (error instanceof NoConnectionOptionAvailableError) {
|
|
1742
1767
|
* promptWalletInstall(error.installationUrls);
|
|
1743
1768
|
* }
|
|
1744
1769
|
* }
|
|
1745
1770
|
* ```
|
|
1746
|
-
* @see
|
|
1771
|
+
* @see connectWalletOption
|
|
1747
1772
|
* @see getWalletOptionsCatalogue
|
|
1748
1773
|
*/
|
|
1749
1774
|
var NoConnectionOptionAvailableError = class extends BaseError {
|
|
@@ -1965,10 +1990,57 @@ var WalletAccountNotSelectedError = class extends BaseError {
|
|
|
1965
1990
|
}
|
|
1966
1991
|
};
|
|
1967
1992
|
|
|
1993
|
+
//#endregion
|
|
1994
|
+
//#region src/errors/WalletBrowserRedirectHandlerMissingError.ts
|
|
1995
|
+
/**
|
|
1996
|
+
* Thrown when the connection option resolved for a wallet is its in-app
|
|
1997
|
+
* browser, no `handleWalletBrowserRedirect` handler was passed to
|
|
1998
|
+
* `connectWalletOption`, and there is no current page URL to redirect into
|
|
1999
|
+
* that browser — as on React Native and during server-side rendering.
|
|
2000
|
+
*
|
|
2001
|
+
* That path connects by reloading your app inside the wallet's own browser,
|
|
2002
|
+
* so it needs the URL of the page to reload.
|
|
2003
|
+
*
|
|
2004
|
+
* @example
|
|
2005
|
+
* ```ts
|
|
2006
|
+
* // Throws on React Native, where there is no page URL to reuse
|
|
2007
|
+
* await connectWalletOption({ walletKey: 'coinbase' });
|
|
2008
|
+
*
|
|
2009
|
+
* // Connects, redirecting into the wallet's browser
|
|
2010
|
+
* await connectWalletOption({
|
|
2011
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
2012
|
+
* redirectToInAppBrowser({
|
|
2013
|
+
* appUrl: 'https://mydapp.xyz/login',
|
|
2014
|
+
* chain,
|
|
2015
|
+
* walletKey,
|
|
2016
|
+
* }),
|
|
2017
|
+
* walletKey: 'coinbase',
|
|
2018
|
+
* });
|
|
2019
|
+
* ```
|
|
2020
|
+
* @see connectWalletOption
|
|
2021
|
+
* @see redirectToInAppBrowser
|
|
2022
|
+
*/
|
|
2023
|
+
var WalletBrowserRedirectHandlerMissingError = class extends BaseError {
|
|
2024
|
+
constructor({ chain, walletKey }) {
|
|
2025
|
+
super({
|
|
2026
|
+
cause: null,
|
|
2027
|
+
code: "wallet_browser_redirect_handler_missing",
|
|
2028
|
+
docsUrl: null,
|
|
2029
|
+
metaMessages: [
|
|
2030
|
+
`Wallet key: ${walletKey}`,
|
|
2031
|
+
`Chain: ${chain}`,
|
|
2032
|
+
"Pass handleWalletBrowserRedirect and call redirectToInAppBrowser from it with the URL of the page to reload inside the wallet's browser."
|
|
2033
|
+
],
|
|
2034
|
+
name: "WalletBrowserRedirectHandlerMissingError",
|
|
2035
|
+
shortMessage: `Connecting to ${walletKey} requires opening its in-app browser, so the handleWalletBrowserRedirect param is required where there is no page URL to redirect.`
|
|
2036
|
+
});
|
|
2037
|
+
}
|
|
2038
|
+
};
|
|
2039
|
+
|
|
1968
2040
|
//#endregion
|
|
1969
2041
|
//#region src/errors/WalletOptionNotFoundError.ts
|
|
1970
2042
|
/**
|
|
1971
|
-
* Thrown when `
|
|
2043
|
+
* Thrown when `connectWalletOption` is given a wallet key that no wallet option in
|
|
1972
2044
|
* the catalogue matches.
|
|
1973
2045
|
*
|
|
1974
2046
|
* A wallet is only surfaced for the chains this client has an extension for, so
|
|
@@ -1978,14 +2050,14 @@ var WalletAccountNotSelectedError = class extends BaseError {
|
|
|
1978
2050
|
* @example
|
|
1979
2051
|
* ```ts
|
|
1980
2052
|
* try {
|
|
1981
|
-
* await
|
|
2053
|
+
* await connectWalletOption({ walletKey: 'metmask' });
|
|
1982
2054
|
* } catch (error) {
|
|
1983
2055
|
* if (error instanceof WalletOptionNotFoundError) {
|
|
1984
2056
|
* showUnknownWalletMessage();
|
|
1985
2057
|
* }
|
|
1986
2058
|
* }
|
|
1987
2059
|
* ```
|
|
1988
|
-
* @see
|
|
2060
|
+
* @see connectWalletOption
|
|
1989
2061
|
* @see getWalletOptionsCatalogue
|
|
1990
2062
|
*/
|
|
1991
2063
|
var WalletOptionNotFoundError = class extends BaseError {
|
|
@@ -2081,13 +2153,7 @@ const __checkStepUpAuth_impl = checkStepUpAuth;
|
|
|
2081
2153
|
const __checkStepUpAuth_wrapped = instrumentFunction({
|
|
2082
2154
|
fn: __checkStepUpAuth_impl,
|
|
2083
2155
|
functionName: "checkStepUpAuth",
|
|
2084
|
-
getCore:
|
|
2085
|
-
try {
|
|
2086
|
-
return getCore(getDefaultClient());
|
|
2087
|
-
} catch {
|
|
2088
|
-
return;
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2156
|
+
getCore: resolveInstrumentationCore
|
|
2091
2157
|
});
|
|
2092
2158
|
|
|
2093
2159
|
//#endregion
|
|
@@ -2127,13 +2193,7 @@ const __requestExternalAuthElevatedToken_impl = requestExternalAuthElevatedToken
|
|
|
2127
2193
|
const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
|
|
2128
2194
|
fn: __requestExternalAuthElevatedToken_impl,
|
|
2129
2195
|
functionName: "requestExternalAuthElevatedToken",
|
|
2130
|
-
getCore:
|
|
2131
|
-
try {
|
|
2132
|
-
return getCore(getDefaultClient());
|
|
2133
|
-
} catch {
|
|
2134
|
-
return;
|
|
2135
|
-
}
|
|
2136
|
-
}
|
|
2196
|
+
getCore: resolveInstrumentationCore
|
|
2137
2197
|
});
|
|
2138
2198
|
|
|
2139
2199
|
//#endregion
|
|
@@ -2175,13 +2235,7 @@ const __signInWithExternalJwt_impl = signInWithExternalJwt;
|
|
|
2175
2235
|
const __signInWithExternalJwt_wrapped = instrumentFunction({
|
|
2176
2236
|
fn: __signInWithExternalJwt_impl,
|
|
2177
2237
|
functionName: "signInWithExternalJwt",
|
|
2178
|
-
getCore:
|
|
2179
|
-
try {
|
|
2180
|
-
return getCore(getDefaultClient());
|
|
2181
|
-
} catch {
|
|
2182
|
-
return;
|
|
2183
|
-
}
|
|
2184
|
-
}
|
|
2238
|
+
getCore: resolveInstrumentationCore
|
|
2185
2239
|
});
|
|
2186
2240
|
|
|
2187
2241
|
//#endregion
|
|
@@ -2292,13 +2346,7 @@ const __deletePasskey_impl = deletePasskey;
|
|
|
2292
2346
|
const __deletePasskey_wrapped = instrumentFunction({
|
|
2293
2347
|
fn: __deletePasskey_impl,
|
|
2294
2348
|
functionName: "deletePasskey",
|
|
2295
|
-
getCore:
|
|
2296
|
-
try {
|
|
2297
|
-
return getCore(getDefaultClient());
|
|
2298
|
-
} catch {
|
|
2299
|
-
return;
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2349
|
+
getCore: resolveInstrumentationCore
|
|
2302
2350
|
});
|
|
2303
2351
|
|
|
2304
2352
|
//#endregion
|
|
@@ -2381,13 +2429,7 @@ const __registerPasskey_impl = registerPasskey;
|
|
|
2381
2429
|
const __registerPasskey_wrapped = instrumentFunction({
|
|
2382
2430
|
fn: __registerPasskey_impl,
|
|
2383
2431
|
functionName: "registerPasskey",
|
|
2384
|
-
getCore:
|
|
2385
|
-
try {
|
|
2386
|
-
return getCore(getDefaultClient());
|
|
2387
|
-
} catch {
|
|
2388
|
-
return;
|
|
2389
|
-
}
|
|
2390
|
-
}
|
|
2432
|
+
getCore: resolveInstrumentationCore
|
|
2391
2433
|
});
|
|
2392
2434
|
|
|
2393
2435
|
//#endregion
|
|
@@ -2454,13 +2496,7 @@ const __signInWithPasskey_impl = signInWithPasskey;
|
|
|
2454
2496
|
const __signInWithPasskey_wrapped = instrumentFunction({
|
|
2455
2497
|
fn: __signInWithPasskey_impl,
|
|
2456
2498
|
functionName: "signInWithPasskey",
|
|
2457
|
-
getCore:
|
|
2458
|
-
try {
|
|
2459
|
-
return getCore(getDefaultClient());
|
|
2460
|
-
} catch {
|
|
2461
|
-
return;
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2499
|
+
getCore: resolveInstrumentationCore
|
|
2464
2500
|
});
|
|
2465
2501
|
|
|
2466
2502
|
//#endregion
|
|
@@ -2505,13 +2541,7 @@ const __signInWithSocialRedirect_impl = signInWithSocialRedirect;
|
|
|
2505
2541
|
const __signInWithSocialRedirect_wrapped = instrumentFunction({
|
|
2506
2542
|
fn: __signInWithSocialRedirect_impl,
|
|
2507
2543
|
functionName: "signInWithSocialRedirect",
|
|
2508
|
-
getCore:
|
|
2509
|
-
try {
|
|
2510
|
-
return getCore(getDefaultClient());
|
|
2511
|
-
} catch {
|
|
2512
|
-
return;
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2544
|
+
getCore: resolveInstrumentationCore
|
|
2515
2545
|
});
|
|
2516
2546
|
|
|
2517
2547
|
//#endregion
|
|
@@ -2536,13 +2566,7 @@ const __authenticateWithSocial_impl = authenticateWithSocial;
|
|
|
2536
2566
|
const __authenticateWithSocial_wrapped = instrumentFunction({
|
|
2537
2567
|
fn: __authenticateWithSocial_impl,
|
|
2538
2568
|
functionName: "authenticateWithSocial",
|
|
2539
|
-
getCore:
|
|
2540
|
-
try {
|
|
2541
|
-
return getCore(getDefaultClient());
|
|
2542
|
-
} catch {
|
|
2543
|
-
return;
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2569
|
+
getCore: resolveInstrumentationCore
|
|
2546
2570
|
});
|
|
2547
2571
|
|
|
2548
2572
|
//#endregion
|
|
@@ -2577,13 +2601,7 @@ const __completeSocialRedirect_impl = completeSocialRedirect;
|
|
|
2577
2601
|
const __completeSocialRedirect_wrapped = instrumentFunction({
|
|
2578
2602
|
fn: __completeSocialRedirect_impl,
|
|
2579
2603
|
functionName: "completeSocialRedirect",
|
|
2580
|
-
getCore:
|
|
2581
|
-
try {
|
|
2582
|
-
return getCore(getDefaultClient());
|
|
2583
|
-
} catch {
|
|
2584
|
-
return;
|
|
2585
|
-
}
|
|
2586
|
-
}
|
|
2604
|
+
getCore: resolveInstrumentationCore
|
|
2587
2605
|
});
|
|
2588
2606
|
|
|
2589
2607
|
//#endregion
|
|
@@ -2600,13 +2618,7 @@ const __completeSocialAuthentication_impl = completeSocialAuthentication;
|
|
|
2600
2618
|
const __completeSocialAuthentication_wrapped = instrumentFunction({
|
|
2601
2619
|
fn: __completeSocialAuthentication_impl,
|
|
2602
2620
|
functionName: "completeSocialAuthentication",
|
|
2603
|
-
getCore:
|
|
2604
|
-
try {
|
|
2605
|
-
return getCore(getDefaultClient());
|
|
2606
|
-
} catch {
|
|
2607
|
-
return;
|
|
2608
|
-
}
|
|
2609
|
-
}
|
|
2621
|
+
getCore: resolveInstrumentationCore
|
|
2610
2622
|
});
|
|
2611
2623
|
|
|
2612
2624
|
//#endregion
|
|
@@ -2709,13 +2721,7 @@ const __processSocialCallback_impl = processSocialCallback;
|
|
|
2709
2721
|
const __processSocialCallback_wrapped = instrumentFunction({
|
|
2710
2722
|
fn: __processSocialCallback_impl,
|
|
2711
2723
|
functionName: "processSocialCallback",
|
|
2712
|
-
getCore:
|
|
2713
|
-
try {
|
|
2714
|
-
return getCore(getDefaultClient());
|
|
2715
|
-
} catch {
|
|
2716
|
-
return;
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2724
|
+
getCore: resolveInstrumentationCore
|
|
2719
2725
|
});
|
|
2720
2726
|
|
|
2721
2727
|
//#endregion
|
|
@@ -2921,13 +2927,7 @@ const __signInWithSocialPopUp_impl = signInWithSocialPopUp;
|
|
|
2921
2927
|
const __signInWithSocialPopUp_wrapped = instrumentFunction({
|
|
2922
2928
|
fn: __signInWithSocialPopUp_impl,
|
|
2923
2929
|
functionName: "signInWithSocialPopUp",
|
|
2924
|
-
getCore:
|
|
2925
|
-
try {
|
|
2926
|
-
return getCore(getDefaultClient());
|
|
2927
|
-
} catch {
|
|
2928
|
-
return;
|
|
2929
|
-
}
|
|
2930
|
-
}
|
|
2930
|
+
getCore: resolveInstrumentationCore
|
|
2931
2931
|
});
|
|
2932
2932
|
|
|
2933
2933
|
//#endregion
|
|
@@ -3002,13 +3002,7 @@ const __unlinkSocialAccount_impl = unlinkSocialAccount;
|
|
|
3002
3002
|
const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
3003
3003
|
fn: __unlinkSocialAccount_impl,
|
|
3004
3004
|
functionName: "unlinkSocialAccount",
|
|
3005
|
-
getCore:
|
|
3006
|
-
try {
|
|
3007
|
-
return getCore(getDefaultClient());
|
|
3008
|
-
} catch {
|
|
3009
|
-
return;
|
|
3010
|
-
}
|
|
3011
|
-
}
|
|
3005
|
+
getCore: resolveInstrumentationCore
|
|
3012
3006
|
});
|
|
3013
3007
|
|
|
3014
3008
|
//#endregion
|
|
@@ -3265,13 +3259,7 @@ const __attachCheckoutTransactionSource_impl = attachCheckoutTransactionSource;
|
|
|
3265
3259
|
const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
3266
3260
|
fn: __attachCheckoutTransactionSource_impl,
|
|
3267
3261
|
functionName: "attachCheckoutTransactionSource",
|
|
3268
|
-
getCore:
|
|
3269
|
-
try {
|
|
3270
|
-
return getCore(getDefaultClient());
|
|
3271
|
-
} catch {
|
|
3272
|
-
return;
|
|
3273
|
-
}
|
|
3274
|
-
}
|
|
3262
|
+
getCore: resolveInstrumentationCore
|
|
3275
3263
|
});
|
|
3276
3264
|
|
|
3277
3265
|
//#endregion
|
|
@@ -3307,13 +3295,7 @@ const __broadcastCheckoutTransaction_impl = broadcastCheckoutTransaction;
|
|
|
3307
3295
|
const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
3308
3296
|
fn: __broadcastCheckoutTransaction_impl,
|
|
3309
3297
|
functionName: "broadcastCheckoutTransaction",
|
|
3310
|
-
getCore:
|
|
3311
|
-
try {
|
|
3312
|
-
return getCore(getDefaultClient());
|
|
3313
|
-
} catch {
|
|
3314
|
-
return;
|
|
3315
|
-
}
|
|
3316
|
-
}
|
|
3298
|
+
getCore: resolveInstrumentationCore
|
|
3317
3299
|
});
|
|
3318
3300
|
|
|
3319
3301
|
//#endregion
|
|
@@ -3346,13 +3328,7 @@ const __cancelCheckoutTransaction_impl = cancelCheckoutTransaction;
|
|
|
3346
3328
|
const __cancelCheckoutTransaction_wrapped = instrumentFunction({
|
|
3347
3329
|
fn: __cancelCheckoutTransaction_impl,
|
|
3348
3330
|
functionName: "cancelCheckoutTransaction",
|
|
3349
|
-
getCore:
|
|
3350
|
-
try {
|
|
3351
|
-
return getCore(getDefaultClient());
|
|
3352
|
-
} catch {
|
|
3353
|
-
return;
|
|
3354
|
-
}
|
|
3355
|
-
}
|
|
3331
|
+
getCore: resolveInstrumentationCore
|
|
3356
3332
|
});
|
|
3357
3333
|
|
|
3358
3334
|
//#endregion
|
|
@@ -3404,13 +3380,7 @@ const __createCheckoutTransaction_impl = createCheckoutTransaction;
|
|
|
3404
3380
|
const __createCheckoutTransaction_wrapped = instrumentFunction({
|
|
3405
3381
|
fn: __createCheckoutTransaction_impl,
|
|
3406
3382
|
functionName: "createCheckoutTransaction",
|
|
3407
|
-
getCore:
|
|
3408
|
-
try {
|
|
3409
|
-
return getCore(getDefaultClient());
|
|
3410
|
-
} catch {
|
|
3411
|
-
return;
|
|
3412
|
-
}
|
|
3413
|
-
}
|
|
3383
|
+
getCore: resolveInstrumentationCore
|
|
3414
3384
|
});
|
|
3415
3385
|
|
|
3416
3386
|
//#endregion
|
|
@@ -3498,13 +3468,7 @@ const __prepareCheckoutTransaction_impl = prepareCheckoutTransaction;
|
|
|
3498
3468
|
const __prepareCheckoutTransaction_wrapped = instrumentFunction({
|
|
3499
3469
|
fn: __prepareCheckoutTransaction_impl,
|
|
3500
3470
|
functionName: "prepareCheckoutTransaction",
|
|
3501
|
-
getCore:
|
|
3502
|
-
try {
|
|
3503
|
-
return getCore(getDefaultClient());
|
|
3504
|
-
} catch {
|
|
3505
|
-
return;
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3471
|
+
getCore: resolveInstrumentationCore
|
|
3508
3472
|
});
|
|
3509
3473
|
|
|
3510
3474
|
//#endregion
|
|
@@ -3602,13 +3566,7 @@ const __executeSwapTransaction_impl = executeSwapTransaction;
|
|
|
3602
3566
|
const __executeSwapTransaction_wrapped = instrumentFunction({
|
|
3603
3567
|
fn: __executeSwapTransaction_impl,
|
|
3604
3568
|
functionName: "executeSwapTransaction",
|
|
3605
|
-
getCore:
|
|
3606
|
-
try {
|
|
3607
|
-
return getCore(getDefaultClient());
|
|
3608
|
-
} catch {
|
|
3609
|
-
return;
|
|
3610
|
-
}
|
|
3611
|
-
}
|
|
3569
|
+
getCore: resolveInstrumentationCore
|
|
3612
3570
|
});
|
|
3613
3571
|
|
|
3614
3572
|
//#endregion
|
|
@@ -3651,13 +3609,7 @@ const __submitCheckoutTransaction_impl = submitCheckoutTransaction;
|
|
|
3651
3609
|
const __submitCheckoutTransaction_wrapped = instrumentFunction({
|
|
3652
3610
|
fn: __submitCheckoutTransaction_impl,
|
|
3653
3611
|
functionName: "submitCheckoutTransaction",
|
|
3654
|
-
getCore:
|
|
3655
|
-
try {
|
|
3656
|
-
return getCore(getDefaultClient());
|
|
3657
|
-
} catch {
|
|
3658
|
-
return;
|
|
3659
|
-
}
|
|
3660
|
-
}
|
|
3612
|
+
getCore: resolveInstrumentationCore
|
|
3661
3613
|
});
|
|
3662
3614
|
|
|
3663
3615
|
//#endregion
|
|
@@ -3765,13 +3717,7 @@ const __completeDeviceRegistration_impl = completeDeviceRegistration;
|
|
|
3765
3717
|
const __completeDeviceRegistration_wrapped = instrumentFunction({
|
|
3766
3718
|
fn: __completeDeviceRegistration_impl,
|
|
3767
3719
|
functionName: "completeDeviceRegistration",
|
|
3768
|
-
getCore:
|
|
3769
|
-
try {
|
|
3770
|
-
return getCore(getDefaultClient());
|
|
3771
|
-
} catch {
|
|
3772
|
-
return;
|
|
3773
|
-
}
|
|
3774
|
-
}
|
|
3720
|
+
getCore: resolveInstrumentationCore
|
|
3775
3721
|
});
|
|
3776
3722
|
|
|
3777
3723
|
//#endregion
|
|
@@ -3848,13 +3794,7 @@ const __revokeAllRegisteredDevices_impl = revokeAllRegisteredDevices;
|
|
|
3848
3794
|
const __revokeAllRegisteredDevices_wrapped = instrumentFunction({
|
|
3849
3795
|
fn: __revokeAllRegisteredDevices_impl,
|
|
3850
3796
|
functionName: "revokeAllRegisteredDevices",
|
|
3851
|
-
getCore:
|
|
3852
|
-
try {
|
|
3853
|
-
return getCore(getDefaultClient());
|
|
3854
|
-
} catch {
|
|
3855
|
-
return;
|
|
3856
|
-
}
|
|
3857
|
-
}
|
|
3797
|
+
getCore: resolveInstrumentationCore
|
|
3858
3798
|
});
|
|
3859
3799
|
|
|
3860
3800
|
//#endregion
|
|
@@ -3872,13 +3812,7 @@ const __revokeRegisteredDevice_impl = revokeRegisteredDevice;
|
|
|
3872
3812
|
const __revokeRegisteredDevice_wrapped = instrumentFunction({
|
|
3873
3813
|
fn: __revokeRegisteredDevice_impl,
|
|
3874
3814
|
functionName: "revokeRegisteredDevice",
|
|
3875
|
-
getCore:
|
|
3876
|
-
try {
|
|
3877
|
-
return getCore(getDefaultClient());
|
|
3878
|
-
} catch {
|
|
3879
|
-
return;
|
|
3880
|
-
}
|
|
3881
|
-
}
|
|
3815
|
+
getCore: resolveInstrumentationCore
|
|
3882
3816
|
});
|
|
3883
3817
|
|
|
3884
3818
|
//#endregion
|
|
@@ -3999,13 +3933,7 @@ const __attachFlowSource_impl = attachFlowSource;
|
|
|
3999
3933
|
const __attachFlowSource_wrapped = instrumentFunction({
|
|
4000
3934
|
fn: __attachFlowSource_impl,
|
|
4001
3935
|
functionName: "attachFlowSource",
|
|
4002
|
-
getCore:
|
|
4003
|
-
try {
|
|
4004
|
-
return getCore(getDefaultClient());
|
|
4005
|
-
} catch {
|
|
4006
|
-
return;
|
|
4007
|
-
}
|
|
4008
|
-
},
|
|
3936
|
+
getCore: resolveInstrumentationCore,
|
|
4009
3937
|
selectors: attachFlowSourceInstrumentation
|
|
4010
3938
|
});
|
|
4011
3939
|
|
|
@@ -4070,13 +3998,7 @@ const __broadcastFlow_impl = broadcastFlow;
|
|
|
4070
3998
|
const __broadcastFlow_wrapped = instrumentFunction({
|
|
4071
3999
|
fn: __broadcastFlow_impl,
|
|
4072
4000
|
functionName: "broadcastFlow",
|
|
4073
|
-
getCore:
|
|
4074
|
-
try {
|
|
4075
|
-
return getCore(getDefaultClient());
|
|
4076
|
-
} catch {
|
|
4077
|
-
return;
|
|
4078
|
-
}
|
|
4079
|
-
},
|
|
4001
|
+
getCore: resolveInstrumentationCore,
|
|
4080
4002
|
selectors: broadcastFlowInstrumentation
|
|
4081
4003
|
});
|
|
4082
4004
|
|
|
@@ -4129,13 +4051,7 @@ const __cancelFlow_impl = cancelFlow;
|
|
|
4129
4051
|
const __cancelFlow_wrapped = instrumentFunction({
|
|
4130
4052
|
fn: __cancelFlow_impl,
|
|
4131
4053
|
functionName: "cancelFlow",
|
|
4132
|
-
getCore:
|
|
4133
|
-
try {
|
|
4134
|
-
return getCore(getDefaultClient());
|
|
4135
|
-
} catch {
|
|
4136
|
-
return;
|
|
4137
|
-
}
|
|
4138
|
-
},
|
|
4054
|
+
getCore: resolveInstrumentationCore,
|
|
4139
4055
|
selectors: cancelFlowInstrumentation
|
|
4140
4056
|
});
|
|
4141
4057
|
|
|
@@ -4252,13 +4168,7 @@ const __prepareFlowSigning_impl = prepareFlowSigning;
|
|
|
4252
4168
|
const __prepareFlowSigning_wrapped = instrumentFunction({
|
|
4253
4169
|
fn: __prepareFlowSigning_impl,
|
|
4254
4170
|
functionName: "prepareFlowSigning",
|
|
4255
|
-
getCore:
|
|
4256
|
-
try {
|
|
4257
|
-
return getCore(getDefaultClient());
|
|
4258
|
-
} catch {
|
|
4259
|
-
return;
|
|
4260
|
-
}
|
|
4261
|
-
},
|
|
4171
|
+
getCore: resolveInstrumentationCore,
|
|
4262
4172
|
selectors: prepareFlowSigningInstrumentation
|
|
4263
4173
|
});
|
|
4264
4174
|
|
|
@@ -4317,13 +4227,7 @@ const __submitFlowTransaction_impl = submitFlowTransaction;
|
|
|
4317
4227
|
const __submitFlowTransaction_wrapped = instrumentFunction({
|
|
4318
4228
|
fn: __submitFlowTransaction_impl,
|
|
4319
4229
|
functionName: "submitFlowTransaction",
|
|
4320
|
-
getCore:
|
|
4321
|
-
try {
|
|
4322
|
-
return getCore(getDefaultClient());
|
|
4323
|
-
} catch {
|
|
4324
|
-
return;
|
|
4325
|
-
}
|
|
4326
|
-
},
|
|
4230
|
+
getCore: resolveInstrumentationCore,
|
|
4327
4231
|
selectors: submitFlowTransactionInstrumentation
|
|
4328
4232
|
});
|
|
4329
4233
|
|
|
@@ -4665,13 +4569,7 @@ const __createCoinbaseOnrampOrder_impl = createCoinbaseOnrampOrder;
|
|
|
4665
4569
|
const __createCoinbaseOnrampOrder_wrapped = instrumentFunction({
|
|
4666
4570
|
fn: __createCoinbaseOnrampOrder_impl,
|
|
4667
4571
|
functionName: "createCoinbaseOnrampOrder",
|
|
4668
|
-
getCore:
|
|
4669
|
-
try {
|
|
4670
|
-
return getCore(getDefaultClient());
|
|
4671
|
-
} catch {
|
|
4672
|
-
return;
|
|
4673
|
-
}
|
|
4674
|
-
}
|
|
4572
|
+
getCore: resolveInstrumentationCore
|
|
4675
4573
|
});
|
|
4676
4574
|
|
|
4677
4575
|
//#endregion
|
|
@@ -4710,7 +4608,7 @@ const assertChainName = (chainName) => {
|
|
|
4710
4608
|
* ```
|
|
4711
4609
|
* @see createCoinbaseExchangeTransfer
|
|
4712
4610
|
* @see GetCoinbaseAccountsParams
|
|
4713
|
-
* @
|
|
4611
|
+
* @instrumented
|
|
4714
4612
|
*/
|
|
4715
4613
|
const getCoinbaseAccounts = async (params, client = getDefaultClient()) => {
|
|
4716
4614
|
const core = getCore(client);
|
|
@@ -4726,6 +4624,12 @@ const getCoinbaseAccounts = async (params, client = getDefaultClient()) => {
|
|
|
4726
4624
|
networkId
|
|
4727
4625
|
});
|
|
4728
4626
|
};
|
|
4627
|
+
const __getCoinbaseAccounts_impl = getCoinbaseAccounts;
|
|
4628
|
+
const __getCoinbaseAccounts_wrapped = instrumentFunction({
|
|
4629
|
+
fn: __getCoinbaseAccounts_impl,
|
|
4630
|
+
functionName: "getCoinbaseAccounts",
|
|
4631
|
+
getCore: resolveInstrumentationCore
|
|
4632
|
+
});
|
|
4729
4633
|
|
|
4730
4634
|
//#endregion
|
|
4731
4635
|
//#region src/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.ts
|
|
@@ -4735,7 +4639,7 @@ const getCoinbaseAccounts = async (params, client = getDefaultClient()) => {
|
|
|
4735
4639
|
* @param buyUrlParams CoinbaseOnrampGetBuyUrlRequest - The parameters for the buy URL.
|
|
4736
4640
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4737
4641
|
* @returns an object containing the buy URL
|
|
4738
|
-
* @
|
|
4642
|
+
* @instrumented
|
|
4739
4643
|
*/
|
|
4740
4644
|
const getCoinbaseBuyUrl = async (buyUrlParams, client = getDefaultClient()) => {
|
|
4741
4645
|
const core = getCore(client);
|
|
@@ -4744,6 +4648,12 @@ const getCoinbaseBuyUrl = async (buyUrlParams, client = getDefaultClient()) => {
|
|
|
4744
4648
|
environmentId: core.environmentId
|
|
4745
4649
|
});
|
|
4746
4650
|
};
|
|
4651
|
+
const __getCoinbaseBuyUrl_impl = getCoinbaseBuyUrl;
|
|
4652
|
+
const __getCoinbaseBuyUrl_wrapped = instrumentFunction({
|
|
4653
|
+
fn: __getCoinbaseBuyUrl_impl,
|
|
4654
|
+
functionName: "getCoinbaseBuyUrl",
|
|
4655
|
+
getCore: resolveInstrumentationCore
|
|
4656
|
+
});
|
|
4747
4657
|
|
|
4748
4658
|
//#endregion
|
|
4749
4659
|
//#region src/modules/funding/cryptoDotCom/createCryptoDotComPayment/createCryptoDotComPayment.ts
|
|
@@ -4769,13 +4679,7 @@ const __createCryptoDotComPayment_impl = createCryptoDotComPayment;
|
|
|
4769
4679
|
const __createCryptoDotComPayment_wrapped = instrumentFunction({
|
|
4770
4680
|
fn: __createCryptoDotComPayment_impl,
|
|
4771
4681
|
functionName: "createCryptoDotComPayment",
|
|
4772
|
-
getCore:
|
|
4773
|
-
try {
|
|
4774
|
-
return getCore(getDefaultClient());
|
|
4775
|
-
} catch {
|
|
4776
|
-
return;
|
|
4777
|
-
}
|
|
4778
|
-
}
|
|
4682
|
+
getCore: resolveInstrumentationCore
|
|
4779
4683
|
});
|
|
4780
4684
|
|
|
4781
4685
|
//#endregion
|
|
@@ -4808,7 +4712,7 @@ const createKrakenExchangeTransfer = async (transferParams, client = getDefaultC
|
|
|
4808
4712
|
* @param [params] GetKrakenAccountsParams - Optional filters for the accounts.
|
|
4809
4713
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4810
4714
|
* @returns Array of Kraken accounts with balances
|
|
4811
|
-
* @
|
|
4715
|
+
* @instrumented
|
|
4812
4716
|
*/
|
|
4813
4717
|
const getKrakenAccounts = async (params, client = getDefaultClient()) => {
|
|
4814
4718
|
const core = getCore(client);
|
|
@@ -4819,6 +4723,12 @@ const getKrakenAccounts = async (params, client = getDefaultClient()) => {
|
|
|
4819
4723
|
networkId: params?.networkId
|
|
4820
4724
|
});
|
|
4821
4725
|
};
|
|
4726
|
+
const __getKrakenAccounts_impl = getKrakenAccounts;
|
|
4727
|
+
const __getKrakenAccounts_wrapped = instrumentFunction({
|
|
4728
|
+
fn: __getKrakenAccounts_impl,
|
|
4729
|
+
functionName: "getKrakenAccounts",
|
|
4730
|
+
getCore: resolveInstrumentationCore
|
|
4731
|
+
});
|
|
4822
4732
|
|
|
4823
4733
|
//#endregion
|
|
4824
4734
|
//#region src/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.ts
|
|
@@ -4827,7 +4737,7 @@ const getKrakenAccounts = async (params, client = getDefaultClient()) => {
|
|
|
4827
4737
|
*
|
|
4828
4738
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4829
4739
|
* @returns Transfer destinations response with whitelisted addresses
|
|
4830
|
-
* @
|
|
4740
|
+
* @instrumented
|
|
4831
4741
|
*/
|
|
4832
4742
|
const getKrakenWhitelistedAddresses = async (client = getDefaultClient()) => {
|
|
4833
4743
|
const core = getCore(client);
|
|
@@ -4836,6 +4746,12 @@ const getKrakenWhitelistedAddresses = async (client = getDefaultClient()) => {
|
|
|
4836
4746
|
exchangeKey: ExchangeKeyEnum.Kraken
|
|
4837
4747
|
});
|
|
4838
4748
|
};
|
|
4749
|
+
const __getKrakenWhitelistedAddresses_impl = getKrakenWhitelistedAddresses;
|
|
4750
|
+
const __getKrakenWhitelistedAddresses_wrapped = instrumentFunction({
|
|
4751
|
+
fn: __getKrakenWhitelistedAddresses_impl,
|
|
4752
|
+
functionName: "getKrakenWhitelistedAddresses",
|
|
4753
|
+
getCore: resolveInstrumentationCore
|
|
4754
|
+
});
|
|
4839
4755
|
|
|
4840
4756
|
//#endregion
|
|
4841
4757
|
//#region src/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.ts
|
|
@@ -4861,13 +4777,7 @@ const __getMoonPayCurrencies_impl = getMoonPayCurrencies;
|
|
|
4861
4777
|
const __getMoonPayCurrencies_wrapped = instrumentFunction({
|
|
4862
4778
|
fn: __getMoonPayCurrencies_impl,
|
|
4863
4779
|
functionName: "getMoonPayCurrencies",
|
|
4864
|
-
getCore:
|
|
4865
|
-
try {
|
|
4866
|
-
return getCore(getDefaultClient());
|
|
4867
|
-
} catch {
|
|
4868
|
-
return;
|
|
4869
|
-
}
|
|
4870
|
-
}
|
|
4780
|
+
getCore: resolveInstrumentationCore
|
|
4871
4781
|
});
|
|
4872
4782
|
|
|
4873
4783
|
//#endregion
|
|
@@ -4937,13 +4847,7 @@ const __getMoonPayUrl_impl = getMoonPayUrl;
|
|
|
4937
4847
|
const __getMoonPayUrl_wrapped = instrumentFunction({
|
|
4938
4848
|
fn: __getMoonPayUrl_impl,
|
|
4939
4849
|
functionName: "getMoonPayUrl",
|
|
4940
|
-
getCore:
|
|
4941
|
-
try {
|
|
4942
|
-
return getCore(getDefaultClient());
|
|
4943
|
-
} catch {
|
|
4944
|
-
return;
|
|
4945
|
-
}
|
|
4946
|
-
}
|
|
4850
|
+
getCore: resolveInstrumentationCore
|
|
4947
4851
|
});
|
|
4948
4852
|
|
|
4949
4853
|
//#endregion
|
|
@@ -4987,13 +4891,7 @@ const __setInstrumentationEnabled_impl = setInstrumentationEnabled;
|
|
|
4987
4891
|
const __setInstrumentationEnabled_wrapped = instrumentFunction({
|
|
4988
4892
|
fn: __setInstrumentationEnabled_impl,
|
|
4989
4893
|
functionName: "setInstrumentationEnabled",
|
|
4990
|
-
getCore:
|
|
4991
|
-
try {
|
|
4992
|
-
return getCore(getDefaultClient());
|
|
4993
|
-
} catch {
|
|
4994
|
-
return;
|
|
4995
|
-
}
|
|
4996
|
-
}
|
|
4894
|
+
getCore: resolveInstrumentationCore
|
|
4997
4895
|
});
|
|
4998
4896
|
|
|
4999
4897
|
//#endregion
|
|
@@ -5560,13 +5458,7 @@ const __updateUser_impl = updateUser;
|
|
|
5560
5458
|
const __updateUser_wrapped = instrumentFunction({
|
|
5561
5459
|
fn: __updateUser_impl,
|
|
5562
5460
|
functionName: "updateUser",
|
|
5563
|
-
getCore:
|
|
5564
|
-
try {
|
|
5565
|
-
return getCore(getDefaultClient());
|
|
5566
|
-
} catch {
|
|
5567
|
-
return;
|
|
5568
|
-
}
|
|
5569
|
-
}
|
|
5461
|
+
getCore: resolveInstrumentationCore
|
|
5570
5462
|
});
|
|
5571
5463
|
|
|
5572
5464
|
//#endregion
|
|
@@ -5588,13 +5480,7 @@ const __acknowledgeRecoveryCodes_impl = acknowledgeRecoveryCodes;
|
|
|
5588
5480
|
const __acknowledgeRecoveryCodes_wrapped = instrumentFunction({
|
|
5589
5481
|
fn: __acknowledgeRecoveryCodes_impl,
|
|
5590
5482
|
functionName: "acknowledgeRecoveryCodes",
|
|
5591
|
-
getCore:
|
|
5592
|
-
try {
|
|
5593
|
-
return getCore(getDefaultClient());
|
|
5594
|
-
} catch {
|
|
5595
|
-
return;
|
|
5596
|
-
}
|
|
5597
|
-
}
|
|
5483
|
+
getCore: resolveInstrumentationCore
|
|
5598
5484
|
});
|
|
5599
5485
|
|
|
5600
5486
|
//#endregion
|
|
@@ -5789,13 +5675,7 @@ const __createNewMfaRecoveryCodes_impl = createNewMfaRecoveryCodes;
|
|
|
5789
5675
|
const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
5790
5676
|
fn: __createNewMfaRecoveryCodes_impl,
|
|
5791
5677
|
functionName: "createNewMfaRecoveryCodes",
|
|
5792
|
-
getCore:
|
|
5793
|
-
try {
|
|
5794
|
-
return getCore(getDefaultClient());
|
|
5795
|
-
} catch {
|
|
5796
|
-
return;
|
|
5797
|
-
}
|
|
5798
|
-
}
|
|
5678
|
+
getCore: resolveInstrumentationCore
|
|
5799
5679
|
});
|
|
5800
5680
|
|
|
5801
5681
|
//#endregion
|
|
@@ -5831,13 +5711,7 @@ const __deleteMfaDevice_impl = deleteMfaDevice;
|
|
|
5831
5711
|
const __deleteMfaDevice_wrapped = instrumentFunction({
|
|
5832
5712
|
fn: __deleteMfaDevice_impl,
|
|
5833
5713
|
functionName: "deleteMfaDevice",
|
|
5834
|
-
getCore:
|
|
5835
|
-
try {
|
|
5836
|
-
return getCore(getDefaultClient());
|
|
5837
|
-
} catch {
|
|
5838
|
-
return;
|
|
5839
|
-
}
|
|
5840
|
-
}
|
|
5714
|
+
getCore: resolveInstrumentationCore
|
|
5841
5715
|
});
|
|
5842
5716
|
|
|
5843
5717
|
//#endregion
|
|
@@ -5898,13 +5772,7 @@ const __registerTotpMfaDevice_impl = registerTotpMfaDevice;
|
|
|
5898
5772
|
const __registerTotpMfaDevice_wrapped = instrumentFunction({
|
|
5899
5773
|
fn: __registerTotpMfaDevice_impl,
|
|
5900
5774
|
functionName: "registerTotpMfaDevice",
|
|
5901
|
-
getCore:
|
|
5902
|
-
try {
|
|
5903
|
-
return getCore(getDefaultClient());
|
|
5904
|
-
} catch {
|
|
5905
|
-
return;
|
|
5906
|
-
}
|
|
5907
|
-
}
|
|
5775
|
+
getCore: resolveInstrumentationCore
|
|
5908
5776
|
});
|
|
5909
5777
|
|
|
5910
5778
|
//#endregion
|
|
@@ -5933,13 +5801,7 @@ const __setDefaultMfaDevice_impl = setDefaultMfaDevice;
|
|
|
5933
5801
|
const __setDefaultMfaDevice_wrapped = instrumentFunction({
|
|
5934
5802
|
fn: __setDefaultMfaDevice_impl,
|
|
5935
5803
|
functionName: "setDefaultMfaDevice",
|
|
5936
|
-
getCore:
|
|
5937
|
-
try {
|
|
5938
|
-
return getCore(getDefaultClient());
|
|
5939
|
-
} catch {
|
|
5940
|
-
return;
|
|
5941
|
-
}
|
|
5942
|
-
}
|
|
5804
|
+
getCore: resolveInstrumentationCore
|
|
5943
5805
|
});
|
|
5944
5806
|
|
|
5945
5807
|
//#endregion
|
|
@@ -5988,13 +5850,7 @@ const __sendEmailOTP_impl = sendEmailOTP;
|
|
|
5988
5850
|
const __sendEmailOTP_wrapped = instrumentFunction({
|
|
5989
5851
|
fn: __sendEmailOTP_impl,
|
|
5990
5852
|
functionName: "sendEmailOTP",
|
|
5991
|
-
getCore:
|
|
5992
|
-
try {
|
|
5993
|
-
return getCore(getDefaultClient());
|
|
5994
|
-
} catch {
|
|
5995
|
-
return;
|
|
5996
|
-
}
|
|
5997
|
-
}
|
|
5853
|
+
getCore: resolveInstrumentationCore
|
|
5998
5854
|
});
|
|
5999
5855
|
|
|
6000
5856
|
//#endregion
|
|
@@ -6966,13 +6822,7 @@ const __sendSmsOTP_impl = sendSmsOTP;
|
|
|
6966
6822
|
const __sendSmsOTP_wrapped = instrumentFunction({
|
|
6967
6823
|
fn: __sendSmsOTP_impl,
|
|
6968
6824
|
functionName: "sendSmsOTP",
|
|
6969
|
-
getCore:
|
|
6970
|
-
try {
|
|
6971
|
-
return getCore(getDefaultClient());
|
|
6972
|
-
} catch {
|
|
6973
|
-
return;
|
|
6974
|
-
}
|
|
6975
|
-
}
|
|
6825
|
+
getCore: resolveInstrumentationCore
|
|
6976
6826
|
});
|
|
6977
6827
|
|
|
6978
6828
|
//#endregion
|
|
@@ -7064,13 +6914,7 @@ const __verifyOTP_impl = verifyOTP;
|
|
|
7064
6914
|
const __verifyOTP_wrapped = instrumentFunction({
|
|
7065
6915
|
fn: __verifyOTP_impl,
|
|
7066
6916
|
functionName: "verifyOTP",
|
|
7067
|
-
getCore:
|
|
7068
|
-
try {
|
|
7069
|
-
return getCore(getDefaultClient());
|
|
7070
|
-
} catch {
|
|
7071
|
-
return;
|
|
7072
|
-
}
|
|
7073
|
-
}
|
|
6917
|
+
getCore: resolveInstrumentationCore
|
|
7074
6918
|
});
|
|
7075
6919
|
|
|
7076
6920
|
//#endregion
|
|
@@ -7208,13 +7052,7 @@ const __deleteUser_impl = deleteUser;
|
|
|
7208
7052
|
const __deleteUser_wrapped = instrumentFunction({
|
|
7209
7053
|
fn: __deleteUser_impl,
|
|
7210
7054
|
functionName: "deleteUser",
|
|
7211
|
-
getCore:
|
|
7212
|
-
try {
|
|
7213
|
-
return getCore(getDefaultClient());
|
|
7214
|
-
} catch {
|
|
7215
|
-
return;
|
|
7216
|
-
}
|
|
7217
|
-
}
|
|
7055
|
+
getCore: resolveInstrumentationCore
|
|
7218
7056
|
});
|
|
7219
7057
|
|
|
7220
7058
|
//#endregion
|
|
@@ -7357,13 +7195,7 @@ const __getGoogleDriveBackupReadiness_impl = getGoogleDriveBackupReadiness;
|
|
|
7357
7195
|
const __getGoogleDriveBackupReadiness_wrapped = instrumentFunction({
|
|
7358
7196
|
fn: __getGoogleDriveBackupReadiness_impl,
|
|
7359
7197
|
functionName: "getGoogleDriveBackupReadiness",
|
|
7360
|
-
getCore:
|
|
7361
|
-
try {
|
|
7362
|
-
return getCore(getDefaultClient());
|
|
7363
|
-
} catch {
|
|
7364
|
-
return;
|
|
7365
|
-
}
|
|
7366
|
-
}
|
|
7198
|
+
getCore: resolveInstrumentationCore
|
|
7367
7199
|
});
|
|
7368
7200
|
|
|
7369
7201
|
//#endregion
|
|
@@ -7601,90 +7433,6 @@ const getChainsFromWalletSchema = ({ wallet, walletKey }) => {
|
|
|
7601
7433
|
return Array.from(chains);
|
|
7602
7434
|
};
|
|
7603
7435
|
|
|
7604
|
-
//#endregion
|
|
7605
|
-
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
7606
|
-
/**
|
|
7607
|
-
* Resolves which wallet option (group) a wallet book entry belongs to. Used
|
|
7608
|
-
* by the catalogue's wallet-book-driven transformers (URI deeplink,
|
|
7609
|
-
* `inAppBrowser`, `installation`) to bucket their emitted options.
|
|
7610
|
-
*
|
|
7611
|
-
* Wallet book entries inconsistently use `group` / `chainGroup` /
|
|
7612
|
-
* `walletGroup` for the same idea. The wallet key itself acts as the wallet
|
|
7613
|
-
* option key when no group field is set.
|
|
7614
|
-
*
|
|
7615
|
-
* @param params.wallet - The wallet entry.
|
|
7616
|
-
* @param params.walletKey - The wallet's key in `walletBook.wallets`.
|
|
7617
|
-
* @returns The wallet option key.
|
|
7618
|
-
* @notInstrumented
|
|
7619
|
-
*/
|
|
7620
|
-
const resolveWalletBookWalletOptionKey = ({ wallet, walletKey }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? walletKey;
|
|
7621
|
-
|
|
7622
|
-
//#endregion
|
|
7623
|
-
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts
|
|
7624
|
-
/**
|
|
7625
|
-
* Returns the wallet's in-app browser URL template, preferring the v2
|
|
7626
|
-
* field. `inAppBrowser` is deprecated but some wallet book entries
|
|
7627
|
-
* still carry only the v1 value, so it acts as a fallback. Trailing
|
|
7628
|
-
* `?? undefined` collapses the schema's `string | null` typing down to
|
|
7629
|
-
* the `string | undefined` return contract.
|
|
7630
|
-
*
|
|
7631
|
-
* @param params.wallet - The wallet book wallet entry.
|
|
7632
|
-
* @returns The in-app browser URL, or `undefined` if neither field is set.
|
|
7633
|
-
* @notInstrumented
|
|
7634
|
-
*/
|
|
7635
|
-
const getInAppBrowserUrl = ({ wallet }) => wallet.mobile?.inAppBrowserV2 ?? wallet.mobile?.inAppBrowser ?? void 0;
|
|
7636
|
-
|
|
7637
|
-
//#endregion
|
|
7638
|
-
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts
|
|
7639
|
-
/**
|
|
7640
|
-
* Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
|
|
7641
|
-
* qualifies when it exposes a mobile in-app-browser URL — typically a
|
|
7642
|
-
* `cb_url={{encodedDappURI}}`-style template the customer fills in with the
|
|
7643
|
-
* current page URL before opening.
|
|
7644
|
-
*
|
|
7645
|
-
* Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
|
|
7646
|
-
* and injected-only wallets are dropped — so the catalogue's notion of
|
|
7647
|
-
* "external wallet" stays consistent across option types.
|
|
7648
|
-
*
|
|
7649
|
-
* A wallet's in-app browser opens a single session, so it emits one option
|
|
7650
|
-
* tagged with the first chain it advertises that the client has an
|
|
7651
|
-
* extension for — a multi-chain wallet is still reachable when only one of
|
|
7652
|
-
* its chains is enabled.
|
|
7653
|
-
*
|
|
7654
|
-
* @param params.enabledChains - Chains the client has an extension for.
|
|
7655
|
-
* @param params.walletBook - The fetched wallet book.
|
|
7656
|
-
* @returns Tagged `inAppBrowser` options paired with their wallet option keys.
|
|
7657
|
-
* @notInstrumented
|
|
7658
|
-
*/
|
|
7659
|
-
const buildInAppBrowserOptions = ({ enabledChains, walletBook }) => {
|
|
7660
|
-
const result = [];
|
|
7661
|
-
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
7662
|
-
if (shouldFilterWallet({
|
|
7663
|
-
wallet,
|
|
7664
|
-
walletKey
|
|
7665
|
-
})) continue;
|
|
7666
|
-
const url = getInAppBrowserUrl({ wallet });
|
|
7667
|
-
if (!url) continue;
|
|
7668
|
-
const chain = getChainsFromWalletSchema({
|
|
7669
|
-
wallet,
|
|
7670
|
-
walletKey
|
|
7671
|
-
}).find((advertisedChain) => enabledChains.has(advertisedChain));
|
|
7672
|
-
if (!chain) continue;
|
|
7673
|
-
result.push({
|
|
7674
|
-
option: {
|
|
7675
|
-
chain,
|
|
7676
|
-
type: "inAppBrowser",
|
|
7677
|
-
url
|
|
7678
|
-
},
|
|
7679
|
-
walletOptionKey: resolveWalletBookWalletOptionKey({
|
|
7680
|
-
wallet,
|
|
7681
|
-
walletKey
|
|
7682
|
-
})
|
|
7683
|
-
});
|
|
7684
|
-
}
|
|
7685
|
-
return result;
|
|
7686
|
-
};
|
|
7687
|
-
|
|
7688
7436
|
//#endregion
|
|
7689
7437
|
//#region src/modules/walletOptionsCatalogue/buildInstallationUrls/buildInstallationUrls.ts
|
|
7690
7438
|
const PLAY_STORE_URL_TEMPLATE = "https://play.google.com/store/apps/details?id=";
|
|
@@ -7722,6 +7470,24 @@ const buildInstallationUrls = ({ wallet }) => {
|
|
|
7722
7470
|
};
|
|
7723
7471
|
};
|
|
7724
7472
|
|
|
7473
|
+
//#endregion
|
|
7474
|
+
//#region src/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.ts
|
|
7475
|
+
/**
|
|
7476
|
+
* Resolves which wallet option (group) a wallet book entry belongs to. Used
|
|
7477
|
+
* by the catalogue's wallet-book-driven transformers (URI deeplink,
|
|
7478
|
+
* `inAppBrowser`, `installation`) to bucket their emitted options.
|
|
7479
|
+
*
|
|
7480
|
+
* Wallet book entries inconsistently use `group` / `chainGroup` /
|
|
7481
|
+
* `walletGroup` for the same idea. The wallet key itself acts as the wallet
|
|
7482
|
+
* option key when no group field is set.
|
|
7483
|
+
*
|
|
7484
|
+
* @param params.wallet - The wallet entry.
|
|
7485
|
+
* @param params.walletKey - The wallet's key in `walletBook.wallets`.
|
|
7486
|
+
* @returns The wallet option key.
|
|
7487
|
+
* @notInstrumented
|
|
7488
|
+
*/
|
|
7489
|
+
const resolveWalletBookWalletOptionKey = ({ wallet, walletKey }) => wallet.group ?? wallet.chainGroup ?? wallet.walletGroup ?? walletKey;
|
|
7490
|
+
|
|
7725
7491
|
//#endregion
|
|
7726
7492
|
//#region src/modules/walletOptionsCatalogue/buildInstallationUrlsByWalletOptionKey/buildInstallationUrlsByWalletOptionKey.ts
|
|
7727
7493
|
/**
|
|
@@ -7775,6 +7541,97 @@ const buildInstallationUrlsByWalletOptionKey = ({ enabledChains, walletBook }) =
|
|
|
7775
7541
|
return map;
|
|
7776
7542
|
};
|
|
7777
7543
|
|
|
7544
|
+
//#endregion
|
|
7545
|
+
//#region src/modules/wallets/uriConnectionStarterRegistry/getUriConnectionStarterChains/getUriConnectionStarterChains.ts
|
|
7546
|
+
/**
|
|
7547
|
+
* Returns the chains that have a URI connection starter registered for a
|
|
7548
|
+
* given URI protocol. An empty set means no chain extension can mint a
|
|
7549
|
+
* pairing URI for that protocol, so surfaces driven by it are not
|
|
7550
|
+
* reachable on this client.
|
|
7551
|
+
*
|
|
7552
|
+
* @example
|
|
7553
|
+
* ```ts
|
|
7554
|
+
* const chains = getUriConnectionStarterChains({ type: 'walletConnect' }, client);
|
|
7555
|
+
* ```
|
|
7556
|
+
*
|
|
7557
|
+
* @param params.type - The URI protocol to look up starters for.
|
|
7558
|
+
* @param client - The Dynamic client instance.
|
|
7559
|
+
* @returns The chains with a registered starter for the given protocol.
|
|
7560
|
+
* @see getUriConnectionStarterRegistry
|
|
7561
|
+
* @see UriConnectionType
|
|
7562
|
+
* @notInstrumented
|
|
7563
|
+
*/
|
|
7564
|
+
const getUriConnectionStarterChains = ({ type }, client) => {
|
|
7565
|
+
const starters = getUriConnectionStarterRegistry(client).getAll();
|
|
7566
|
+
return new Set(starters.filter((starter) => starter.type === type).map((starter) => starter.chain));
|
|
7567
|
+
};
|
|
7568
|
+
|
|
7569
|
+
//#endregion
|
|
7570
|
+
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/getInAppBrowserUrl/getInAppBrowserUrl.ts
|
|
7571
|
+
/**
|
|
7572
|
+
* Returns the wallet's in-app browser URL template, preferring the v2
|
|
7573
|
+
* field. `inAppBrowser` is deprecated but some wallet book entries
|
|
7574
|
+
* still carry only the v1 value, so it acts as a fallback. Trailing
|
|
7575
|
+
* `?? undefined` collapses the schema's `string | null` typing down to
|
|
7576
|
+
* the `string | undefined` return contract.
|
|
7577
|
+
*
|
|
7578
|
+
* @param params.wallet - The wallet book wallet entry.
|
|
7579
|
+
* @returns The in-app browser URL, or `undefined` if neither field is set.
|
|
7580
|
+
* @notInstrumented
|
|
7581
|
+
*/
|
|
7582
|
+
const getInAppBrowserUrl = ({ wallet }) => wallet.mobile?.inAppBrowserV2 ?? wallet.mobile?.inAppBrowser ?? void 0;
|
|
7583
|
+
|
|
7584
|
+
//#endregion
|
|
7585
|
+
//#region src/modules/walletOptionsCatalogue/buildInAppBrowserOptions/buildInAppBrowserOptions.ts
|
|
7586
|
+
/**
|
|
7587
|
+
* Builds the `inAppBrowser` catalogue options from the wallet book. A wallet
|
|
7588
|
+
* qualifies when it exposes a mobile in-app-browser URL — typically a
|
|
7589
|
+
* `cb_url={{encodedDappURI}}`-style template the customer fills in with the
|
|
7590
|
+
* current page URL before opening.
|
|
7591
|
+
*
|
|
7592
|
+
* Reuses the generic `shouldFilterWallet` rules — embedded sign-in methods
|
|
7593
|
+
* and injected-only wallets are dropped — so the catalogue's notion of
|
|
7594
|
+
* "external wallet" stays consistent across option types.
|
|
7595
|
+
*
|
|
7596
|
+
* A wallet's in-app browser opens a single session, so it emits one option
|
|
7597
|
+
* tagged with the first chain it advertises that the client has an
|
|
7598
|
+
* extension for — a multi-chain wallet is still reachable when only one of
|
|
7599
|
+
* its chains is enabled.
|
|
7600
|
+
*
|
|
7601
|
+
* @param params.enabledChains - Chains the client has an extension for.
|
|
7602
|
+
* @param params.walletBook - The fetched wallet book.
|
|
7603
|
+
* @returns Tagged `inAppBrowser` options paired with their wallet option keys.
|
|
7604
|
+
* @notInstrumented
|
|
7605
|
+
*/
|
|
7606
|
+
const buildInAppBrowserOptions = ({ enabledChains, walletBook }) => {
|
|
7607
|
+
const result = [];
|
|
7608
|
+
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
7609
|
+
if (shouldFilterWallet({
|
|
7610
|
+
wallet,
|
|
7611
|
+
walletKey
|
|
7612
|
+
})) continue;
|
|
7613
|
+
const url = getInAppBrowserUrl({ wallet });
|
|
7614
|
+
if (!url) continue;
|
|
7615
|
+
const chain = getChainsFromWalletSchema({
|
|
7616
|
+
wallet,
|
|
7617
|
+
walletKey
|
|
7618
|
+
}).find((advertisedChain) => enabledChains.has(advertisedChain));
|
|
7619
|
+
if (!chain) continue;
|
|
7620
|
+
result.push({
|
|
7621
|
+
option: {
|
|
7622
|
+
chain,
|
|
7623
|
+
type: "inAppBrowser",
|
|
7624
|
+
url
|
|
7625
|
+
},
|
|
7626
|
+
walletOptionKey: resolveWalletBookWalletOptionKey({
|
|
7627
|
+
wallet,
|
|
7628
|
+
walletKey
|
|
7629
|
+
})
|
|
7630
|
+
});
|
|
7631
|
+
}
|
|
7632
|
+
return result;
|
|
7633
|
+
};
|
|
7634
|
+
|
|
7778
7635
|
//#endregion
|
|
7779
7636
|
//#region src/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.ts
|
|
7780
7637
|
/**
|
|
@@ -7858,13 +7715,6 @@ const buildMetaMaskSdkUriOptions = ({ walletBook }) => {
|
|
|
7858
7715
|
//#endregion
|
|
7859
7716
|
//#region src/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.ts
|
|
7860
7717
|
/**
|
|
7861
|
-
* Chains Dynamic ships a WalletConnect extension for. Anything else a
|
|
7862
|
-
* wallet book entry advertises (Cosmos, BTC, …) gets filtered out — the
|
|
7863
|
-
* catalogue should not surface a chain the SDK has no `connectWithWalletConnect<Chain>`
|
|
7864
|
-
* primitive for.
|
|
7865
|
-
*/
|
|
7866
|
-
const WALLETCONNECT_SUPPORTED_CHAINS = new Set(["EVM", "SOL"]);
|
|
7867
|
-
/**
|
|
7868
7718
|
* Builds the `walletConnect`-discriminator catalogue options from a fetched
|
|
7869
7719
|
* wallet book. Applies the WalletConnect-specific eligibility filter
|
|
7870
7720
|
* (`shouldFilterWalletForWalletConnect`) so embedded wallets and entries
|
|
@@ -7878,11 +7728,15 @@ const WALLETCONNECT_SUPPORTED_CHAINS = new Set(["EVM", "SOL"]);
|
|
|
7878
7728
|
* discriminator via `excludedConnectionOptionTypes` doesn't accidentally
|
|
7879
7729
|
* gate the other.
|
|
7880
7730
|
*
|
|
7731
|
+
* Chains a wallet book entry advertises without a registered WalletConnect
|
|
7732
|
+
* starter are filtered out.
|
|
7733
|
+
*
|
|
7881
7734
|
* @param params.walletBook - The fetched wallet book.
|
|
7735
|
+
* @param params.walletConnectChains - Chains with a registered `walletConnect` URI connection starter.
|
|
7882
7736
|
* @returns Tagged `walletConnect` options paired with their wallet option keys.
|
|
7883
7737
|
* @notInstrumented
|
|
7884
7738
|
*/
|
|
7885
|
-
const buildWalletConnectOptions = ({ walletBook }) => {
|
|
7739
|
+
const buildWalletConnectOptions = ({ walletBook, walletConnectChains }) => {
|
|
7886
7740
|
const result = [];
|
|
7887
7741
|
for (const [walletKey, wallet] of Object.entries(walletBook.wallets)) {
|
|
7888
7742
|
if (shouldFilterWalletForWalletConnect({
|
|
@@ -7898,7 +7752,7 @@ const buildWalletConnectOptions = ({ walletBook }) => {
|
|
|
7898
7752
|
const chains = getChainsFromWalletSchema({
|
|
7899
7753
|
wallet,
|
|
7900
7754
|
walletKey
|
|
7901
|
-
}).filter((chain) =>
|
|
7755
|
+
}).filter((chain) => walletConnectChains.has(chain));
|
|
7902
7756
|
for (const chain of chains) result.push({
|
|
7903
7757
|
option: {
|
|
7904
7758
|
chain,
|
|
@@ -7914,6 +7768,108 @@ const buildWalletConnectOptions = ({ walletBook }) => {
|
|
|
7914
7768
|
return result;
|
|
7915
7769
|
};
|
|
7916
7770
|
|
|
7771
|
+
//#endregion
|
|
7772
|
+
//#region src/modules/walletOptionsCatalogue/filterConnectionOptionsByEnabledChains/filterConnectionOptionsByEnabledChains.ts
|
|
7773
|
+
/**
|
|
7774
|
+
* Drops options whose chain has no extension on this client. The wallet
|
|
7775
|
+
* book advertises every chain a wallet supports, so options derived from
|
|
7776
|
+
* it have to be narrowed to the chains the client can actually connect
|
|
7777
|
+
* on — otherwise the catalogue surfaces a connection the customer has no
|
|
7778
|
+
* primitive to drive.
|
|
7779
|
+
*
|
|
7780
|
+
* @param params.enabledChains - Chains the client has an extension for.
|
|
7781
|
+
* @param params.options - The tagged options to narrow.
|
|
7782
|
+
* @returns The options on enabled chains, in input order.
|
|
7783
|
+
* @example
|
|
7784
|
+
* ```typescript
|
|
7785
|
+
* filterConnectionOptionsByEnabledChains({
|
|
7786
|
+
* enabledChains: new Set(['EVM']),
|
|
7787
|
+
* options: [evmOption, solOption],
|
|
7788
|
+
* }); // [evmOption]
|
|
7789
|
+
* ```
|
|
7790
|
+
* @see {@link getEnabledChains} for how the enabled chains are derived.
|
|
7791
|
+
* @see {@link getWalletOptionsCatalogue} for the catalogue that applies this filter.
|
|
7792
|
+
* @notInstrumented
|
|
7793
|
+
*/
|
|
7794
|
+
const filterConnectionOptionsByEnabledChains = ({ enabledChains, options }) => options.filter(({ option }) => enabledChains.has(option.chain));
|
|
7795
|
+
|
|
7796
|
+
//#endregion
|
|
7797
|
+
//#region src/modules/walletOptionsCatalogue/buildWalletBookConnectionOptions/buildWalletBookConnectionOptions.ts
|
|
7798
|
+
/**
|
|
7799
|
+
* Builds every wallet-book-sourced connection option — WalletConnect,
|
|
7800
|
+
* MetaMask SDK URI and in-app browser — narrowed to the chains this client
|
|
7801
|
+
* has an extension for.
|
|
7802
|
+
*
|
|
7803
|
+
* Each URI-deeplink discriminator has its own builder with its own
|
|
7804
|
+
* eligibility filter (WalletConnect requires `sign_v2`; MetaMask SDK URI
|
|
7805
|
+
* does not), so excluding one discriminator never gates the other.
|
|
7806
|
+
*
|
|
7807
|
+
* WalletConnect options are emitted only on the chains with a registered
|
|
7808
|
+
* `walletConnect` URI connection starter.
|
|
7809
|
+
*
|
|
7810
|
+
* @example
|
|
7811
|
+
* ```ts
|
|
7812
|
+
* const options = buildWalletBookConnectionOptions(
|
|
7813
|
+
* { enabledChains, excludedConnectionOptionTypes: new Set(), walletBook },
|
|
7814
|
+
* client
|
|
7815
|
+
* );
|
|
7816
|
+
* ```
|
|
7817
|
+
*
|
|
7818
|
+
* @param params.enabledChains - Chains the client has an extension for.
|
|
7819
|
+
* @param params.excludedConnectionOptionTypes - Connection types to drop.
|
|
7820
|
+
* @param params.walletBook - The fetched wallet book.
|
|
7821
|
+
* @param client - The Dynamic client instance.
|
|
7822
|
+
* @returns Tagged wallet-book options paired with their wallet option keys.
|
|
7823
|
+
* @see getWalletOptionsCatalogue
|
|
7824
|
+
* @see filterConnectionOptionsByEnabledChains
|
|
7825
|
+
* @notInstrumented
|
|
7826
|
+
*/
|
|
7827
|
+
const buildWalletBookConnectionOptions = ({ enabledChains, excludedConnectionOptionTypes, walletBook }, client) => {
|
|
7828
|
+
const options = [];
|
|
7829
|
+
const walletConnectChains = getUriConnectionStarterChains({ type: "walletConnect" }, client);
|
|
7830
|
+
const hasWalletConnectStarter = walletConnectChains.size > 0;
|
|
7831
|
+
if (!excludedConnectionOptionTypes.has("walletConnect") && hasWalletConnectStarter) options.push(...buildWalletConnectOptions({
|
|
7832
|
+
walletBook,
|
|
7833
|
+
walletConnectChains
|
|
7834
|
+
}));
|
|
7835
|
+
if (!excludedConnectionOptionTypes.has("metamaskSdkUri")) options.push(...buildMetaMaskSdkUriOptions({ walletBook }));
|
|
7836
|
+
if (!excludedConnectionOptionTypes.has("inAppBrowser")) options.push(...buildInAppBrowserOptions({
|
|
7837
|
+
enabledChains,
|
|
7838
|
+
walletBook
|
|
7839
|
+
}));
|
|
7840
|
+
return filterConnectionOptionsByEnabledChains({
|
|
7841
|
+
enabledChains,
|
|
7842
|
+
options
|
|
7843
|
+
});
|
|
7844
|
+
};
|
|
7845
|
+
|
|
7846
|
+
//#endregion
|
|
7847
|
+
//#region src/modules/walletOptionsCatalogue/deriveSupportedChains/deriveSupportedChains.ts
|
|
7848
|
+
/**
|
|
7849
|
+
* Derives the chains a wallet option can be connected on from its connection
|
|
7850
|
+
* options, deduped and sorted alphabetically so the order is stable
|
|
7851
|
+
* regardless of how the connection options rank.
|
|
7852
|
+
*
|
|
7853
|
+
* Install-only wallet options have no connection options, so they support no
|
|
7854
|
+
* chain until the wallet is installed.
|
|
7855
|
+
*
|
|
7856
|
+
* @example
|
|
7857
|
+
* ```ts
|
|
7858
|
+
* const supportedChains = deriveSupportedChains({ connectionOptions });
|
|
7859
|
+
* ```
|
|
7860
|
+
*
|
|
7861
|
+
* @param params.connectionOptions - The wallet option's connection options.
|
|
7862
|
+
* @returns The chains supported by the wallet option.
|
|
7863
|
+
* @see buildWalletOption
|
|
7864
|
+
* @see WalletOption
|
|
7865
|
+
* @notInstrumented
|
|
7866
|
+
*/
|
|
7867
|
+
const deriveSupportedChains = ({ connectionOptions }) => {
|
|
7868
|
+
const chains = /* @__PURE__ */ new Set();
|
|
7869
|
+
for (const connectionOption of connectionOptions) chains.add(connectionOption.chain);
|
|
7870
|
+
return Array.from(chains).sort((a, b) => a.localeCompare(b));
|
|
7871
|
+
};
|
|
7872
|
+
|
|
7917
7873
|
//#endregion
|
|
7918
7874
|
//#region src/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.ts
|
|
7919
7875
|
/**
|
|
@@ -7962,7 +7918,8 @@ const buildWalletOption = ({ connectionOptions, displayOverride, installationUrl
|
|
|
7962
7918
|
installationUrls,
|
|
7963
7919
|
key: walletOptionKey,
|
|
7964
7920
|
name: displayOverride?.name ?? group?.name ?? walletEntry?.name ?? walletOptionKey,
|
|
7965
|
-
primaryColor: group?.brand?.primaryColor ?? walletEntry?.brand?.primaryColor
|
|
7921
|
+
primaryColor: group?.brand?.primaryColor ?? walletEntry?.brand?.primaryColor,
|
|
7922
|
+
supportedChains: deriveSupportedChains({ connectionOptions })
|
|
7966
7923
|
};
|
|
7967
7924
|
};
|
|
7968
7925
|
|
|
@@ -8240,38 +8197,13 @@ const buildWithWalletProviderOptions = ({ entries, walletBook }, client) => {
|
|
|
8240
8197
|
const EXCLUDED_WALLET_OPTION_KEYS = new Set(["coinbase", "coinbasewallet"]);
|
|
8241
8198
|
|
|
8242
8199
|
//#endregion
|
|
8243
|
-
//#region src/modules/walletOptionsCatalogue/
|
|
8200
|
+
//#region src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts
|
|
8244
8201
|
/**
|
|
8245
|
-
*
|
|
8246
|
-
*
|
|
8247
|
-
*
|
|
8248
|
-
*
|
|
8249
|
-
*
|
|
8250
|
-
*
|
|
8251
|
-
* @param params.enabledChains - Chains the client has an extension for.
|
|
8252
|
-
* @param params.options - The tagged options to narrow.
|
|
8253
|
-
* @returns The options on enabled chains, in input order.
|
|
8254
|
-
* @example
|
|
8255
|
-
* ```typescript
|
|
8256
|
-
* filterConnectionOptionsByEnabledChains({
|
|
8257
|
-
* enabledChains: new Set(['EVM']),
|
|
8258
|
-
* options: [evmOption, solOption],
|
|
8259
|
-
* }); // [evmOption]
|
|
8260
|
-
* ```
|
|
8261
|
-
* @see {@link getEnabledChains} for how the enabled chains are derived.
|
|
8262
|
-
* @see {@link getWalletOptionsCatalogue} for the catalogue that applies this filter.
|
|
8263
|
-
* @notInstrumented
|
|
8264
|
-
*/
|
|
8265
|
-
const filterConnectionOptionsByEnabledChains = ({ enabledChains, options }) => options.filter(({ option }) => enabledChains.has(option.chain));
|
|
8266
|
-
|
|
8267
|
-
//#endregion
|
|
8268
|
-
//#region src/modules/walletOptionsCatalogue/groupOptionsByWalletOption/groupOptionsByWalletOption.ts
|
|
8269
|
-
/**
|
|
8270
|
-
* Buckets tagged connection options by their wallet option key. Preserves
|
|
8271
|
-
* first-seen order so that the caller's choice of
|
|
8272
|
-
* `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
|
|
8273
|
-
* order (wallet book order for walletConnect/inAppBrowser/installation,
|
|
8274
|
-
* registry order for withWalletProvider).
|
|
8202
|
+
* Buckets tagged connection options by their wallet option key. Preserves
|
|
8203
|
+
* first-seen order so that the caller's choice of
|
|
8204
|
+
* `walletOptionOrdering: 'relevance'` naturally inherits the upstream input
|
|
8205
|
+
* order (wallet book order for walletConnect/inAppBrowser/installation,
|
|
8206
|
+
* registry order for withWalletProvider).
|
|
8275
8207
|
*
|
|
8276
8208
|
* Carries through the first-seen `displayOverride` per wallet option
|
|
8277
8209
|
* key, so the shell builder can apply provider-announced metadata on
|
|
@@ -8427,19 +8359,26 @@ const compareByRelevance = ({ a, b }) => {
|
|
|
8427
8359
|
const hasAnyConnectionOption = ({ walletOption }) => walletOption.connectionOptions.length > 0;
|
|
8428
8360
|
|
|
8429
8361
|
//#endregion
|
|
8430
|
-
//#region src/modules/walletOptionsCatalogue/
|
|
8362
|
+
//#region src/modules/walletOptionsCatalogue/isWalletExtensionInstalled/isWalletExtensionInstalled.ts
|
|
8431
8363
|
/**
|
|
8432
|
-
*
|
|
8433
|
-
*
|
|
8434
|
-
* Wallet Standard announcement, window injection, or an SDK-backed
|
|
8435
|
-
*
|
|
8436
|
-
* pre-sorted, so a registered provider always sits at index 0 when present.
|
|
8364
|
+
* Returns true when the wallet option has any `withWalletProvider` connection
|
|
8365
|
+
* option, meaning the wallet is available in the page through a browser
|
|
8366
|
+
* extension, Wallet Standard announcement, window injection, or an SDK-backed
|
|
8367
|
+
* provider registered by a chain extension.
|
|
8437
8368
|
*
|
|
8369
|
+
* @description Detects whether a wallet option is available through a provider
|
|
8370
|
+
* registered in the page.
|
|
8438
8371
|
* @param params.walletOption - The wallet option to inspect.
|
|
8439
|
-
* @returns True when
|
|
8372
|
+
* @returns True when the wallet is available in the page.
|
|
8373
|
+
* @example
|
|
8374
|
+
* ```ts
|
|
8375
|
+
* const isInstalled = isWalletExtensionInstalled({ walletOption });
|
|
8376
|
+
* ```
|
|
8377
|
+
* @see getWalletOptionsCatalogue
|
|
8378
|
+
* @see WalletOption
|
|
8440
8379
|
* @notInstrumented
|
|
8441
8380
|
*/
|
|
8442
|
-
const
|
|
8381
|
+
const isWalletExtensionInstalled = ({ walletOption }) => walletOption.connectionOptions.some(({ type }) => type === "withWalletProvider");
|
|
8443
8382
|
|
|
8444
8383
|
//#endregion
|
|
8445
8384
|
//#region src/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.ts
|
|
@@ -8452,7 +8391,7 @@ const hasInstalledProvider = ({ walletOption }) => walletOption.connectionOption
|
|
|
8452
8391
|
* - `'relevance'` (default): bucket wallet options into three tiers, in
|
|
8453
8392
|
* this order:
|
|
8454
8393
|
* 1. **Installed provider** — user already has the wallet available
|
|
8455
|
-
* (`withWalletProvider`
|
|
8394
|
+
* (any `withWalletProvider` connection option).
|
|
8456
8395
|
* 2. **Connectable** — has at least one connection (URI deeplink
|
|
8457
8396
|
* or `inAppBrowser`) but no installed provider.
|
|
8458
8397
|
* 3. **Install-only** — no connection at all; only `installationUrls`.
|
|
@@ -8474,7 +8413,7 @@ const sortWalletOptions = ({ walletOptions, ordering }) => {
|
|
|
8474
8413
|
const installed = [];
|
|
8475
8414
|
const connectable = [];
|
|
8476
8415
|
const installOnly = [];
|
|
8477
|
-
for (const walletOption of walletOptions) if (
|
|
8416
|
+
for (const walletOption of walletOptions) if (isWalletExtensionInstalled({ walletOption })) installed.push(walletOption);
|
|
8478
8417
|
else if (hasAnyConnectionOption({ walletOption })) connectable.push(walletOption);
|
|
8479
8418
|
else installOnly.push(walletOption);
|
|
8480
8419
|
installed.sort((a, b) => compareByRelevance({
|
|
@@ -8512,6 +8451,10 @@ const EMPTY_WALLET_BOOK = {
|
|
|
8512
8451
|
* client has an extension for — a wallet is only surfaced on chains the
|
|
8513
8452
|
* customer can actually connect on.
|
|
8514
8453
|
*
|
|
8454
|
+
* WalletConnect surfaces require a registered `walletConnect` URI
|
|
8455
|
+
* connection starter, so they only appear once a chain extension that can
|
|
8456
|
+
* mint a WalletConnect URI is added to the client.
|
|
8457
|
+
*
|
|
8515
8458
|
* Pass `excludedConnectionOptionTypes` to drop specific connection types
|
|
8516
8459
|
* from the catalogue (e.g. `['inAppBrowser']` on desktop). Wallets whose
|
|
8517
8460
|
* only connection was an excluded type fall through to the install-only
|
|
@@ -8536,19 +8479,11 @@ const getWalletOptionsCatalogue = async (params = {}, client = getDefaultClient(
|
|
|
8536
8479
|
walletBook
|
|
8537
8480
|
}, client));
|
|
8538
8481
|
}
|
|
8539
|
-
if (includeMobileOptions) {
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
enabledChains,
|
|
8545
|
-
walletBook
|
|
8546
|
-
}));
|
|
8547
|
-
allConnectionOptions.push(...filterConnectionOptionsByEnabledChains({
|
|
8548
|
-
enabledChains,
|
|
8549
|
-
options: walletBookOptions
|
|
8550
|
-
}));
|
|
8551
|
-
}
|
|
8482
|
+
if (includeMobileOptions) allConnectionOptions.push(...buildWalletBookConnectionOptions({
|
|
8483
|
+
enabledChains,
|
|
8484
|
+
excludedConnectionOptionTypes,
|
|
8485
|
+
walletBook
|
|
8486
|
+
}, client));
|
|
8552
8487
|
const installationUrlsByKey = includeMobileOptions ? buildInstallationUrlsByWalletOptionKey({
|
|
8553
8488
|
enabledChains,
|
|
8554
8489
|
walletBook
|
|
@@ -8627,13 +8562,7 @@ const __confirmTransaction_impl = confirmTransaction;
|
|
|
8627
8562
|
const __confirmTransaction_wrapped = instrumentFunction({
|
|
8628
8563
|
fn: __confirmTransaction_impl,
|
|
8629
8564
|
functionName: "confirmTransaction",
|
|
8630
|
-
getCore:
|
|
8631
|
-
try {
|
|
8632
|
-
return getCore(getDefaultClient());
|
|
8633
|
-
} catch {
|
|
8634
|
-
return;
|
|
8635
|
-
}
|
|
8636
|
-
}
|
|
8565
|
+
getCore: resolveInstrumentationCore
|
|
8637
8566
|
});
|
|
8638
8567
|
|
|
8639
8568
|
//#endregion
|
|
@@ -8728,13 +8657,7 @@ const __connectWithWalletProvider_impl = connectWithWalletProvider;
|
|
|
8728
8657
|
const __connectWithWalletProvider_wrapped = instrumentFunction({
|
|
8729
8658
|
fn: __connectWithWalletProvider_impl,
|
|
8730
8659
|
functionName: "connectWithWalletProvider",
|
|
8731
|
-
getCore:
|
|
8732
|
-
try {
|
|
8733
|
-
return getCore(getDefaultClient());
|
|
8734
|
-
} catch {
|
|
8735
|
-
return;
|
|
8736
|
-
}
|
|
8737
|
-
}
|
|
8660
|
+
getCore: resolveInstrumentationCore
|
|
8738
8661
|
});
|
|
8739
8662
|
|
|
8740
8663
|
//#endregion
|
|
@@ -8863,13 +8786,7 @@ const __proveWalletAccountOwnership_impl = proveWalletAccountOwnership;
|
|
|
8863
8786
|
const __proveWalletAccountOwnership_wrapped = instrumentFunction({
|
|
8864
8787
|
fn: __proveWalletAccountOwnership_impl,
|
|
8865
8788
|
functionName: "proveWalletAccountOwnership",
|
|
8866
|
-
getCore:
|
|
8867
|
-
try {
|
|
8868
|
-
return getCore(getDefaultClient());
|
|
8869
|
-
} catch {
|
|
8870
|
-
return;
|
|
8871
|
-
}
|
|
8872
|
-
}
|
|
8789
|
+
getCore: resolveInstrumentationCore
|
|
8873
8790
|
});
|
|
8874
8791
|
|
|
8875
8792
|
//#endregion
|
|
@@ -8979,13 +8896,7 @@ const __verifyWalletAccount_impl = verifyWalletAccount;
|
|
|
8979
8896
|
const __verifyWalletAccount_wrapped = instrumentFunction({
|
|
8980
8897
|
fn: __verifyWalletAccount_impl,
|
|
8981
8898
|
functionName: "verifyWalletAccount",
|
|
8982
|
-
getCore:
|
|
8983
|
-
try {
|
|
8984
|
-
return getCore(getDefaultClient());
|
|
8985
|
-
} catch {
|
|
8986
|
-
return;
|
|
8987
|
-
}
|
|
8988
|
-
}
|
|
8899
|
+
getCore: resolveInstrumentationCore
|
|
8989
8900
|
});
|
|
8990
8901
|
|
|
8991
8902
|
//#endregion
|
|
@@ -9017,46 +8928,479 @@ const isDeeplinkWalletProvider = ({ walletProvider }) => walletProvider.walletPr
|
|
|
9017
8928
|
*
|
|
9018
8929
|
* @example
|
|
9019
8930
|
* ```ts
|
|
9020
|
-
* const walletAccount = await connectAndVerifyWithWalletProvider({
|
|
9021
|
-
* walletProviderKey: 'metamaskevm',
|
|
8931
|
+
* const walletAccount = await connectAndVerifyWithWalletProvider({
|
|
8932
|
+
* walletProviderKey: 'metamaskevm',
|
|
8933
|
+
* });
|
|
8934
|
+
* console.log('Verified address:', walletAccount.address);
|
|
8935
|
+
* ```
|
|
8936
|
+
*
|
|
8937
|
+
* @param params.walletProviderKey - The unique key identifying the wallet provider to connect to.
|
|
8938
|
+
* @param [params.hardwareWalletVendor] - The hardware wallet vendor, if connecting via a hardware wallet (e.g. 'ledger').
|
|
8939
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
8940
|
+
* @returns A promise that resolves to the connected and verified wallet account.
|
|
8941
|
+
* @see connectWithWalletProvider
|
|
8942
|
+
* @see verifyWalletAccount
|
|
8943
|
+
* @instrumented
|
|
8944
|
+
*/
|
|
8945
|
+
const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareWalletVendor }, client = getDefaultClient()) => {
|
|
8946
|
+
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
8947
|
+
if (isMobile() && isDeeplinkWalletProvider({ walletProvider })) throw new DeeplinkConnectAndVerifyUnsupportedError({ walletProviderKey });
|
|
8948
|
+
const walletAccount = await __connectWithWalletProvider_wrapped({
|
|
8949
|
+
addToDynamicWalletAccounts: false,
|
|
8950
|
+
hardwareWalletVendor,
|
|
8951
|
+
walletProviderKey
|
|
8952
|
+
}, client);
|
|
8953
|
+
await __verifyWalletAccount_wrapped({ walletAccount }, client);
|
|
8954
|
+
createVisit({
|
|
8955
|
+
authMode: AuthModeEnum.AndSign,
|
|
8956
|
+
walletAccount
|
|
8957
|
+
}, client);
|
|
8958
|
+
return walletAccount;
|
|
8959
|
+
};
|
|
8960
|
+
const __connectAndVerifyWithWalletProvider_impl = connectAndVerifyWithWalletProvider;
|
|
8961
|
+
const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
8962
|
+
fn: __connectAndVerifyWithWalletProvider_impl,
|
|
8963
|
+
functionName: "connectAndVerifyWithWalletProvider",
|
|
8964
|
+
getCore: resolveInstrumentationCore
|
|
8965
|
+
});
|
|
8966
|
+
|
|
8967
|
+
//#endregion
|
|
8968
|
+
//#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
|
|
8969
|
+
/**
|
|
8970
|
+
* Appends a wallet connection URI to a deeplink URL.
|
|
8971
|
+
*
|
|
8972
|
+
* Generic across URI-deeplink connection options — works for both
|
|
8973
|
+
* WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
|
|
8974
|
+
* appropriate query parameter separator based on whether the deeplink
|
|
8975
|
+
* already contains query parameters.
|
|
8976
|
+
*
|
|
8977
|
+
* @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
|
|
8978
|
+
* @param params.connectionUri - The connection URI to append.
|
|
8979
|
+
* @returns The deeplink URL with the connection URI appended as a query parameter.
|
|
8980
|
+
*
|
|
8981
|
+
* @example
|
|
8982
|
+
* ```ts
|
|
8983
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
|
|
8984
|
+
* // Returns: 'walletapp://wc?uri=wc%3A123-456'
|
|
8985
|
+
*
|
|
8986
|
+
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
|
|
8987
|
+
* // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
|
|
8988
|
+
* ```
|
|
8989
|
+
* @notInstrumented
|
|
8990
|
+
*/
|
|
8991
|
+
const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
8992
|
+
const url = new URL(deeplinkUrl);
|
|
8993
|
+
url.searchParams.set("uri", connectionUri);
|
|
8994
|
+
return url.href;
|
|
8995
|
+
};
|
|
8996
|
+
|
|
8997
|
+
//#endregion
|
|
8998
|
+
//#region src/utils/getPreferredWalletDeepLink/getPreferredWalletDeepLink.ts
|
|
8999
|
+
/**
|
|
9000
|
+
* Picks the most appropriate deep link variant for the current platform.
|
|
9001
|
+
*
|
|
9002
|
+
* Mobile (Android, iOS, tablets) prefers `native` because the OS treats
|
|
9003
|
+
* custom URL schemes as first-class app links and gives the wallet a faster
|
|
9004
|
+
* round-trip back to the dApp. Desktop prefers `universal` because browsers
|
|
9005
|
+
* cannot resolve mobile-only custom schemes and need an `https://` link
|
|
9006
|
+
* that opens the wallet's web flow.
|
|
9007
|
+
*
|
|
9008
|
+
* In either case, the alternative is used as a fallback when the preferred
|
|
9009
|
+
* variant is missing. Returns `undefined` only when both variants are
|
|
9010
|
+
* absent.
|
|
9011
|
+
*
|
|
9012
|
+
* @example
|
|
9013
|
+
* ```ts
|
|
9014
|
+
* const deepLink = getPreferredWalletDeepLink({
|
|
9015
|
+
* deeplinks: wallet.deeplinks,
|
|
9016
|
+
* });
|
|
9017
|
+
* ```
|
|
9018
|
+
*
|
|
9019
|
+
* @param params.deeplinks - The deep link variants for a wallet (typically `WalletConnectCatalogWallet.deeplinks`).
|
|
9020
|
+
* @returns The preferred deep link URL, or `undefined` if neither variant is available.
|
|
9021
|
+
* @see appendConnectionUriToDeeplink
|
|
9022
|
+
* @see getConnectionUriDeeplink
|
|
9023
|
+
* @notInstrumented
|
|
9024
|
+
*/
|
|
9025
|
+
const getPreferredWalletDeepLink = ({ deeplinks }) => {
|
|
9026
|
+
const { native, universal } = deeplinks;
|
|
9027
|
+
if (isMobile()) return native ?? universal;
|
|
9028
|
+
return universal ?? native;
|
|
9029
|
+
};
|
|
9030
|
+
|
|
9031
|
+
//#endregion
|
|
9032
|
+
//#region src/modules/wallets/connectWithUriConnectionOption/getConnectionUriDeeplink/getConnectionUriDeeplink.ts
|
|
9033
|
+
/**
|
|
9034
|
+
* Builds the single deeplink that hands a pairing URI to the wallet, picking
|
|
9035
|
+
* the shape the URI's protocol expects.
|
|
9036
|
+
*
|
|
9037
|
+
* A WalletConnect URI travels as the `uri` query parameter of the wallet's own
|
|
9038
|
+
* deeplink, whereas the MetaMask SDK mints a launch link that already targets
|
|
9039
|
+
* MetaMask, so it is handed over untouched.
|
|
9040
|
+
*
|
|
9041
|
+
* @example
|
|
9042
|
+
* ```ts
|
|
9043
|
+
* const deeplink = getConnectionUriDeeplink({
|
|
9044
|
+
* deeplinks: connectionOption.deeplinks,
|
|
9045
|
+
* type: connectionOption.type,
|
|
9046
|
+
* uri,
|
|
9047
|
+
* });
|
|
9048
|
+
* ```
|
|
9049
|
+
*
|
|
9050
|
+
* @param params.deeplinks - The wallet's deeplink variants, as carried by the wallet book.
|
|
9051
|
+
* @param params.type - The URI connection type that minted the URI.
|
|
9052
|
+
* @param params.uri - The pairing URI.
|
|
9053
|
+
* @returns The deeplink to open, or `undefined` when the wallet publishes no deeplink to carry the URI.
|
|
9054
|
+
* @see getPreferredWalletDeepLink
|
|
9055
|
+
* @see appendConnectionUriToDeeplink
|
|
9056
|
+
* @notInstrumented
|
|
9057
|
+
*/
|
|
9058
|
+
const getConnectionUriDeeplink = ({ deeplinks, type, uri }) => {
|
|
9059
|
+
if (type === "metamaskSdkUri") return uri;
|
|
9060
|
+
const deeplinkUrl = getPreferredWalletDeepLink({ deeplinks });
|
|
9061
|
+
if (!deeplinkUrl) return;
|
|
9062
|
+
return appendConnectionUriToDeeplink({
|
|
9063
|
+
connectionUri: uri,
|
|
9064
|
+
deeplinkUrl
|
|
9065
|
+
});
|
|
9066
|
+
};
|
|
9067
|
+
|
|
9068
|
+
//#endregion
|
|
9069
|
+
//#region src/modules/wallets/connectWithUriConnectionOption/connectWithUriConnectionOption.ts
|
|
9070
|
+
/**
|
|
9071
|
+
* Connects to a wallet through a URI pairing and returns the connected wallet
|
|
9072
|
+
* account.
|
|
9073
|
+
*
|
|
9074
|
+
* Mints the pairing URI with the starter the chain extension registered for
|
|
9075
|
+
* the option's chain and URI type, hands it to `onConnectionUri` as the
|
|
9076
|
+
* wallet's deeplink carrying the pairing so the customer can render a QR code
|
|
9077
|
+
* or open the wallet app, then waits for the user to approve the pairing on
|
|
9078
|
+
* the wallet side.
|
|
9079
|
+
*
|
|
9080
|
+
* The handler is awaited, so an async handler that fails to open the wallet
|
|
9081
|
+
* rejects the connection rather than letting the pairing resolve into an
|
|
9082
|
+
* account nobody asked for.
|
|
9083
|
+
*
|
|
9084
|
+
* @example
|
|
9085
|
+
* ```ts
|
|
9086
|
+
* const walletAccount = await connectWithUriConnectionOption(
|
|
9087
|
+
* {
|
|
9088
|
+
* addToDynamicWalletAccounts: true,
|
|
9089
|
+
* connectionOption,
|
|
9090
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
9091
|
+
* walletKey: 'trust',
|
|
9092
|
+
* },
|
|
9093
|
+
* client
|
|
9094
|
+
* );
|
|
9095
|
+
* ```
|
|
9096
|
+
*
|
|
9097
|
+
* @param params.addToDynamicWalletAccounts - Whether the connected wallet account should be added to the client's wallet accounts.
|
|
9098
|
+
* @param params.connectionOption - The URI deeplink connection option to drive.
|
|
9099
|
+
* @param params.onConnectionUri - Called with the pairing URI once it is minted. Awaited before the approval is waited on.
|
|
9100
|
+
* @param params.walletKey - The wallet being connected, keyed as in the wallet options catalogue.
|
|
9101
|
+
* @param client - The Dynamic client instance.
|
|
9102
|
+
* @returns A promise that resolves to the connected wallet account.
|
|
9103
|
+
* @throws ConnectionUriHandlerMissingError If no onConnectionUri handler was passed.
|
|
9104
|
+
* @throws NoConnectionOptionAvailableError If no URI connection starter is registered for the option's chain and type.
|
|
9105
|
+
* @throws NoAddressFoundError If the pairing was approved but no address was shared with your app.
|
|
9106
|
+
* @see getUriConnectionStarterRegistry
|
|
9107
|
+
* @see getWalletOptionsCatalogue
|
|
9108
|
+
* @notInstrumented
|
|
9109
|
+
*/
|
|
9110
|
+
const connectWithUriConnectionOption = async ({ addToDynamicWalletAccounts, connectionOption, onConnectionUri, walletKey }, client) => {
|
|
9111
|
+
const { chain, deeplinks, type } = connectionOption;
|
|
9112
|
+
if (!onConnectionUri) throw new ConnectionUriHandlerMissingError({
|
|
9113
|
+
chain,
|
|
9114
|
+
type,
|
|
9115
|
+
walletKey
|
|
9116
|
+
});
|
|
9117
|
+
const starter = getUriConnectionStarterRegistry(client).get({
|
|
9118
|
+
chain,
|
|
9119
|
+
type
|
|
9120
|
+
});
|
|
9121
|
+
if (!starter) throw new NoConnectionOptionAvailableError({
|
|
9122
|
+
chain,
|
|
9123
|
+
walletKey
|
|
9124
|
+
});
|
|
9125
|
+
const { approval, uri } = await starter.start({ addToDynamicWalletAccounts });
|
|
9126
|
+
const walletAccountsPromise = approval();
|
|
9127
|
+
walletAccountsPromise.catch(() => void 0);
|
|
9128
|
+
await onConnectionUri({ uri: getConnectionUriDeeplink({
|
|
9129
|
+
deeplinks,
|
|
9130
|
+
type,
|
|
9131
|
+
uri
|
|
9132
|
+
}) ?? uri });
|
|
9133
|
+
const { walletAccounts } = await walletAccountsPromise;
|
|
9134
|
+
const [walletAccount] = walletAccounts;
|
|
9135
|
+
if (!walletAccount) throw new NoAddressFoundError();
|
|
9136
|
+
return walletAccount;
|
|
9137
|
+
};
|
|
9138
|
+
|
|
9139
|
+
//#endregion
|
|
9140
|
+
//#region src/utils/buildInAppBrowserUrl/buildInAppBrowserUrl.ts
|
|
9141
|
+
/**
|
|
9142
|
+
* Placeholder the wallet book leaves in in-app-browser URLs for the app URL
|
|
9143
|
+
* the wallet should open.
|
|
9144
|
+
*/
|
|
9145
|
+
const DAPP_URL_PLACEHOLDER = "{{encodedDappURI}}";
|
|
9146
|
+
/**
|
|
9147
|
+
* Fills a wallet's in-app-browser URL template with the app URL to open.
|
|
9148
|
+
*
|
|
9149
|
+
* Wallet book entries carry the entry point as a template (e.g.
|
|
9150
|
+
* `https://go.base.app/dapp?cb_url={{encodedDappURI}}`), so the URL is only
|
|
9151
|
+
* usable once every occurrence of the placeholder is substituted in,
|
|
9152
|
+
* percent-encoded. Templates without the placeholder are returned untouched —
|
|
9153
|
+
* some wallets open a fixed landing page.
|
|
9154
|
+
*
|
|
9155
|
+
* @example
|
|
9156
|
+
* ```ts
|
|
9157
|
+
* buildInAppBrowserUrl({
|
|
9158
|
+
* appUrl: 'https://myapp.xyz/login',
|
|
9159
|
+
* inAppBrowserUrl: 'https://go.base.app/dapp?cb_url={{encodedDappURI}}',
|
|
9160
|
+
* });
|
|
9161
|
+
* // Returns: 'https://go.base.app/dapp?cb_url=https%3A%2F%2Fmyapp.xyz%2Flogin'
|
|
9162
|
+
* ```
|
|
9163
|
+
*
|
|
9164
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9165
|
+
* @param params.inAppBrowserUrl - The wallet's in-app-browser URL template.
|
|
9166
|
+
* @returns The in-app-browser URL to open.
|
|
9167
|
+
* @see redirectToInAppBrowser
|
|
9168
|
+
* @see getWalletOptionsCatalogue
|
|
9169
|
+
* @notInstrumented
|
|
9170
|
+
*/
|
|
9171
|
+
const buildInAppBrowserUrl = ({ appUrl, inAppBrowserUrl }) => inAppBrowserUrl.replaceAll(DAPP_URL_PLACEHOLDER, encodeURIComponent(appUrl));
|
|
9172
|
+
|
|
9173
|
+
//#endregion
|
|
9174
|
+
//#region src/modules/wallets/redirectToInAppBrowser/redirectToInAppBrowser.ts
|
|
9175
|
+
/**
|
|
9176
|
+
* Leaves your app for a wallet's in-app browser, which reloads `appUrl`
|
|
9177
|
+
* inside it.
|
|
9178
|
+
*
|
|
9179
|
+
* Call this from `handleWalletBrowserRedirect` with the URL of the page the
|
|
9180
|
+
* wallet should reload. The wallet's in-app-browser entry point is read from
|
|
9181
|
+
* the wallet options catalogue, so you only need the wallet's key. The wallet
|
|
9182
|
+
* is only injected on that reload, so the connection is made on the next page
|
|
9183
|
+
* load rather than in the current one.
|
|
9184
|
+
*
|
|
9185
|
+
* @example
|
|
9186
|
+
* ```ts
|
|
9187
|
+
* await connectWalletOption({
|
|
9188
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
9189
|
+
* redirectToInAppBrowser({ appUrl: window.location.href, chain, walletKey }),
|
|
9190
|
+
* walletKey: 'coinbase',
|
|
9191
|
+
* });
|
|
9192
|
+
* ```
|
|
9193
|
+
*
|
|
9194
|
+
* @param params.appUrl - The URL of your app for the wallet's browser to open.
|
|
9195
|
+
* @param params.walletKey - The wallet to open, keyed as in the wallet options catalogue.
|
|
9196
|
+
* @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.
|
|
9197
|
+
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9198
|
+
* @returns A promise that resolves once the redirect is triggered.
|
|
9199
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9200
|
+
* @throws NoConnectionOptionAvailableError If the wallet exposes no in-app browser on the requested chain.
|
|
9201
|
+
* @throws AmbiguousWalletChainError If the wallet exposes an in-app browser on more than one chain and no chain was passed.
|
|
9202
|
+
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
9203
|
+
* @see connectWalletOption
|
|
9204
|
+
* @see WalletBrowserRedirectHandlerParams
|
|
9205
|
+
* @instrumented
|
|
9206
|
+
*/
|
|
9207
|
+
const redirectToInAppBrowser = async ({ appUrl, chain, walletKey }, client = getDefaultClient()) => {
|
|
9208
|
+
const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
|
|
9209
|
+
if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
|
|
9210
|
+
const inAppBrowserOptions = walletOption.connectionOptions.filter((option) => option.type === "inAppBrowser" && (!chain || option.chain === chain));
|
|
9211
|
+
if (inAppBrowserOptions.length === 0) throw new NoConnectionOptionAvailableError({
|
|
9212
|
+
chain,
|
|
9213
|
+
installationUrls: walletOption.installationUrls,
|
|
9214
|
+
walletKey
|
|
9215
|
+
});
|
|
9216
|
+
const availableChains = [...new Set(inAppBrowserOptions.map((option) => option.chain))];
|
|
9217
|
+
if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
|
|
9218
|
+
chains: availableChains,
|
|
9219
|
+
walletKey
|
|
9220
|
+
});
|
|
9221
|
+
const [inAppBrowserOption] = inAppBrowserOptions;
|
|
9222
|
+
const urlToOpen = buildInAppBrowserUrl({
|
|
9223
|
+
appUrl,
|
|
9224
|
+
inAppBrowserUrl: inAppBrowserOption.url
|
|
9225
|
+
});
|
|
9226
|
+
assertSafeDeeplinkUrl(urlToOpen);
|
|
9227
|
+
await getCore(client).openDeeplink(urlToOpen);
|
|
9228
|
+
};
|
|
9229
|
+
const __redirectToInAppBrowser_impl = redirectToInAppBrowser;
|
|
9230
|
+
const __redirectToInAppBrowser_wrapped = instrumentFunction({
|
|
9231
|
+
fn: __redirectToInAppBrowser_impl,
|
|
9232
|
+
functionName: "redirectToInAppBrowser",
|
|
9233
|
+
getCore: resolveInstrumentationCore
|
|
9234
|
+
});
|
|
9235
|
+
|
|
9236
|
+
//#endregion
|
|
9237
|
+
//#region src/modules/wallets/resolveWalletConnectionOption/resolveWalletConnectionOption.ts
|
|
9238
|
+
/**
|
|
9239
|
+
* Picks the connection option `connectWalletOption` should drive for a wallet.
|
|
9240
|
+
*
|
|
9241
|
+
* Reads the wallet options catalogue, keeps the options this client can
|
|
9242
|
+
* actually drive — a registered wallet provider, an in-app-browser entry, or
|
|
9243
|
+
* a URI pairing whose starter a chain extension has registered — and returns
|
|
9244
|
+
* the best one by the catalogue's ordering.
|
|
9245
|
+
*
|
|
9246
|
+
* @example
|
|
9247
|
+
* ```ts
|
|
9248
|
+
* const connectionOption = await resolveWalletConnectionOption(
|
|
9249
|
+
* { walletKey: 'metamask' },
|
|
9250
|
+
* client
|
|
9251
|
+
* );
|
|
9252
|
+
* ```
|
|
9253
|
+
*
|
|
9254
|
+
* @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue.
|
|
9255
|
+
* @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
|
|
9256
|
+
* @param client - The Dynamic client instance.
|
|
9257
|
+
* @returns A promise that resolves to the connection option to drive.
|
|
9258
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9259
|
+
* @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
|
|
9260
|
+
* @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
|
|
9261
|
+
* @see connectWalletOption
|
|
9262
|
+
* @see getWalletOptionsCatalogue
|
|
9263
|
+
* @notInstrumented
|
|
9264
|
+
*/
|
|
9265
|
+
const resolveWalletConnectionOption = async ({ walletKey, chain }, client) => {
|
|
9266
|
+
const walletOption = (await getWalletOptionsCatalogue({ includeMobileOptions: true }, client)).find(({ key }) => key === walletKey);
|
|
9267
|
+
if (!walletOption) throw new WalletOptionNotFoundError({ walletKey });
|
|
9268
|
+
const uriConnectionStarterRegistry = getUriConnectionStarterRegistry(client);
|
|
9269
|
+
const availableOptions = walletOption.connectionOptions.filter((option) => !chain || option.chain === chain).filter((option) => {
|
|
9270
|
+
if (option.type !== "walletConnect" && option.type !== "metamaskSdkUri") return true;
|
|
9271
|
+
const starter = uriConnectionStarterRegistry.get({
|
|
9272
|
+
chain: option.chain,
|
|
9273
|
+
type: option.type
|
|
9274
|
+
});
|
|
9275
|
+
return Boolean(starter);
|
|
9276
|
+
});
|
|
9277
|
+
if (availableOptions.length === 0) throw new NoConnectionOptionAvailableError({
|
|
9278
|
+
chain,
|
|
9279
|
+
installationUrls: walletOption.installationUrls,
|
|
9280
|
+
walletKey
|
|
9281
|
+
});
|
|
9282
|
+
const availableChains = [...new Set(availableOptions.map((option) => option.chain))];
|
|
9283
|
+
if (!chain && availableChains.length > 1) throw new AmbiguousWalletChainError({
|
|
9284
|
+
chains: availableChains,
|
|
9285
|
+
walletKey
|
|
9286
|
+
});
|
|
9287
|
+
const [connectionOption] = availableOptions;
|
|
9288
|
+
return connectionOption;
|
|
9289
|
+
};
|
|
9290
|
+
|
|
9291
|
+
//#endregion
|
|
9292
|
+
//#region src/utils/getCurrentPageUrl/getCurrentPageUrl.ts
|
|
9293
|
+
/**
|
|
9294
|
+
* Returns the URL of the page the app is running in.
|
|
9295
|
+
*
|
|
9296
|
+
* @example
|
|
9297
|
+
* ```ts
|
|
9298
|
+
* const appUrl = getCurrentPageUrl() ?? 'https://mydapp.xyz';
|
|
9299
|
+
* ```
|
|
9300
|
+
*
|
|
9301
|
+
* @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.
|
|
9302
|
+
* @see isServerSideRendering
|
|
9303
|
+
* @see redirectToInAppBrowser
|
|
9304
|
+
* @notInstrumented
|
|
9305
|
+
*/
|
|
9306
|
+
const getCurrentPageUrl = () => {
|
|
9307
|
+
if (typeof window === "undefined") return null;
|
|
9308
|
+
const href = window.location?.href;
|
|
9309
|
+
if (typeof href !== "string") return null;
|
|
9310
|
+
return href;
|
|
9311
|
+
};
|
|
9312
|
+
|
|
9313
|
+
//#endregion
|
|
9314
|
+
//#region src/highLevelFunctions/connectWalletOption/connectWalletOption.ts
|
|
9315
|
+
/**
|
|
9316
|
+
* Connects to an external wallet by its wallet options catalogue key and
|
|
9317
|
+
* returns the connected wallet account.
|
|
9318
|
+
*
|
|
9319
|
+
* Picks the connection path for the wallet so the customer does not have to:
|
|
9320
|
+
* a registered wallet provider when the user has the wallet installed,
|
|
9321
|
+
* otherwise a URI pairing (WalletConnect or the MetaMask SDK), with the
|
|
9322
|
+
* pairing URI handed to `onConnectionUri` while the returned promise waits for
|
|
9323
|
+
* the user to approve on the wallet side.
|
|
9324
|
+
*
|
|
9325
|
+
* Wallets that can only be reached through their own in-app browser — no
|
|
9326
|
+
* extension, no URI pairing — resolve to a redirect instead: the wallet and
|
|
9327
|
+
* chain are handed to `handleWalletBrowserRedirect`, which leaves for that
|
|
9328
|
+
* browser with `redirectToInAppBrowser`. Without that handler, the current
|
|
9329
|
+
* page is redirected into the wallet's browser directly, so the handler is
|
|
9330
|
+
* only needed to pick a different page to come back to, or where there is no
|
|
9331
|
+
* page URL to reuse (React Native, server-side rendering). The returned
|
|
9332
|
+
* promise never settles either way, since the connection completes on the
|
|
9333
|
+
* next page load inside the wallet's browser.
|
|
9334
|
+
*
|
|
9335
|
+
* Note: This function does not verify the wallet account — use
|
|
9336
|
+
* `verifyWalletAccount` afterwards to link it to the user.
|
|
9337
|
+
*
|
|
9338
|
+
* @example
|
|
9339
|
+
* ```ts
|
|
9340
|
+
* const walletAccount = await connectWalletOption({
|
|
9341
|
+
* handleWalletBrowserRedirect: ({ chain, walletKey }) =>
|
|
9342
|
+
* redirectToInAppBrowser({ appUrl: 'https://mydapp.xyz', chain, walletKey }),
|
|
9343
|
+
* onConnectionUri: ({ uri }) => renderQrCode(uri),
|
|
9344
|
+
* walletKey: 'metamask',
|
|
9022
9345
|
* });
|
|
9023
|
-
* console.log(
|
|
9346
|
+
* console.log(walletAccount.address);
|
|
9024
9347
|
* ```
|
|
9025
9348
|
*
|
|
9026
|
-
* @param params.
|
|
9027
|
-
* @param [params.
|
|
9349
|
+
* @param params.walletKey - The wallet to connect, keyed as in the wallet options catalogue (e.g. 'metamask', 'phantom').
|
|
9350
|
+
* @param [params.chain] - The chain to connect on. Required only when the wallet resolves on more than one enabled chain.
|
|
9351
|
+
* @param [params.onConnectionUri] - Called with the pairing URI when the connection runs through a URI pairing.
|
|
9352
|
+
* @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.
|
|
9028
9353
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
9029
|
-
* @returns A promise that resolves to the connected
|
|
9030
|
-
* @
|
|
9354
|
+
* @returns A promise that resolves to the connected wallet account, or that never settles on the in-app-browser path.
|
|
9355
|
+
* @throws WalletOptionNotFoundError If no wallet option matches the key.
|
|
9356
|
+
* @throws AmbiguousWalletChainError If the wallet resolves on more than one chain and no chain was passed.
|
|
9357
|
+
* @throws NoConnectionOptionAvailableError If the wallet has no connection option this client can drive on the requested chain.
|
|
9358
|
+
* @throws ConnectionUriHandlerMissingError If the wallet resolves to a URI pairing and no onConnectionUri handler was passed.
|
|
9359
|
+
* @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.
|
|
9360
|
+
* @throws UnsafeDeeplinkUrlError If the wallet's in-app-browser URL has a scheme that can execute script.
|
|
9031
9361
|
* @see verifyWalletAccount
|
|
9362
|
+
* @see redirectToInAppBrowser
|
|
9363
|
+
* @see getWalletOptionsCatalogue
|
|
9032
9364
|
* @instrumented
|
|
9033
9365
|
*/
|
|
9034
|
-
const
|
|
9035
|
-
const
|
|
9036
|
-
|
|
9037
|
-
|
|
9038
|
-
addToDynamicWalletAccounts: false,
|
|
9039
|
-
hardwareWalletVendor,
|
|
9040
|
-
walletProviderKey
|
|
9041
|
-
}, client);
|
|
9042
|
-
await __verifyWalletAccount_wrapped({ walletAccount }, client);
|
|
9043
|
-
createVisit({
|
|
9044
|
-
authMode: AuthModeEnum.AndSign,
|
|
9045
|
-
walletAccount
|
|
9366
|
+
const connectWalletOption = async ({ walletKey, chain, handleWalletBrowserRedirect, onConnectionUri }, client = getDefaultClient()) => {
|
|
9367
|
+
const connectionOption = await resolveWalletConnectionOption({
|
|
9368
|
+
chain,
|
|
9369
|
+
walletKey
|
|
9046
9370
|
}, client);
|
|
9047
|
-
return
|
|
9048
|
-
|
|
9049
|
-
const
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9057
|
-
|
|
9371
|
+
if (connectionOption.type === "withWalletProvider") return __connectWithWalletProvider_wrapped({ walletProviderKey: connectionOption.walletProviderKey }, client);
|
|
9372
|
+
if (connectionOption.type === "inAppBrowser") {
|
|
9373
|
+
const { chain: inAppBrowserChain } = connectionOption;
|
|
9374
|
+
if (handleWalletBrowserRedirect) handleWalletBrowserRedirect({
|
|
9375
|
+
chain: inAppBrowserChain,
|
|
9376
|
+
walletKey
|
|
9377
|
+
});
|
|
9378
|
+
else {
|
|
9379
|
+
const currentPageUrl = getCurrentPageUrl();
|
|
9380
|
+
if (!currentPageUrl) throw new WalletBrowserRedirectHandlerMissingError({
|
|
9381
|
+
chain: inAppBrowserChain,
|
|
9382
|
+
walletKey
|
|
9383
|
+
});
|
|
9384
|
+
await __redirectToInAppBrowser_wrapped({
|
|
9385
|
+
appUrl: currentPageUrl,
|
|
9386
|
+
chain: inAppBrowserChain,
|
|
9387
|
+
walletKey
|
|
9388
|
+
}, client);
|
|
9058
9389
|
}
|
|
9390
|
+
return new Promise(() => void 0);
|
|
9059
9391
|
}
|
|
9392
|
+
return connectWithUriConnectionOption({
|
|
9393
|
+
addToDynamicWalletAccounts: true,
|
|
9394
|
+
connectionOption,
|
|
9395
|
+
onConnectionUri,
|
|
9396
|
+
walletKey
|
|
9397
|
+
}, client);
|
|
9398
|
+
};
|
|
9399
|
+
const __connectWalletOption_impl = connectWalletOption;
|
|
9400
|
+
const __connectWalletOption_wrapped = instrumentFunction({
|
|
9401
|
+
fn: __connectWalletOption_impl,
|
|
9402
|
+
functionName: "connectWalletOption",
|
|
9403
|
+
getCore: resolveInstrumentationCore
|
|
9060
9404
|
});
|
|
9061
9405
|
|
|
9062
9406
|
//#endregion
|
|
@@ -9278,13 +9622,7 @@ const __addNetwork_impl = addNetwork;
|
|
|
9278
9622
|
const __addNetwork_wrapped = instrumentFunction({
|
|
9279
9623
|
fn: __addNetwork_impl,
|
|
9280
9624
|
functionName: "addNetwork",
|
|
9281
|
-
getCore:
|
|
9282
|
-
try {
|
|
9283
|
-
return getCore(getDefaultClient());
|
|
9284
|
-
} catch {
|
|
9285
|
-
return;
|
|
9286
|
-
}
|
|
9287
|
-
}
|
|
9625
|
+
getCore: resolveInstrumentationCore
|
|
9288
9626
|
});
|
|
9289
9627
|
|
|
9290
9628
|
//#endregion
|
|
@@ -9486,13 +9824,7 @@ const __switchActiveNetwork_impl = switchActiveNetwork;
|
|
|
9486
9824
|
const __switchActiveNetwork_wrapped = instrumentFunction({
|
|
9487
9825
|
fn: __switchActiveNetwork_impl,
|
|
9488
9826
|
functionName: "switchActiveNetwork",
|
|
9489
|
-
getCore:
|
|
9490
|
-
try {
|
|
9491
|
-
return getCore(getDefaultClient());
|
|
9492
|
-
} catch {
|
|
9493
|
-
return;
|
|
9494
|
-
}
|
|
9495
|
-
}
|
|
9827
|
+
getCore: resolveInstrumentationCore
|
|
9496
9828
|
});
|
|
9497
9829
|
|
|
9498
9830
|
//#endregion
|
|
@@ -9585,13 +9917,7 @@ const __setSelectedWalletAccount_impl = setSelectedWalletAccount;
|
|
|
9585
9917
|
const __setSelectedWalletAccount_wrapped = instrumentFunction({
|
|
9586
9918
|
fn: __setSelectedWalletAccount_impl,
|
|
9587
9919
|
functionName: "setSelectedWalletAccount",
|
|
9588
|
-
getCore:
|
|
9589
|
-
try {
|
|
9590
|
-
return getCore(getDefaultClient());
|
|
9591
|
-
} catch {
|
|
9592
|
-
return;
|
|
9593
|
-
}
|
|
9594
|
-
}
|
|
9920
|
+
getCore: resolveInstrumentationCore
|
|
9595
9921
|
});
|
|
9596
9922
|
|
|
9597
9923
|
//#endregion
|
|
@@ -9647,116 +9973,7 @@ const __selectPrimaryWalletAccount_impl = selectPrimaryWalletAccount;
|
|
|
9647
9973
|
const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
9648
9974
|
fn: __selectPrimaryWalletAccount_impl,
|
|
9649
9975
|
functionName: "selectPrimaryWalletAccount",
|
|
9650
|
-
getCore:
|
|
9651
|
-
try {
|
|
9652
|
-
return getCore(getDefaultClient());
|
|
9653
|
-
} catch {
|
|
9654
|
-
return;
|
|
9655
|
-
}
|
|
9656
|
-
}
|
|
9657
|
-
});
|
|
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
|
-
}
|
|
9976
|
+
getCore: resolveInstrumentationCore
|
|
9760
9977
|
});
|
|
9761
9978
|
|
|
9762
9979
|
//#endregion
|
|
@@ -9829,13 +10046,7 @@ const __removeWalletAccount_impl = removeWalletAccount;
|
|
|
9829
10046
|
const __removeWalletAccount_wrapped = instrumentFunction({
|
|
9830
10047
|
fn: __removeWalletAccount_impl,
|
|
9831
10048
|
functionName: "removeWalletAccount",
|
|
9832
|
-
getCore:
|
|
9833
|
-
try {
|
|
9834
|
-
return getCore(getDefaultClient());
|
|
9835
|
-
} catch {
|
|
9836
|
-
return;
|
|
9837
|
-
}
|
|
9838
|
-
}
|
|
10049
|
+
getCore: resolveInstrumentationCore
|
|
9839
10050
|
});
|
|
9840
10051
|
|
|
9841
10052
|
//#endregion
|
|
@@ -9876,13 +10087,7 @@ const __signMessage_impl = signMessage;
|
|
|
9876
10087
|
const __signMessage_wrapped = instrumentFunction({
|
|
9877
10088
|
fn: __signMessage_impl,
|
|
9878
10089
|
functionName: "signMessage",
|
|
9879
|
-
getCore:
|
|
9880
|
-
try {
|
|
9881
|
-
return getCore(getDefaultClient());
|
|
9882
|
-
} catch {
|
|
9883
|
-
return;
|
|
9884
|
-
}
|
|
9885
|
-
}
|
|
10090
|
+
getCore: resolveInstrumentationCore
|
|
9886
10091
|
});
|
|
9887
10092
|
|
|
9888
10093
|
//#endregion
|
|
@@ -9928,13 +10133,7 @@ const __transferAmount_impl = transferAmount;
|
|
|
9928
10133
|
const __transferAmount_wrapped = instrumentFunction({
|
|
9929
10134
|
fn: __transferAmount_impl,
|
|
9930
10135
|
functionName: "transferAmount",
|
|
9931
|
-
getCore:
|
|
9932
|
-
try {
|
|
9933
|
-
return getCore(getDefaultClient());
|
|
9934
|
-
} catch {
|
|
9935
|
-
return;
|
|
9936
|
-
}
|
|
9937
|
-
}
|
|
10136
|
+
getCore: resolveInstrumentationCore
|
|
9938
10137
|
});
|
|
9939
10138
|
|
|
9940
10139
|
//#endregion
|
|
@@ -9972,13 +10171,7 @@ const __transferWalletAccount_impl = transferWalletAccount;
|
|
|
9972
10171
|
const __transferWalletAccount_wrapped = instrumentFunction({
|
|
9973
10172
|
fn: __transferWalletAccount_impl,
|
|
9974
10173
|
functionName: "transferWalletAccount",
|
|
9975
|
-
getCore:
|
|
9976
|
-
try {
|
|
9977
|
-
return getCore(getDefaultClient());
|
|
9978
|
-
} catch {
|
|
9979
|
-
return;
|
|
9980
|
-
}
|
|
9981
|
-
}
|
|
10174
|
+
getCore: resolveInstrumentationCore
|
|
9982
10175
|
});
|
|
9983
10176
|
|
|
9984
10177
|
//#endregion
|
|
@@ -10121,13 +10314,7 @@ const __claimYieldRewards_impl = claimYieldRewards;
|
|
|
10121
10314
|
const __claimYieldRewards_wrapped = instrumentFunction({
|
|
10122
10315
|
fn: __claimYieldRewards_impl,
|
|
10123
10316
|
functionName: "claimYieldRewards",
|
|
10124
|
-
getCore:
|
|
10125
|
-
try {
|
|
10126
|
-
return getCore(getDefaultClient());
|
|
10127
|
-
} catch {
|
|
10128
|
-
return;
|
|
10129
|
-
}
|
|
10130
|
-
}
|
|
10317
|
+
getCore: resolveInstrumentationCore
|
|
10131
10318
|
});
|
|
10132
10319
|
|
|
10133
10320
|
//#endregion
|
|
@@ -10179,13 +10366,7 @@ const __depositToYieldVault_impl = depositToYieldVault;
|
|
|
10179
10366
|
const __depositToYieldVault_wrapped = instrumentFunction({
|
|
10180
10367
|
fn: __depositToYieldVault_impl,
|
|
10181
10368
|
functionName: "depositToYieldVault",
|
|
10182
|
-
getCore:
|
|
10183
|
-
try {
|
|
10184
|
-
return getCore(getDefaultClient());
|
|
10185
|
-
} catch {
|
|
10186
|
-
return;
|
|
10187
|
-
}
|
|
10188
|
-
}
|
|
10369
|
+
getCore: resolveInstrumentationCore
|
|
10189
10370
|
});
|
|
10190
10371
|
|
|
10191
10372
|
//#endregion
|
|
@@ -10351,79 +10532,9 @@ const __withdrawFromYieldVault_impl = withdrawFromYieldVault;
|
|
|
10351
10532
|
const __withdrawFromYieldVault_wrapped = instrumentFunction({
|
|
10352
10533
|
fn: __withdrawFromYieldVault_impl,
|
|
10353
10534
|
functionName: "withdrawFromYieldVault",
|
|
10354
|
-
getCore:
|
|
10355
|
-
try {
|
|
10356
|
-
return getCore(getDefaultClient());
|
|
10357
|
-
} catch {
|
|
10358
|
-
return;
|
|
10359
|
-
}
|
|
10360
|
-
}
|
|
10535
|
+
getCore: resolveInstrumentationCore
|
|
10361
10536
|
});
|
|
10362
10537
|
|
|
10363
|
-
//#endregion
|
|
10364
|
-
//#region src/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.ts
|
|
10365
|
-
/**
|
|
10366
|
-
* Appends a wallet connection URI to a deeplink URL.
|
|
10367
|
-
*
|
|
10368
|
-
* Generic across URI-deeplink connection options — works for both
|
|
10369
|
-
* WalletConnect pairing URIs and MetaMask SDK URIs. Determines the
|
|
10370
|
-
* appropriate query parameter separator based on whether the deeplink
|
|
10371
|
-
* already contains query parameters.
|
|
10372
|
-
*
|
|
10373
|
-
* @param params.deeplinkUrl - The base deeplink URL (e.g., `walletapp://wc` or `walletapp://wc?param=value`).
|
|
10374
|
-
* @param params.connectionUri - The connection URI to append.
|
|
10375
|
-
* @returns The deeplink URL with the connection URI appended as a query parameter.
|
|
10376
|
-
*
|
|
10377
|
-
* @example
|
|
10378
|
-
* ```ts
|
|
10379
|
-
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc', connectionUri: 'wc:123-456' })
|
|
10380
|
-
* // Returns: 'walletapp://wc?uri=wc%3A123-456'
|
|
10381
|
-
*
|
|
10382
|
-
* appendConnectionUriToDeeplink({ deeplinkUrl: 'walletapp://wc?param=value', connectionUri: 'wc:123-456' })
|
|
10383
|
-
* // Returns: 'walletapp://wc?param=value&uri=wc%3A123-456'
|
|
10384
|
-
* ```
|
|
10385
|
-
* @notInstrumented
|
|
10386
|
-
*/
|
|
10387
|
-
const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
|
|
10388
|
-
const url = new URL(deeplinkUrl);
|
|
10389
|
-
url.searchParams.set("uri", connectionUri);
|
|
10390
|
-
return url.href;
|
|
10391
|
-
};
|
|
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
|
-
|
|
10427
10538
|
//#endregion
|
|
10428
10539
|
//#region src/utils/parseUserAgent/parseUserAgent.ts
|
|
10429
10540
|
const browserMatchers = [
|
|
@@ -10505,5 +10616,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
10505
10616
|
assertPackageVersion(name, version);
|
|
10506
10617
|
|
|
10507
10618
|
//#endregion
|
|
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 };
|
|
10619
|
+
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_wrapped as getCoinbaseAccounts, __getCoinbaseBuyUrl_wrapped as getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, getElevatedAccessToken, getFlow, getFlowQuote, __getGoogleDriveBackupReadiness_wrapped as getGoogleDriveBackupReadiness, getInstallationLinkForCurrentPlatform, __getKrakenAccounts_wrapped as getKrakenAccounts, __getKrakenWhitelistedAddresses_wrapped as 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, isWalletExtensionInstalled, 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 };
|
|
10509
10620
|
//# sourceMappingURL=index.native.esm.js.map
|