@dynamic-labs-sdk/client 0.26.9 → 0.26.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{InvalidParamError-0lP4zZBe.esm.js → InvalidParamError-De4xrOs4.esm.js} +17 -101
- package/dist/InvalidParamError-De4xrOs4.esm.js.map +1 -0
- package/dist/{InvalidParamError-CY4JGkjq.native.esm.js → InvalidParamError-DfGaCYmW.native.esm.js} +17 -101
- package/dist/InvalidParamError-DfGaCYmW.native.esm.js.map +1 -0
- package/dist/{InvalidParamError-Cu4kK02f.cjs → InvalidParamError-XWDgGlk3.cjs} +43 -127
- package/dist/InvalidParamError-XWDgGlk3.cjs.map +1 -0
- package/dist/{NotWaasWalletAccountError-BAD01hkG.esm.js → NotWaasWalletAccountError-Bws_qXec.native.esm.js} +5 -5
- package/dist/{NotWaasWalletAccountError-DYuQuYeI.native.esm.js.map → NotWaasWalletAccountError-Bws_qXec.native.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-DYuQuYeI.native.esm.js → NotWaasWalletAccountError-CdAul2Xh.esm.js} +5 -5
- package/dist/{NotWaasWalletAccountError-BAD01hkG.esm.js.map → NotWaasWalletAccountError-CdAul2Xh.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-CWKsiVqV.cjs → NotWaasWalletAccountError-rJzT_0wz.cjs} +5 -5
- package/dist/{NotWaasWalletAccountError-CWKsiVqV.cjs.map → NotWaasWalletAccountError-rJzT_0wz.cjs.map} +1 -1
- package/dist/core.cjs +53 -113
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +16 -76
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +16 -76
- package/dist/core.native.esm.js.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-VDuMPEtz.cjs → getNetworkProviderFromNetworkId-C_6K_daH.cjs} +110 -362
- package/dist/getNetworkProviderFromNetworkId-C_6K_daH.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-D1mT7AfE.esm.js → getNetworkProviderFromNetworkId-Cqzo1MhF.esm.js} +41 -293
- package/dist/getNetworkProviderFromNetworkId-Cqzo1MhF.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-Cjj23n1Y.native.esm.js → getNetworkProviderFromNetworkId-Dz1Wd9-n.native.esm.js} +41 -293
- package/dist/getNetworkProviderFromNetworkId-Dz1Wd9-n.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-qeRsJErq.cjs → getSignedSessionId-B2YC9266.cjs} +10 -34
- package/dist/getSignedSessionId-B2YC9266.cjs.map +1 -0
- package/dist/{getSignedSessionId-DQr-WJ3a.esm.js → getSignedSessionId-D-G950gE.native.esm.js} +7 -31
- package/dist/getSignedSessionId-D-G950gE.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-BGFoe3gh.native.esm.js → getSignedSessionId-G9BPBkMb.esm.js} +7 -31
- package/dist/getSignedSessionId-G9BPBkMb.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-DEkVcH8j.esm.js → getVerifiedCredentialForWalletAccount-DqXnLSqq.esm.js} +19 -127
- package/dist/getVerifiedCredentialForWalletAccount-DqXnLSqq.esm.js.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-CjPzTFHz.cjs → getVerifiedCredentialForWalletAccount-SS1WQ2i3.cjs} +67 -175
- package/dist/getVerifiedCredentialForWalletAccount-SS1WQ2i3.cjs.map +1 -0
- package/dist/{getVerifiedCredentialForWalletAccount-BCPvaJ1V.native.esm.js → getVerifiedCredentialForWalletAccount-a1WXUW0u.native.esm.js} +19 -127
- package/dist/getVerifiedCredentialForWalletAccount-a1WXUW0u.native.esm.js.map +1 -0
- package/dist/index.cjs +203 -635
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +161 -593
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +156 -588
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-CTghrtq8.esm.js → isMfaRequiredForAction-CPlDnHuj.esm.js} +6 -18
- package/dist/isMfaRequiredForAction-CPlDnHuj.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-qSv2yrfd.cjs → isMfaRequiredForAction-CYVZ_XGq.cjs} +7 -19
- package/dist/isMfaRequiredForAction-CYVZ_XGq.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-DaZoGOB-.native.esm.js → isMfaRequiredForAction-CwUE98S3.native.esm.js} +6 -18
- package/dist/isMfaRequiredForAction-CwUE98S3.native.esm.js.map +1 -0
- package/dist/modules/apiClient/createApiClient.d.ts +1 -1
- package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts +1 -1
- package/dist/modules/apiClient/utils/deviceSignatureHeadersMiddleware/createDeviceSignatureHeadersMiddleware.d.ts.map +1 -1
- package/dist/modules/auth/createVisit/createVisit.d.ts +1 -1
- package/dist/modules/auth/createVisit/createVisit.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/getPasskeys/getPasskeys.d.ts +1 -1
- package/dist/modules/auth/social/getUserSocialAccounts/getUserSocialAccounts.d.ts +1 -1
- package/dist/modules/auth/social/oauth/detectOAuthRedirect/detectOAuthRedirect.d.ts +1 -1
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts +1 -1
- package/dist/modules/auth/updateAuthFromVerifyResponse/updateAuthFromVerifyResponse.d.ts.map +1 -1
- package/dist/modules/balances/getBalances/getBalances.d.ts +1 -1
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +1 -1
- package/dist/modules/captcha/consumeCaptchaToken/consumeCaptchaToken.d.ts +1 -1
- package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +1 -1
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +1 -1
- package/dist/modules/clientEvents/clientEvents.d.ts +3 -3
- package/dist/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.d.ts +1 -1
- package/dist/modules/deviceRegistration/getDeviceRegistrationTokenFromUrl/getDeviceRegistrationTokenFromUrl.d.ts +1 -1
- package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts +1 -1
- package/dist/modules/deviceRegistration/getDeviceSigner/getDeviceSigner.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts +1 -1
- package/dist/modules/deviceRegistration/getHeadersForNonceSignedByDeviceSigners/getHeadersForNonceSignedByDeviceSigners.d.ts.map +1 -1
- package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts +1 -1
- package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
- package/dist/modules/extension/registerExtension/registerExtension.d.ts +1 -1
- package/dist/modules/funding/coinbase/addCoinbaseOnrampOrderEventListener/addCoinbaseOnrampOrderEventListener.d.ts +1 -1
- package/dist/modules/funding/coinbase/getCoinbaseBuyUrl/getCoinbaseBuyUrl.d.ts +1 -1
- package/dist/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.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/initializeClient/waitForClientInitialized/waitForClientInitialized.d.ts +1 -1
- package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts +1 -1
- package/dist/modules/initializeClient/waitForProjectSettings/waitForProjectSettings.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getWalletConnectCatalog.d.ts +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalogWalletByWalletProviderKey/getWalletConnectCatalogWalletByWalletProviderKey.d.ts +1 -1
- package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts +1 -1
- package/dist/modules/mfa/consumeMfaTokenIfRequiredForAction/consumeMfaTokenIfRequiredForAction.d.ts.map +1 -1
- package/dist/modules/mfa/getMfaDevices/getMfaDevices.d.ts +1 -1
- package/dist/modules/mfa/getMfaMethods/getMfaMethods.d.ts +1 -1
- package/dist/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.d.ts +1 -1
- package/dist/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.d.ts +1 -1
- package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts +1 -1
- package/dist/modules/sessionKeys/generateSessionKeys/generateSessionKeys.d.ts.map +1 -1
- package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts +1 -1
- package/dist/modules/sessionKeys/getSessionKeys/getSessionKeys.d.ts.map +1 -1
- package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts +1 -1
- package/dist/modules/sessionKeys/getSignedSessionId/getSignedSessionId.d.ts.map +1 -1
- package/dist/modules/swap/getSwapQuote/getSwapQuote.d.ts +1 -1
- package/dist/modules/swap/getSwapStatus/getSwapStatus.d.ts +1 -1
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts +1 -1
- package/dist/modules/wallets/getConnectedAddresses/getConnectedAddresses.d.ts +1 -1
- package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletAccounts/getWalletAccounts.d.ts +1 -1
- package/dist/modules/wallets/getWalletProviders/getWalletProviders.d.ts +1 -1
- package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts +1 -1
- package/dist/modules/wallets/networks/createBaseNetworkProvider/createBaseNetworkProvider.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getActiveNetworkData/getActiveNetworkData.d.ts +1 -1
- package/dist/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.d.ts +1 -1
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +1 -1
- package/dist/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.d.ts +1 -1
- package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts +1 -1
- package/dist/modules/wallets/networks/getNetworkDataForNetworkId/getNetworkDataForNetworkId.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts +1 -1
- package/dist/modules/wallets/networks/getNetworkProviderFromNetworkId/getNetworkProviderFromNetworkId.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNetworkProviders/getNetworkProviders.d.ts +1 -1
- package/dist/modules/wallets/networks/getNetworksData/getNetworksData.d.ts +1 -1
- package/dist/modules/wallets/networks/getTransactionHistory/getTransactionHistory.d.ts +1 -1
- package/dist/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/unverifiedWalletAccounts/removeUnverifiedWalletAccount/removeUnverifiedWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/unverifiedWalletAccounts/setUnverifiedWalletAccounts/setUnverifiedWalletAccounts.d.ts +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts +1 -1
- package/dist/modules/wallets/utils/getSignInMessage/createSignInMessageStatement/createSignInMessageStatement.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/utils/getVerifiedCredentialForWalletAccount/getVerifiedCredentialForWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts +1 -1
- package/dist/modules/wallets/utils/getWalletProviderFromWalletAccount/getWalletProviderFromWalletAccount.d.ts.map +1 -1
- package/dist/modules/wallets/verifyMessageSignatureOwnership/verifyMessageSignatureOwnership.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/defaultImplementations/getActiveNetworkIdFromLastKnownRegistry/getActiveNetworkIdFromLastKnownRegistry.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/defaultImplementations/switchActiveNetworkInLastKnownRegistry/switchActiveNetworkInLastKnownRegistry.d.ts.map +1 -1
- package/dist/modules/wallets/walletProvider/events/createWalletProviderEventEmitter/createWalletProviderEventEmitter.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/events/offWalletProviderEvent/offWalletProviderEvent.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts +1 -1
- package/dist/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.d.ts.map +1 -1
- package/dist/services/crossTabBroadcast/createCrossTabBroadcast/createCrossTabBroadcast.d.ts +1 -1
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts +1 -1
- package/dist/services/keychain/createKeychainService/createKeychainService.d.ts.map +1 -1
- package/dist/services/logger/createLogger/createLogger.d.ts +1 -1
- package/dist/services/realtime/createRealtimeChannelSchema/createRealtimeChannelSchema.d.ts +1 -1
- package/dist/services/realtime/createRealtimeService/createRealtimeService.d.ts +1 -1
- package/dist/services/runtimeServices/createRuntimeServiceAccessKey/createRuntimeServiceAccessKey.d.ts +1 -1
- package/dist/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.d.ts +1 -1
- package/dist/services/storage/createStorage/createStorage.d.ts +1 -1
- package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts +1 -1
- package/dist/services/storage/createStorageKeySchema/createStorageKeySchema.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/deferredPromise/createDeferredPromise.d.ts +1 -1
- package/dist/utils/deferredPromise/createDeferredPromise.d.ts.map +1 -1
- package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts +1 -1
- package/dist/utils/getChainFromVerifiedCredentialChain/getChainFromVerifiedCredentialChain.d.ts.map +1 -1
- package/dist/utils/getNonce/getNonce.d.ts +1 -1
- package/dist/utils/observable/subscribeWithSelector/subscribeWithSelector.d.ts +1 -1
- package/dist/waas.cjs +7 -7
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +6 -6
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +6 -6
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +26 -26
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +25 -25
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +25 -25
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/InvalidParamError-0lP4zZBe.esm.js.map +0 -1
- package/dist/InvalidParamError-CY4JGkjq.native.esm.js.map +0 -1
- package/dist/InvalidParamError-Cu4kK02f.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-Cjj23n1Y.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-D1mT7AfE.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-VDuMPEtz.cjs.map +0 -1
- package/dist/getSignedSessionId-BGFoe3gh.native.esm.js.map +0 -1
- package/dist/getSignedSessionId-DQr-WJ3a.esm.js.map +0 -1
- package/dist/getSignedSessionId-qeRsJErq.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-BCPvaJ1V.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-CjPzTFHz.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DEkVcH8j.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-CTghrtq8.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-DaZoGOB-.native.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-qSv2yrfd.cjs.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as extractSessionId, B as name, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as getDefaultClient, I as setDefaultClient, O as DEFAULT_PII_FIELDS, P as NONCE_POOL_SIZE, R as BaseError, T as ValueMustBeDefinedError, V as version, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as
|
|
2
|
-
import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as
|
|
3
|
-
import { A as
|
|
4
|
-
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-
|
|
5
|
-
import { n as
|
|
1
|
+
import { A as extractSessionId, B as name, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as getDefaultClient, I as setDefaultClient, O as DEFAULT_PII_FIELDS, P as NONCE_POOL_SIZE, R as BaseError, T as ValueMustBeDefinedError, V as version, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as getNonce, j as randomString, k as getUserAgent, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as MfaInvalidOtpError, w as assertDefined, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-DfGaCYmW.native.esm.js";
|
|
2
|
+
import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as createStorage, D as CannotTrackError, F as getBuffer, G as subscribeWithSelector, H as createLocalStorageAdapter, I as __logoutWithReason_wrapped, K as isEqualShallow, L as generateSessionKeys, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as fetchProjectSettings, S as createKeychainService, T as createCrossTabBroadcast, U as isSignedIn, W as retryOnFail, _ as MethodNotImplementedError, a as updateWalletProviderKeysForVerifiedCredentials, b as getKeychainIndexedDBName, c as createSignInMessageStatement, d as createVisit, f as consumeCaptchaToken, g as isCaptchaRequired, h as __setCaptchaToken_wrapped, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as formatSignInMessage, m as createRealtimeChannelSchema, o as verifyMessageSignatureOwnership, p as hasExtension, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as WalletAlreadyLinkedToAnotherUserError, w as createLogger, x as createRealtimeService, y as NoNetworkProvidersError, z as createStorageKeySchema } from "./getNetworkProviderFromNetworkId-Dz1Wd9-n.native.esm.js";
|
|
3
|
+
import { A as onceEvent, C as formatWalletAccountId, D as emitEvent, O as offEvent, T as splitWalletProviderKey, a as parseElevatedAccessToken, b as getWalletAccounts, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, h as getWalletProviderFromWalletAccount, i as upsertElevatedAccessToken, k as onEvent, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as emitWalletAccountsChangedEvent, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, w as normalizeAddress, y as NoWalletProviderFoundError } from "./getVerifiedCredentialForWalletAccount-a1WXUW0u.native.esm.js";
|
|
4
|
+
import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-Bws_qXec.native.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-CwUE98S3.native.esm.js";
|
|
6
6
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
7
7
|
import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, TokenScope, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
8
8
|
import * as z from "zod/mini";
|
|
@@ -82,7 +82,7 @@ const setLongTimeout = ({ callback, delay }) => {
|
|
|
82
82
|
const initializeAuth = (client) => {
|
|
83
83
|
const core = getCore(client);
|
|
84
84
|
let clearExpirationTimeout = null;
|
|
85
|
-
const onChangeExpiration =
|
|
85
|
+
const onChangeExpiration = subscribeWithSelector(core.state, (state) => state.sessionExpiresAt);
|
|
86
86
|
const checkExpiration = () => {
|
|
87
87
|
const expiration = core.state.get().sessionExpiresAt;
|
|
88
88
|
clearExpirationTimeout?.();
|
|
@@ -155,7 +155,7 @@ const walletProviderKeyMapSchema = z.record(z.string(), z.string());
|
|
|
155
155
|
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region src/modules/storageSync/schema.ts
|
|
158
|
-
const stateStorageKeySchema =
|
|
158
|
+
const stateStorageKeySchema = createStorageKeySchema({
|
|
159
159
|
key: "state",
|
|
160
160
|
schema: z.object({
|
|
161
161
|
apiVersion: z.string(),
|
|
@@ -167,7 +167,7 @@ const stateStorageKeySchema = __createStorageKeySchema_wrapped({
|
|
|
167
167
|
walletProviderKeyMap: walletProviderKeyMapSchema
|
|
168
168
|
})
|
|
169
169
|
});
|
|
170
|
-
const sessionStorageKeySchema =
|
|
170
|
+
const sessionStorageKeySchema = createStorageKeySchema({
|
|
171
171
|
config: { storageTier: "secure" },
|
|
172
172
|
key: "session",
|
|
173
173
|
schema: z.object({
|
|
@@ -362,7 +362,7 @@ const initializeStorageSync = async (client) => {
|
|
|
362
362
|
*/
|
|
363
363
|
const refreshUser = async (client = getDefaultClient()) => {
|
|
364
364
|
const core = getCore(client);
|
|
365
|
-
const apiClient =
|
|
365
|
+
const apiClient = createApiClient({}, client);
|
|
366
366
|
const previousState = { ...core.state.get() };
|
|
367
367
|
const user = await apiClient.getAuthenticatedUser({ environmentId: core.environmentId });
|
|
368
368
|
core.state.set({ user });
|
|
@@ -430,7 +430,7 @@ const initializeClient = async (client = getDefaultClient()) => {
|
|
|
430
430
|
}).catch(() => __logoutWithReason_wrapped({ reason: "keychain-migration-failed" }, client));
|
|
431
431
|
if (core.state.get().sessionKeys && !await core.keychain.hasKey("session")) await __logoutWithReason_wrapped({ reason: "keychain-key-missing" }, client);
|
|
432
432
|
}).then(async () => {
|
|
433
|
-
if (!core.state.get().projectSettings) await
|
|
433
|
+
if (!core.state.get().projectSettings) await fetchProjectSettings(client);
|
|
434
434
|
});
|
|
435
435
|
fetchProjectSettingsPromise.then(() => prefetchNoncesIfNeeded(client)).catch((error) => {
|
|
436
436
|
core.logger.error("Failed to prefetch nonces:", error);
|
|
@@ -439,7 +439,7 @@ const initializeClient = async (client = getDefaultClient()) => {
|
|
|
439
439
|
* Generate session keys if they don't exist
|
|
440
440
|
*/
|
|
441
441
|
const generateSessionKeysPromise = fetchProjectSettingsPromise.then(async () => {
|
|
442
|
-
if (!core.state.get().sessionKeys) await
|
|
442
|
+
if (!core.state.get().sessionKeys) await generateSessionKeys(client);
|
|
443
443
|
});
|
|
444
444
|
/**
|
|
445
445
|
* Refresh user state on initialization when cookie is enabled.
|
|
@@ -536,7 +536,7 @@ const createAsyncTrack = () => {
|
|
|
536
536
|
*/
|
|
537
537
|
let isTrackEnabled = true;
|
|
538
538
|
const eventEmitter = new EventEmitter$1();
|
|
539
|
-
const allSettledPromise =
|
|
539
|
+
const allSettledPromise = createDeferredPromise();
|
|
540
540
|
const tracker = /* @__PURE__ */ new Map();
|
|
541
541
|
/**
|
|
542
542
|
* Checks if all processes are initialized and resolves the main promise if they are.
|
|
@@ -862,7 +862,7 @@ const createPasskeyService = (_params) => ({
|
|
|
862
862
|
const createDebouncedMutex = () => {
|
|
863
863
|
const mutexState = /* @__PURE__ */ new Map();
|
|
864
864
|
return async ({ lockKey, callback, debounceTime = 0 }) => {
|
|
865
|
-
const resolutionPromise =
|
|
865
|
+
const resolutionPromise = createDeferredPromise();
|
|
866
866
|
if (!mutexState.has(lockKey)) mutexState.set(lockKey, {
|
|
867
867
|
nextCallback: null,
|
|
868
868
|
queuePromise: Promise.resolve(),
|
|
@@ -1014,10 +1014,10 @@ const getInitialState = () => ({
|
|
|
1014
1014
|
*/
|
|
1015
1015
|
const createCore = (config) => {
|
|
1016
1016
|
const apiBaseUrl = config.coreConfig?.apiBaseUrl ?? DEFAULT_API_BASE_URL;
|
|
1017
|
-
const logger = config.coreConfig?.logger ??
|
|
1018
|
-
const storage =
|
|
1017
|
+
const logger = config.coreConfig?.logger ?? createLogger({ level: config.logLevel });
|
|
1018
|
+
const storage = createStorage({
|
|
1019
1019
|
prefix: `dynamic_${config.environmentId}`,
|
|
1020
|
-
storageAdapter: config.coreConfig?.storageAdapter ??
|
|
1020
|
+
storageAdapter: config.coreConfig?.storageAdapter ?? createLocalStorageAdapter()
|
|
1021
1021
|
});
|
|
1022
1022
|
const fetch = config.coreConfig?.fetch ?? createWebFetch();
|
|
1023
1023
|
const openDeeplink = config.coreConfig?.openDeeplink ?? createWebDeeplinkOpener();
|
|
@@ -1048,12 +1048,12 @@ const createCore = (config) => {
|
|
|
1048
1048
|
universalLink: config.metadata?.universalLink ?? (isServerSideRendering() ? void 0 : window.location.origin)
|
|
1049
1049
|
};
|
|
1050
1050
|
const passkey = config.coreConfig?.passkey ?? createPasskeyService({ metadata });
|
|
1051
|
-
const realtime = config.coreConfig?.realtime ??
|
|
1051
|
+
const realtime = config.coreConfig?.realtime ?? createRealtimeService();
|
|
1052
1052
|
const deviceSigner = config.coreConfig?.deviceSigner;
|
|
1053
1053
|
const keychain = config.coreConfig?.keychain ?? createKeychainService({ dbName: getKeychainIndexedDBName({ environmentId: config.environmentId }) });
|
|
1054
1054
|
return {
|
|
1055
1055
|
apiBaseUrl,
|
|
1056
|
-
crossTabBroadcast: config.coreConfig?.crossTabBroadcast ??
|
|
1056
|
+
crossTabBroadcast: config.coreConfig?.crossTabBroadcast ?? createCrossTabBroadcast({ channelName: `dynamic_${config.environmentId}_broadcast` }),
|
|
1057
1057
|
debouncedMutex,
|
|
1058
1058
|
deviceSigner,
|
|
1059
1059
|
environmentId: config.environmentId,
|
|
@@ -1543,7 +1543,7 @@ const checkStepUpAuth = async ({ scope }, client = getDefaultClient()) => {
|
|
|
1543
1543
|
};
|
|
1544
1544
|
try {
|
|
1545
1545
|
const core = getCore(client);
|
|
1546
|
-
const response = await
|
|
1546
|
+
const response = await createApiClient({}, client).stepUpCheck({
|
|
1547
1547
|
environmentId: core.environmentId,
|
|
1548
1548
|
stepUpCheckRequest: { scope }
|
|
1549
1549
|
});
|
|
@@ -1588,7 +1588,7 @@ const __checkStepUpAuth_wrapped = instrumentFunction({
|
|
|
1588
1588
|
*/
|
|
1589
1589
|
const requestExternalAuthElevatedToken = async ({ externalJwt }, client = getDefaultClient()) => {
|
|
1590
1590
|
const core = getCore(client);
|
|
1591
|
-
const response = await
|
|
1591
|
+
const response = await createApiClient({}, client).externalAuthVerify({
|
|
1592
1592
|
environmentId: core.environmentId,
|
|
1593
1593
|
externalAuthSigninRequest: { jwt: externalJwt }
|
|
1594
1594
|
});
|
|
@@ -1631,14 +1631,14 @@ const __requestExternalAuthElevatedToken_wrapped = instrumentFunction({
|
|
|
1631
1631
|
*/
|
|
1632
1632
|
const signInWithExternalJwt = async ({ externalJwt, sessionPublicKey } = {}, client = getDefaultClient()) => {
|
|
1633
1633
|
const core = getCore(client);
|
|
1634
|
-
const response = await
|
|
1634
|
+
const response = await createApiClient({}, client).externalAuthSignin({
|
|
1635
1635
|
environmentId: core.environmentId,
|
|
1636
1636
|
externalAuthSigninRequest: {
|
|
1637
1637
|
jwt: externalJwt,
|
|
1638
1638
|
sessionPublicKey
|
|
1639
1639
|
}
|
|
1640
1640
|
});
|
|
1641
|
-
|
|
1641
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
1642
1642
|
return response;
|
|
1643
1643
|
};
|
|
1644
1644
|
const __signInWithExternalJwt_impl = signInWithExternalJwt;
|
|
@@ -1686,7 +1686,7 @@ const logout = async (client = getDefaultClient()) => {
|
|
|
1686
1686
|
*/
|
|
1687
1687
|
const deletePasskey = async ({ passkeyId }, client = getDefaultClient()) => {
|
|
1688
1688
|
const core = getCore(client);
|
|
1689
|
-
await
|
|
1689
|
+
await createApiClient({
|
|
1690
1690
|
elevatedAccessTokenScope: TokenScope.Credentialunlink,
|
|
1691
1691
|
includeMfaToken: true
|
|
1692
1692
|
}, client).deletePasskey({
|
|
@@ -1717,31 +1717,19 @@ const __deletePasskey_wrapped = instrumentFunction({
|
|
|
1717
1717
|
*
|
|
1718
1718
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1719
1719
|
* @returns A promise that resolves to an array of the user's registered passkeys.
|
|
1720
|
-
* @instrumented
|
|
1720
|
+
* @not-instrumented
|
|
1721
1721
|
*/
|
|
1722
1722
|
const getPasskeys = async (client = getDefaultClient()) => {
|
|
1723
1723
|
const core = getCore(client);
|
|
1724
|
-
return (await
|
|
1724
|
+
return (await createApiClient({}, client).getUserPasskeys({ environmentId: core.environmentId })).passkeys;
|
|
1725
1725
|
};
|
|
1726
|
-
const __getPasskeys_impl = getPasskeys;
|
|
1727
|
-
const __getPasskeys_wrapped = instrumentFunction({
|
|
1728
|
-
fn: __getPasskeys_impl,
|
|
1729
|
-
functionName: "getPasskeys",
|
|
1730
|
-
getCore: () => {
|
|
1731
|
-
try {
|
|
1732
|
-
return getCore(getDefaultClient());
|
|
1733
|
-
} catch {
|
|
1734
|
-
return;
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
});
|
|
1738
1726
|
|
|
1739
1727
|
//#endregion
|
|
1740
1728
|
//#region src/modules/auth/passkeys/getPasskeyRegistrationOptions/getPasskeyRegistrationOptions.ts
|
|
1741
1729
|
/** @not-instrumented */
|
|
1742
1730
|
const getPasskeyRegistrationOptions = async (client) => {
|
|
1743
1731
|
const core = getCore(client);
|
|
1744
|
-
return await
|
|
1732
|
+
return await createApiClient({}, client).getPasskeyRegistrationOptions({ environmentId: core.environmentId });
|
|
1745
1733
|
};
|
|
1746
1734
|
|
|
1747
1735
|
//#endregion
|
|
@@ -1749,7 +1737,7 @@ const getPasskeyRegistrationOptions = async (client) => {
|
|
|
1749
1737
|
/** @not-instrumented */
|
|
1750
1738
|
const serverRegisterPasskey = async ({ registration, createMfaToken }, client) => {
|
|
1751
1739
|
const core = getCore(client);
|
|
1752
|
-
return await
|
|
1740
|
+
return await createApiClient({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerPasskey({
|
|
1753
1741
|
environmentId: core.environmentId,
|
|
1754
1742
|
passkeyRegisterRequest: {
|
|
1755
1743
|
...registration,
|
|
@@ -1785,7 +1773,7 @@ const registerPasskey = async ({ createMfaToken } = {}, client = getDefaultClien
|
|
|
1785
1773
|
createMfaToken,
|
|
1786
1774
|
registration: await core.passkey.register({ optionsJSON: options })
|
|
1787
1775
|
}, client);
|
|
1788
|
-
|
|
1776
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
1789
1777
|
return response;
|
|
1790
1778
|
};
|
|
1791
1779
|
const __registerPasskey_impl = registerPasskey;
|
|
@@ -1806,7 +1794,7 @@ const __registerPasskey_wrapped = instrumentFunction({
|
|
|
1806
1794
|
/** @not-instrumented */
|
|
1807
1795
|
const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {}, client) => {
|
|
1808
1796
|
const core = getCore(client);
|
|
1809
|
-
return await
|
|
1797
|
+
return await createApiClient({}, client).getPasskeyAuthenticationSigninOptions({
|
|
1810
1798
|
environmentId: core.environmentId,
|
|
1811
1799
|
relatedOriginRpId
|
|
1812
1800
|
});
|
|
@@ -1817,7 +1805,7 @@ const getPasskeyAuthenticationSignInOptions = async ({ relatedOriginRpId } = {},
|
|
|
1817
1805
|
/** @not-instrumented */
|
|
1818
1806
|
const serverSigninPasskey = async ({ authentication, createMfaToken }, client) => {
|
|
1819
1807
|
const core = getCore(client);
|
|
1820
|
-
return await
|
|
1808
|
+
return await createApiClient({}, client).signinWithPasskey({
|
|
1821
1809
|
environmentId: core.environmentId,
|
|
1822
1810
|
passkeyAuthRequest: {
|
|
1823
1811
|
...authentication,
|
|
@@ -1849,7 +1837,7 @@ const signInWithPasskey = async ({ relatedOriginRpId } = {}, client = getDefault
|
|
|
1849
1837
|
if (!core.passkey.isSupported()) throw new NoWebAuthNSupportError();
|
|
1850
1838
|
const formattedOptions = { ...await getPasskeyAuthenticationSignInOptions({ relatedOriginRpId }, client) };
|
|
1851
1839
|
const response = await serverSigninPasskey({ authentication: await core.passkey.authenticate({ optionsJSON: formattedOptions }) }, client);
|
|
1852
|
-
|
|
1840
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
1853
1841
|
return response;
|
|
1854
1842
|
};
|
|
1855
1843
|
const __signInWithPasskey_impl = signInWithPasskey;
|
|
@@ -1872,7 +1860,7 @@ const __signInWithPasskey_wrapped = instrumentFunction({
|
|
|
1872
1860
|
*
|
|
1873
1861
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1874
1862
|
* @returns An array of `SocialAccount` objects associated with the user.
|
|
1875
|
-
* @instrumented
|
|
1863
|
+
* @not-instrumented
|
|
1876
1864
|
*/
|
|
1877
1865
|
const getUserSocialAccounts = (client = getDefaultClient()) => {
|
|
1878
1866
|
const { user } = client;
|
|
@@ -1887,18 +1875,6 @@ const getUserSocialAccounts = (client = getDefaultClient()) => {
|
|
|
1887
1875
|
verifiedCredentialId: credential.id
|
|
1888
1876
|
}));
|
|
1889
1877
|
};
|
|
1890
|
-
const __getUserSocialAccounts_impl = getUserSocialAccounts;
|
|
1891
|
-
const __getUserSocialAccounts_wrapped = instrumentFunction({
|
|
1892
|
-
fn: __getUserSocialAccounts_impl,
|
|
1893
|
-
functionName: "getUserSocialAccounts",
|
|
1894
|
-
getCore: () => {
|
|
1895
|
-
try {
|
|
1896
|
-
return getCore(getDefaultClient());
|
|
1897
|
-
} catch {
|
|
1898
|
-
return;
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
});
|
|
1902
1878
|
|
|
1903
1879
|
//#endregion
|
|
1904
1880
|
//#region src/modules/auth/social/oauth/signInWithSocialRedirect/signInWithSocialRedirect.native.ts
|
|
@@ -1933,23 +1909,11 @@ const __signInWithSocialRedirect_wrapped = instrumentFunction({
|
|
|
1933
1909
|
* flow itself is not supported on native, so there is nothing to detect.
|
|
1934
1910
|
*
|
|
1935
1911
|
* @throws MethodNotImplementedError Always on React Native.
|
|
1936
|
-
* @instrumented
|
|
1912
|
+
* @not-instrumented
|
|
1937
1913
|
*/
|
|
1938
1914
|
const detectSocialRedirectUrl = async ({ url }, client = getDefaultClient()) => {
|
|
1939
1915
|
throw new MethodNotImplementedError("detectSocialRedirectUrl");
|
|
1940
1916
|
};
|
|
1941
|
-
const __detectSocialRedirectUrl_impl = detectSocialRedirectUrl;
|
|
1942
|
-
const __detectSocialRedirectUrl_wrapped = instrumentFunction({
|
|
1943
|
-
fn: __detectSocialRedirectUrl_impl,
|
|
1944
|
-
functionName: "detectSocialRedirectUrl",
|
|
1945
|
-
getCore: () => {
|
|
1946
|
-
try {
|
|
1947
|
-
return getCore(getDefaultClient());
|
|
1948
|
-
} catch {
|
|
1949
|
-
return;
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1952
|
-
});
|
|
1953
1917
|
|
|
1954
1918
|
//#endregion
|
|
1955
1919
|
//#region src/modules/auth/social/oauth/completeSocialRedirect/completeSocialRedirect.native.ts
|
|
@@ -2027,21 +1991,9 @@ const __completeSocialAuthentication_wrapped = instrumentFunction({
|
|
|
2027
1991
|
* @deprecated Renamed to {@link detectSocialRedirectUrl}. This alias will be
|
|
2028
1992
|
* removed in a future major version.
|
|
2029
1993
|
*
|
|
2030
|
-
* @instrumented
|
|
1994
|
+
* @not-instrumented
|
|
2031
1995
|
*/
|
|
2032
|
-
const detectOAuthRedirect = (params, client = getDefaultClient()) =>
|
|
2033
|
-
const __detectOAuthRedirect_impl = detectOAuthRedirect;
|
|
2034
|
-
const __detectOAuthRedirect_wrapped = instrumentFunction({
|
|
2035
|
-
fn: __detectOAuthRedirect_impl,
|
|
2036
|
-
functionName: "detectOAuthRedirect",
|
|
2037
|
-
getCore: () => {
|
|
2038
|
-
try {
|
|
2039
|
-
return getCore(getDefaultClient());
|
|
2040
|
-
} catch {
|
|
2041
|
-
return;
|
|
2042
|
-
}
|
|
2043
|
-
}
|
|
2044
|
-
});
|
|
1996
|
+
const detectOAuthRedirect = (params, client = getDefaultClient()) => detectSocialRedirectUrl(params, client);
|
|
2045
1997
|
|
|
2046
1998
|
//#endregion
|
|
2047
1999
|
//#region src/modules/wallets/primaryWalletAccount/getPrimaryWalletAccount/getPrimaryWalletAccount.ts
|
|
@@ -2050,26 +2002,14 @@ const __detectOAuthRedirect_wrapped = instrumentFunction({
|
|
|
2050
2002
|
* The primary wallet account is the one that was last selected by the user.
|
|
2051
2003
|
* This information is stored in both unverified and verified wallet accounts.
|
|
2052
2004
|
* This function consolidates this information to determine which wallet was most recently selected.
|
|
2053
|
-
* @instrumented
|
|
2005
|
+
* @not-instrumented
|
|
2054
2006
|
*/
|
|
2055
2007
|
const getPrimaryWalletAccount = (client = getDefaultClient()) => {
|
|
2056
|
-
const sortedLastSelectedWalletAccounts =
|
|
2008
|
+
const sortedLastSelectedWalletAccounts = getWalletAccounts(client).filter((walletAccount) => Boolean(walletAccount.lastSelectedAt)).sort((a, b) => b.lastSelectedAt.getTime() - a.lastSelectedAt.getTime());
|
|
2057
2009
|
if (sortedLastSelectedWalletAccounts.length === 0) return null;
|
|
2058
2010
|
const [primaryWalletAccount] = sortedLastSelectedWalletAccounts;
|
|
2059
2011
|
return primaryWalletAccount;
|
|
2060
2012
|
};
|
|
2061
|
-
const __getPrimaryWalletAccount_impl = getPrimaryWalletAccount;
|
|
2062
|
-
const __getPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
2063
|
-
fn: __getPrimaryWalletAccount_impl,
|
|
2064
|
-
functionName: "getPrimaryWalletAccount",
|
|
2065
|
-
getCore: () => {
|
|
2066
|
-
try {
|
|
2067
|
-
return getCore(getDefaultClient());
|
|
2068
|
-
} catch {
|
|
2069
|
-
return;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
});
|
|
2073
2013
|
|
|
2074
2014
|
//#endregion
|
|
2075
2015
|
//#region src/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.ts
|
|
@@ -2083,8 +2023,8 @@ const __getPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
|
2083
2023
|
*/
|
|
2084
2024
|
const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefaultClient()) => {
|
|
2085
2025
|
const core = getCore(client);
|
|
2086
|
-
const apiClient =
|
|
2087
|
-
const walletId =
|
|
2026
|
+
const apiClient = createApiClient({}, client);
|
|
2027
|
+
const walletId = getPrimaryWalletAccount(client)?.verifiedCredentialId?.replace("-zerodev", "");
|
|
2088
2028
|
const response = await apiClient.verifyUnlink({
|
|
2089
2029
|
environmentId: core.environmentId,
|
|
2090
2030
|
verifyUnlinkRequest: {
|
|
@@ -2092,7 +2032,7 @@ const unlinkSocialAccount = async ({ verifiedCredentialId }, client = getDefault
|
|
|
2092
2032
|
walletId: walletId ?? void 0
|
|
2093
2033
|
}
|
|
2094
2034
|
});
|
|
2095
|
-
|
|
2035
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
2096
2036
|
return response;
|
|
2097
2037
|
};
|
|
2098
2038
|
const __unlinkSocialAccount_impl = unlinkSocialAccount;
|
|
@@ -2122,9 +2062,9 @@ const __unlinkSocialAccount_wrapped = instrumentFunction({
|
|
|
2122
2062
|
*/
|
|
2123
2063
|
const getBalances = async ({ walletAccount, networkId, includePrices, includeNative, filterSpamTokens, whitelistedContracts, forceRefresh }, client = getDefaultClient()) => {
|
|
2124
2064
|
const core = getCore(client);
|
|
2125
|
-
const apiClient =
|
|
2065
|
+
const apiClient = createApiClient({}, client);
|
|
2126
2066
|
if (!networkId) {
|
|
2127
|
-
const activeNetworkId = await
|
|
2067
|
+
const activeNetworkId = await getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
|
|
2128
2068
|
networkId = Number(activeNetworkId.networkId);
|
|
2129
2069
|
}
|
|
2130
2070
|
return await apiClient.getAccountBalances({
|
|
@@ -2139,18 +2079,6 @@ const getBalances = async ({ walletAccount, networkId, includePrices, includeNat
|
|
|
2139
2079
|
whitelistedContracts
|
|
2140
2080
|
});
|
|
2141
2081
|
};
|
|
2142
|
-
const __getBalances_impl = getBalances;
|
|
2143
|
-
const __getBalances_wrapped = instrumentFunction({
|
|
2144
|
-
fn: __getBalances_impl,
|
|
2145
|
-
functionName: "getBalances",
|
|
2146
|
-
getCore: () => {
|
|
2147
|
-
try {
|
|
2148
|
-
return getCore(getDefaultClient());
|
|
2149
|
-
} catch {
|
|
2150
|
-
return;
|
|
2151
|
-
}
|
|
2152
|
-
}
|
|
2153
|
-
});
|
|
2154
2082
|
|
|
2155
2083
|
//#endregion
|
|
2156
2084
|
//#region src/modules/balances/getMultichainBalances/getMultichainBalances.ts
|
|
@@ -2163,33 +2091,21 @@ const __getBalances_wrapped = instrumentFunction({
|
|
|
2163
2091
|
* @param params.balanceRequest - The balance request configuration specifying which chains, networks and addresses to query.
|
|
2164
2092
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2165
2093
|
* @returns A promise that resolves to the chain balances across multiple networks.
|
|
2166
|
-
* @instrumented
|
|
2094
|
+
* @not-instrumented
|
|
2167
2095
|
*/
|
|
2168
2096
|
const getMultichainBalances = async ({ balanceRequest }, client = getDefaultClient()) => {
|
|
2169
2097
|
const core = getCore(client);
|
|
2170
|
-
return (await
|
|
2098
|
+
return (await createApiClient({}, client).postMultichainAccountBalances({
|
|
2171
2099
|
environmentId: core.environmentId,
|
|
2172
2100
|
multichainAccountBalancesRequest: balanceRequest
|
|
2173
2101
|
})).chainBalances;
|
|
2174
2102
|
};
|
|
2175
|
-
const __getMultichainBalances_impl = getMultichainBalances;
|
|
2176
|
-
const __getMultichainBalances_wrapped = instrumentFunction({
|
|
2177
|
-
fn: __getMultichainBalances_impl,
|
|
2178
|
-
functionName: "getMultichainBalances",
|
|
2179
|
-
getCore: () => {
|
|
2180
|
-
try {
|
|
2181
|
-
return getCore(getDefaultClient());
|
|
2182
|
-
} catch {
|
|
2183
|
-
return;
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
});
|
|
2187
2103
|
|
|
2188
2104
|
//#endregion
|
|
2189
2105
|
//#region src/modules/checkout/utils/createCheckoutSessionTokenStorageKey/createCheckoutSessionTokenStorageKey.ts
|
|
2190
2106
|
/** @not-instrumented */
|
|
2191
2107
|
const createCheckoutSessionTokenStorageKey = (transactionId) => {
|
|
2192
|
-
return
|
|
2108
|
+
return createStorageKeySchema({
|
|
2193
2109
|
key: `checkoutSessionToken:${transactionId}`,
|
|
2194
2110
|
schema: z.string()
|
|
2195
2111
|
});
|
|
@@ -2200,7 +2116,7 @@ const createCheckoutSessionTokenStorageKey = (transactionId) => {
|
|
|
2200
2116
|
/** @not-instrumented */
|
|
2201
2117
|
const createCheckoutApiClient = async ({ transactionId }, client) => {
|
|
2202
2118
|
const core = getCore(client);
|
|
2203
|
-
const apiClient =
|
|
2119
|
+
const apiClient = createApiClient({}, client);
|
|
2204
2120
|
const sessionToken = await core.storage.getItem(createCheckoutSessionTokenStorageKey(transactionId));
|
|
2205
2121
|
if (!sessionToken) throw new CheckoutSessionTokenMissingError({ transactionId });
|
|
2206
2122
|
return {
|
|
@@ -2351,7 +2267,7 @@ const checkoutTransactionEventSchema = z.object({
|
|
|
2351
2267
|
* Channel name follows the backend convention: `transaction:{transactionId}`.
|
|
2352
2268
|
* @not-instrumented
|
|
2353
2269
|
*/
|
|
2354
|
-
const createCheckoutTransactionChannelSchema = (transactionId) =>
|
|
2270
|
+
const createCheckoutTransactionChannelSchema = (transactionId) => createRealtimeChannelSchema({
|
|
2355
2271
|
channel: `transaction:${transactionId}`,
|
|
2356
2272
|
schema: checkoutTransactionEventSchema
|
|
2357
2273
|
});
|
|
@@ -2435,7 +2351,7 @@ const subscribeToCheckoutTransaction = async ({ transactionId }, client) => {
|
|
|
2435
2351
|
*/
|
|
2436
2352
|
const createCheckoutTransaction = async (params, client = getDefaultClient()) => {
|
|
2437
2353
|
const core = getCore(client);
|
|
2438
|
-
const apiClient =
|
|
2354
|
+
const apiClient = createApiClient({}, client);
|
|
2439
2355
|
const checkouts = await getCheckouts(client);
|
|
2440
2356
|
const checkoutId = params.checkoutId || checkouts?.[0]?.id;
|
|
2441
2357
|
assertDefined(checkoutId, "No checkout found. Please make sure you have a Checkout setup in the Dashboard.");
|
|
@@ -2480,27 +2396,15 @@ const __createCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2480
2396
|
* @param params GetCheckoutTransactionParams - The parameters for fetching the transaction.
|
|
2481
2397
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2482
2398
|
* @returns The checkout transaction
|
|
2483
|
-
* @instrumented
|
|
2399
|
+
* @not-instrumented
|
|
2484
2400
|
*/
|
|
2485
2401
|
const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
|
|
2486
2402
|
const core = getCore(client);
|
|
2487
|
-
return
|
|
2403
|
+
return createApiClient({}, client).getCheckoutTransaction({
|
|
2488
2404
|
environmentId: core.environmentId,
|
|
2489
2405
|
transactionId
|
|
2490
2406
|
});
|
|
2491
2407
|
};
|
|
2492
|
-
const __getCheckoutTransaction_impl = getCheckoutTransaction;
|
|
2493
|
-
const __getCheckoutTransaction_wrapped = instrumentFunction({
|
|
2494
|
-
fn: __getCheckoutTransaction_impl,
|
|
2495
|
-
functionName: "getCheckoutTransaction",
|
|
2496
|
-
getCore: () => {
|
|
2497
|
-
try {
|
|
2498
|
-
return getCore(getDefaultClient());
|
|
2499
|
-
} catch {
|
|
2500
|
-
return;
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
});
|
|
2504
2408
|
|
|
2505
2409
|
//#endregion
|
|
2506
2410
|
//#region src/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.ts
|
|
@@ -2510,7 +2414,7 @@ const __getCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2510
2414
|
* @param params GetCheckoutTransactionQuoteParams - The quote parameters.
|
|
2511
2415
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2512
2416
|
* @returns The updated checkout transaction with quote data
|
|
2513
|
-
* @instrumented
|
|
2417
|
+
* @not-instrumented
|
|
2514
2418
|
*/
|
|
2515
2419
|
const getCheckoutTransactionQuote = async ({ fromTokenAddress, slippage, transactionId }, client = getDefaultClient()) => {
|
|
2516
2420
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2524,18 +2428,6 @@ const getCheckoutTransactionQuote = async ({ fromTokenAddress, slippage, transac
|
|
|
2524
2428
|
xDynamicCheckoutSessionToken: sessionToken
|
|
2525
2429
|
});
|
|
2526
2430
|
};
|
|
2527
|
-
const __getCheckoutTransactionQuote_impl = getCheckoutTransactionQuote;
|
|
2528
|
-
const __getCheckoutTransactionQuote_wrapped = instrumentFunction({
|
|
2529
|
-
fn: __getCheckoutTransactionQuote_impl,
|
|
2530
|
-
functionName: "getCheckoutTransactionQuote",
|
|
2531
|
-
getCore: () => {
|
|
2532
|
-
try {
|
|
2533
|
-
return getCore(getDefaultClient());
|
|
2534
|
-
} catch {
|
|
2535
|
-
return;
|
|
2536
|
-
}
|
|
2537
|
-
}
|
|
2538
|
-
});
|
|
2539
2431
|
|
|
2540
2432
|
//#endregion
|
|
2541
2433
|
//#region src/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.ts
|
|
@@ -2621,7 +2513,7 @@ const SWAP_SUPPORTED_CHAINS = [
|
|
|
2621
2513
|
*/
|
|
2622
2514
|
const executeSwapTransaction = async ({ walletAccount, signingPayload, onStepChange }, client = getDefaultClient()) => {
|
|
2623
2515
|
if (!SWAP_SUPPORTED_CHAINS.includes(walletAccount.chain)) throw new InvalidParamError(`Chain ${walletAccount.chain} is not supported for swap transactions`);
|
|
2624
|
-
const walletProvider =
|
|
2516
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
2625
2517
|
assertWalletProviderMethodDefined(walletProvider, "executeSwapTransaction");
|
|
2626
2518
|
const requiredNetworkId = signingPayload.chainId;
|
|
2627
2519
|
if (requiredNetworkId && walletProvider.switchActiveNetwork) {
|
|
@@ -2708,21 +2600,9 @@ const __submitCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2708
2600
|
*
|
|
2709
2601
|
* @param params.transactionId - The ID of the checkout transaction to track.
|
|
2710
2602
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2711
|
-
* @instrumented
|
|
2603
|
+
* @not-instrumented
|
|
2712
2604
|
*/
|
|
2713
2605
|
const trackCheckoutTransaction = ({ transactionId }, client = getDefaultClient()) => subscribeToCheckoutTransaction({ transactionId }, client);
|
|
2714
|
-
const __trackCheckoutTransaction_impl = trackCheckoutTransaction;
|
|
2715
|
-
const __trackCheckoutTransaction_wrapped = instrumentFunction({
|
|
2716
|
-
fn: __trackCheckoutTransaction_impl,
|
|
2717
|
-
functionName: "trackCheckoutTransaction",
|
|
2718
|
-
getCore: () => {
|
|
2719
|
-
try {
|
|
2720
|
-
return getCore(getDefaultClient());
|
|
2721
|
-
} catch {
|
|
2722
|
-
return;
|
|
2723
|
-
}
|
|
2724
|
-
}
|
|
2725
|
-
});
|
|
2726
2606
|
|
|
2727
2607
|
//#endregion
|
|
2728
2608
|
//#region src/modules/checkout/utils/requiresConversion/requiresConversion.ts
|
|
@@ -2738,7 +2618,7 @@ const __trackCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2738
2618
|
* @param params - The from token details and the checkout's settlement config.
|
|
2739
2619
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2740
2620
|
* @returns Whether a token conversion is required
|
|
2741
|
-
* @instrumented
|
|
2621
|
+
* @not-instrumented
|
|
2742
2622
|
*/
|
|
2743
2623
|
const requiresConversion = async ({ transaction }, client = getDefaultClient()) => {
|
|
2744
2624
|
if (!transaction.fromChainId || !transaction.fromChainName || !transaction.fromToken) throw new InvalidParamError("Transaction is missing source information. Make sure that attachCheckoutTransactionSource has been called before calling this function.");
|
|
@@ -2746,18 +2626,6 @@ const requiresConversion = async ({ transaction }, client = getDefaultClient())
|
|
|
2746
2626
|
assertDefined(checkout, "Could not find checkout associated with transaction.");
|
|
2747
2627
|
return !checkout.settlementConfig.settlements.some((settlement) => settlement.chainName === transaction.fromChainName && settlement.chainId === transaction.fromChainId && settlement.tokenAddress === transaction.fromToken);
|
|
2748
2628
|
};
|
|
2749
|
-
const __requiresConversion_impl = requiresConversion;
|
|
2750
|
-
const __requiresConversion_wrapped = instrumentFunction({
|
|
2751
|
-
fn: __requiresConversion_impl,
|
|
2752
|
-
functionName: "requiresConversion",
|
|
2753
|
-
getCore: () => {
|
|
2754
|
-
try {
|
|
2755
|
-
return getCore(getDefaultClient());
|
|
2756
|
-
} catch {
|
|
2757
|
-
return;
|
|
2758
|
-
}
|
|
2759
|
-
}
|
|
2760
|
-
});
|
|
2761
2629
|
|
|
2762
2630
|
//#endregion
|
|
2763
2631
|
//#region src/modules/deviceRegistration/completeDeviceRegistration/completeDeviceRegistration.ts
|
|
@@ -2766,8 +2634,8 @@ const DEVICE_REGISTRATION_TOKEN_HEADER = "x-dynamic-device-registration-token";
|
|
|
2766
2634
|
const completeDeviceRegistration = async ({ deviceToken }, client = getDefaultClient()) => {
|
|
2767
2635
|
assertDefined(deviceToken, "deviceToken is required");
|
|
2768
2636
|
const core = getCore(client);
|
|
2769
|
-
const response = await
|
|
2770
|
-
|
|
2637
|
+
const response = await createApiClient({ headers: { [DEVICE_REGISTRATION_TOKEN_HEADER]: deviceToken } }, client).deviceRegistration({ environmentId: core.environmentId });
|
|
2638
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
2771
2639
|
emitEvent({ event: "deviceRegistrationCompleted" }, client);
|
|
2772
2640
|
return response;
|
|
2773
2641
|
};
|
|
@@ -2794,7 +2662,7 @@ const __completeDeviceRegistration_wrapped = instrumentFunction({
|
|
|
2794
2662
|
*
|
|
2795
2663
|
* @returns The device token as a string if valid.
|
|
2796
2664
|
* @throws InvalidDeviceRegistrationRedirectError If the URL is not a valid device registration redirect.
|
|
2797
|
-
* @instrumented
|
|
2665
|
+
* @not-instrumented
|
|
2798
2666
|
*/
|
|
2799
2667
|
const getDeviceRegistrationTokenFromUrl = ({ url }) => {
|
|
2800
2668
|
let urlObject;
|
|
@@ -2807,18 +2675,6 @@ const getDeviceRegistrationTokenFromUrl = ({ url }) => {
|
|
|
2807
2675
|
if (!deviceRegistrationToken || deviceRegistrationToken.trim() === "") throw new InvalidDeviceRegistrationRedirectError();
|
|
2808
2676
|
return deviceRegistrationToken;
|
|
2809
2677
|
};
|
|
2810
|
-
const __getDeviceRegistrationTokenFromUrl_impl = getDeviceRegistrationTokenFromUrl;
|
|
2811
|
-
const __getDeviceRegistrationTokenFromUrl_wrapped = instrumentFunction({
|
|
2812
|
-
fn: __getDeviceRegistrationTokenFromUrl_impl,
|
|
2813
|
-
functionName: "getDeviceRegistrationTokenFromUrl",
|
|
2814
|
-
getCore: () => {
|
|
2815
|
-
try {
|
|
2816
|
-
return getCore(getDefaultClient());
|
|
2817
|
-
} catch {
|
|
2818
|
-
return;
|
|
2819
|
-
}
|
|
2820
|
-
}
|
|
2821
|
-
});
|
|
2822
2678
|
|
|
2823
2679
|
//#endregion
|
|
2824
2680
|
//#region src/modules/deviceRegistration/detectDeviceRegistrationRedirect/detectDeviceRegistrationRedirect.ts
|
|
@@ -2829,35 +2685,23 @@ const __getDeviceRegistrationTokenFromUrl_wrapped = instrumentFunction({
|
|
|
2829
2685
|
* if it contains device registration redirect data from a device authentication flow.
|
|
2830
2686
|
*
|
|
2831
2687
|
* @returns True if the URL is a device registration redirect, false otherwise.
|
|
2832
|
-
* @instrumented
|
|
2688
|
+
* @not-instrumented
|
|
2833
2689
|
*/
|
|
2834
2690
|
const detectDeviceRegistrationRedirect = ({ url }) => {
|
|
2835
2691
|
try {
|
|
2836
|
-
|
|
2692
|
+
getDeviceRegistrationTokenFromUrl({ url });
|
|
2837
2693
|
return true;
|
|
2838
2694
|
} catch {
|
|
2839
2695
|
return false;
|
|
2840
2696
|
}
|
|
2841
2697
|
};
|
|
2842
|
-
const __detectDeviceRegistrationRedirect_impl = detectDeviceRegistrationRedirect;
|
|
2843
|
-
const __detectDeviceRegistrationRedirect_wrapped = instrumentFunction({
|
|
2844
|
-
fn: __detectDeviceRegistrationRedirect_impl,
|
|
2845
|
-
functionName: "detectDeviceRegistrationRedirect",
|
|
2846
|
-
getCore: () => {
|
|
2847
|
-
try {
|
|
2848
|
-
return getCore(getDefaultClient());
|
|
2849
|
-
} catch {
|
|
2850
|
-
return;
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
});
|
|
2854
2698
|
|
|
2855
2699
|
//#endregion
|
|
2856
2700
|
//#region src/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.ts
|
|
2857
|
-
/** @instrumented */
|
|
2701
|
+
/** @not-instrumented */
|
|
2858
2702
|
const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
2859
2703
|
const core = getCore(client);
|
|
2860
|
-
const apiClient =
|
|
2704
|
+
const apiClient = createApiClient({}, client);
|
|
2861
2705
|
try {
|
|
2862
2706
|
return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
|
|
2863
2707
|
} catch (error) {
|
|
@@ -2869,18 +2713,6 @@ const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
|
2869
2713
|
throw error;
|
|
2870
2714
|
}
|
|
2871
2715
|
};
|
|
2872
|
-
const __getRegisteredDevices_impl = getRegisteredDevices;
|
|
2873
|
-
const __getRegisteredDevices_wrapped = instrumentFunction({
|
|
2874
|
-
fn: __getRegisteredDevices_impl,
|
|
2875
|
-
functionName: "getRegisteredDevices",
|
|
2876
|
-
getCore: () => {
|
|
2877
|
-
try {
|
|
2878
|
-
return getCore(getDefaultClient());
|
|
2879
|
-
} catch {
|
|
2880
|
-
return;
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
|
-
});
|
|
2884
2716
|
|
|
2885
2717
|
//#endregion
|
|
2886
2718
|
//#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
|
|
@@ -2901,7 +2733,7 @@ const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("dev
|
|
|
2901
2733
|
/** @instrumented */
|
|
2902
2734
|
const revokeAllRegisteredDevices = async (client = getDefaultClient()) => {
|
|
2903
2735
|
const core = getCore(client);
|
|
2904
|
-
await
|
|
2736
|
+
await createApiClient({}, client).deleteAllDeviceRegistrations({ environmentId: core.environmentId });
|
|
2905
2737
|
await __logoutWithReason_wrapped({ reason: "all-devices-revoked" }, client);
|
|
2906
2738
|
};
|
|
2907
2739
|
const __revokeAllRegisteredDevices_impl = revokeAllRegisteredDevices;
|
|
@@ -2923,7 +2755,7 @@ const __revokeAllRegisteredDevices_wrapped = instrumentFunction({
|
|
|
2923
2755
|
const revokeRegisteredDevice = async ({ deviceRegistrationId }, client = getDefaultClient()) => {
|
|
2924
2756
|
assertDefined(deviceRegistrationId, "deviceRegistrationId is required");
|
|
2925
2757
|
const core = getCore(client);
|
|
2926
|
-
if ((await
|
|
2758
|
+
if ((await createApiClient({}, client).deleteDeviceRegistration({
|
|
2927
2759
|
deviceRegistrationId,
|
|
2928
2760
|
environmentId: core.environmentId
|
|
2929
2761
|
})).currentDeviceRevoked) await __logoutWithReason_wrapped({ reason: "device-revoked" }, client);
|
|
@@ -2951,7 +2783,7 @@ const __revokeRegisteredDevice_wrapped = instrumentFunction({
|
|
|
2951
2783
|
* @returns A function to remove the listener.
|
|
2952
2784
|
* @throws {ValueMustBeDefinedError} If the window is not available.
|
|
2953
2785
|
* @docs https://docs.cdp.coinbase.com/onramp-&-offramp/onramp-apis/apple-pay-onramp-api#events-names
|
|
2954
|
-
* @instrumented
|
|
2786
|
+
* @not-instrumented
|
|
2955
2787
|
*/
|
|
2956
2788
|
const addCoinbaseOnrampOrderEventListener = ({ listener }, client = getDefaultClient()) => {
|
|
2957
2789
|
const core = getCore(client);
|
|
@@ -2975,18 +2807,6 @@ const addCoinbaseOnrampOrderEventListener = ({ listener }, client = getDefaultCl
|
|
|
2975
2807
|
window.removeEventListener("message", handleMessageEvent);
|
|
2976
2808
|
};
|
|
2977
2809
|
};
|
|
2978
|
-
const __addCoinbaseOnrampOrderEventListener_impl = addCoinbaseOnrampOrderEventListener;
|
|
2979
|
-
const __addCoinbaseOnrampOrderEventListener_wrapped = instrumentFunction({
|
|
2980
|
-
fn: __addCoinbaseOnrampOrderEventListener_impl,
|
|
2981
|
-
functionName: "addCoinbaseOnrampOrderEventListener",
|
|
2982
|
-
getCore: () => {
|
|
2983
|
-
try {
|
|
2984
|
-
return getCore(getDefaultClient());
|
|
2985
|
-
} catch {
|
|
2986
|
-
return;
|
|
2987
|
-
}
|
|
2988
|
-
}
|
|
2989
|
-
});
|
|
2990
2810
|
|
|
2991
2811
|
//#endregion
|
|
2992
2812
|
//#region src/modules/funding/coinbase/getMissingVerificationForCoinbaseOnrampOrder/getMissingVerificationForCoinbaseOnrampOrder.ts
|
|
@@ -3004,7 +2824,7 @@ const __addCoinbaseOnrampOrderEventListener_wrapped = instrumentFunction({
|
|
|
3004
2824
|
* @returns FieldMissingVerificationForCoinbaseOnramp[] - An array of fields that are missing verification for a Coinbase onramp order
|
|
3005
2825
|
* @throws {InvalidParamError} - If the payment method is not valid
|
|
3006
2826
|
* @throws {ValueMustBeDefinedError} - If the user is not authenticated
|
|
3007
|
-
* @instrumented
|
|
2827
|
+
* @not-instrumented
|
|
3008
2828
|
*/
|
|
3009
2829
|
const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client = getDefaultClient()) => {
|
|
3010
2830
|
if (paymentMethod !== "GUEST_CHECKOUT_APPLE_PAY") throw new InvalidParamError(`Invalid payment method: ${paymentMethod}`);
|
|
@@ -3039,18 +2859,6 @@ const getMissingVerificationForCoinbaseOnrampOrder = ({ paymentMethod }, client
|
|
|
3039
2859
|
});
|
|
3040
2860
|
return fieldsMissingVerification;
|
|
3041
2861
|
};
|
|
3042
|
-
const __getMissingVerificationForCoinbaseOnrampOrder_impl = getMissingVerificationForCoinbaseOnrampOrder;
|
|
3043
|
-
const __getMissingVerificationForCoinbaseOnrampOrder_wrapped = instrumentFunction({
|
|
3044
|
-
fn: __getMissingVerificationForCoinbaseOnrampOrder_impl,
|
|
3045
|
-
functionName: "getMissingVerificationForCoinbaseOnrampOrder",
|
|
3046
|
-
getCore: () => {
|
|
3047
|
-
try {
|
|
3048
|
-
return getCore(getDefaultClient());
|
|
3049
|
-
} catch {
|
|
3050
|
-
return;
|
|
3051
|
-
}
|
|
3052
|
-
}
|
|
3053
|
-
});
|
|
3054
2862
|
|
|
3055
2863
|
//#endregion
|
|
3056
2864
|
//#region src/modules/funding/coinbase/utils/validateUserCredentialsForCoinbaseOnrampOrder/validateUserCredentialsForCoinbaseOnrampOrder.ts
|
|
@@ -3058,7 +2866,7 @@ const __getMissingVerificationForCoinbaseOnrampOrder_wrapped = instrumentFunctio
|
|
|
3058
2866
|
const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
|
|
3059
2867
|
const { user } = client;
|
|
3060
2868
|
assertDefined(user, "User is not authenticated");
|
|
3061
|
-
const fieldsMissingVerification =
|
|
2869
|
+
const fieldsMissingVerification = getMissingVerificationForCoinbaseOnrampOrder({ paymentMethod: "GUEST_CHECKOUT_APPLE_PAY" }, client);
|
|
3062
2870
|
if (fieldsMissingVerification.find((field) => field.field === "email")) throw new MissingUserVerificationError({
|
|
3063
2871
|
informationToVerify: "email",
|
|
3064
2872
|
message: "User must have a verified email to create a Coinbase onramp order"
|
|
@@ -3089,7 +2897,7 @@ const validateUserCredentialsForCoinbaseOnrampOrder = (client) => {
|
|
|
3089
2897
|
const createCoinbaseOnrampOrder = async (orderParams, client = getDefaultClient()) => {
|
|
3090
2898
|
const user = validateUserCredentialsForCoinbaseOnrampOrder(client);
|
|
3091
2899
|
const core = getCore(client);
|
|
3092
|
-
const apiClient =
|
|
2900
|
+
const apiClient = createApiClient({ includeMfaToken: true }, client);
|
|
3093
2901
|
const { isSandbox, ...restOrderParams } = orderParams;
|
|
3094
2902
|
const orderResponse = await apiClient.createCoinbaseOnrampOrder({
|
|
3095
2903
|
coinbaseOnrampOrderCreateRequest: {
|
|
@@ -3129,27 +2937,15 @@ const __createCoinbaseOnrampOrder_wrapped = instrumentFunction({
|
|
|
3129
2937
|
* @param buyUrlParams CoinbaseOnrampGetBuyUrlRequest - The parameters for the buy URL.
|
|
3130
2938
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3131
2939
|
* @returns an object containing the buy URL
|
|
3132
|
-
* @instrumented
|
|
2940
|
+
* @not-instrumented
|
|
3133
2941
|
*/
|
|
3134
2942
|
const getCoinbaseBuyUrl = async (buyUrlParams, client = getDefaultClient()) => {
|
|
3135
2943
|
const core = getCore(client);
|
|
3136
|
-
return await
|
|
2944
|
+
return await createApiClient({ includeMfaToken: true }, client).generateCoinbaseOnrampBuyUrl({
|
|
3137
2945
|
coinbaseOnrampGetBuyUrlRequest: buyUrlParams,
|
|
3138
2946
|
environmentId: core.environmentId
|
|
3139
2947
|
});
|
|
3140
2948
|
};
|
|
3141
|
-
const __getCoinbaseBuyUrl_impl = getCoinbaseBuyUrl;
|
|
3142
|
-
const __getCoinbaseBuyUrl_wrapped = instrumentFunction({
|
|
3143
|
-
fn: __getCoinbaseBuyUrl_impl,
|
|
3144
|
-
functionName: "getCoinbaseBuyUrl",
|
|
3145
|
-
getCore: () => {
|
|
3146
|
-
try {
|
|
3147
|
-
return getCore(getDefaultClient());
|
|
3148
|
-
} catch {
|
|
3149
|
-
return;
|
|
3150
|
-
}
|
|
3151
|
-
}
|
|
3152
|
-
});
|
|
3153
2949
|
|
|
3154
2950
|
//#endregion
|
|
3155
2951
|
//#region src/modules/funding/cryptoDotCom/createCryptoDotComPayment/createCryptoDotComPayment.ts
|
|
@@ -3163,7 +2959,7 @@ const __getCoinbaseBuyUrl_wrapped = instrumentFunction({
|
|
|
3163
2959
|
*/
|
|
3164
2960
|
const createCryptoDotComPayment = async (paymentParams, client = getDefaultClient()) => {
|
|
3165
2961
|
const core = getCore(client);
|
|
3166
|
-
return await
|
|
2962
|
+
return await createApiClient({ includeMfaToken: true }, client).createCryptoDotComPayment({
|
|
3167
2963
|
cryptoDotComPaymentCreateRequest: {
|
|
3168
2964
|
...paymentParams,
|
|
3169
2965
|
chain: paymentParams.chain
|
|
@@ -3196,7 +2992,7 @@ const __createCryptoDotComPayment_wrapped = instrumentFunction({
|
|
|
3196
2992
|
*/
|
|
3197
2993
|
const createKrakenExchangeTransfer = async (transferParams, client = getDefaultClient()) => {
|
|
3198
2994
|
const core = getCore(client);
|
|
3199
|
-
const apiClient =
|
|
2995
|
+
const apiClient = createApiClient({ includeMfaToken: true }, client);
|
|
3200
2996
|
const { accountId, ...createExchangeTransferRequest } = transferParams;
|
|
3201
2997
|
return await apiClient.postExchangeAccountTransfer({
|
|
3202
2998
|
accountId,
|
|
@@ -3230,25 +3026,13 @@ const __createKrakenExchangeTransfer_wrapped = instrumentFunction({
|
|
|
3230
3026
|
*/
|
|
3231
3027
|
const getKrakenAccounts = async (params, client = getDefaultClient()) => {
|
|
3232
3028
|
const core = getCore(client);
|
|
3233
|
-
return await
|
|
3029
|
+
return await createApiClient({ includeMfaToken: true }, client).getUserAccounts({
|
|
3234
3030
|
chainName: params?.chainName,
|
|
3235
3031
|
environmentId: core.environmentId,
|
|
3236
3032
|
exchangeKey: ExchangeKeyEnum.Kraken,
|
|
3237
3033
|
networkId: params?.networkId
|
|
3238
3034
|
});
|
|
3239
3035
|
};
|
|
3240
|
-
const __getKrakenAccounts_impl = getKrakenAccounts;
|
|
3241
|
-
const __getKrakenAccounts_wrapped = instrumentFunction({
|
|
3242
|
-
fn: __getKrakenAccounts_impl,
|
|
3243
|
-
functionName: "getKrakenAccounts",
|
|
3244
|
-
getCore: () => {
|
|
3245
|
-
try {
|
|
3246
|
-
return getCore(getDefaultClient());
|
|
3247
|
-
} catch {
|
|
3248
|
-
return;
|
|
3249
|
-
}
|
|
3250
|
-
}
|
|
3251
|
-
});
|
|
3252
3036
|
|
|
3253
3037
|
//#endregion
|
|
3254
3038
|
//#region src/modules/funding/kraken/getKrakenWhitelistedAddresses/getKrakenWhitelistedAddresses.ts
|
|
@@ -3257,27 +3041,15 @@ const __getKrakenAccounts_wrapped = instrumentFunction({
|
|
|
3257
3041
|
*
|
|
3258
3042
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3259
3043
|
* @returns Transfer destinations response with whitelisted addresses
|
|
3260
|
-
* @instrumented
|
|
3044
|
+
* @not-instrumented
|
|
3261
3045
|
*/
|
|
3262
3046
|
const getKrakenWhitelistedAddresses = async (client = getDefaultClient()) => {
|
|
3263
3047
|
const core = getCore(client);
|
|
3264
|
-
return await
|
|
3048
|
+
return await createApiClient({ includeMfaToken: true }, client).getExchangeTransferDestinations({
|
|
3265
3049
|
environmentId: core.environmentId,
|
|
3266
3050
|
exchangeKey: ExchangeKeyEnum.Kraken
|
|
3267
3051
|
});
|
|
3268
3052
|
};
|
|
3269
|
-
const __getKrakenWhitelistedAddresses_impl = getKrakenWhitelistedAddresses;
|
|
3270
|
-
const __getKrakenWhitelistedAddresses_wrapped = instrumentFunction({
|
|
3271
|
-
fn: __getKrakenWhitelistedAddresses_impl,
|
|
3272
|
-
functionName: "getKrakenWhitelistedAddresses",
|
|
3273
|
-
getCore: () => {
|
|
3274
|
-
try {
|
|
3275
|
-
return getCore(getDefaultClient());
|
|
3276
|
-
} catch {
|
|
3277
|
-
return;
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
});
|
|
3281
3053
|
|
|
3282
3054
|
//#endregion
|
|
3283
3055
|
//#region src/modules/initializeClient/waitForClientInitialized/waitForClientInitialized.ts
|
|
@@ -3286,23 +3058,11 @@ const __getKrakenWhitelistedAddresses_wrapped = instrumentFunction({
|
|
|
3286
3058
|
* and are ready for use.
|
|
3287
3059
|
*
|
|
3288
3060
|
* @returns a promise that resolves once the client is fully initialized.
|
|
3289
|
-
* @instrumented
|
|
3061
|
+
* @not-instrumented
|
|
3290
3062
|
*/
|
|
3291
3063
|
const waitForClientInitialized = async (client = getDefaultClient()) => {
|
|
3292
3064
|
await getCore(client).initTrack.waitForAll();
|
|
3293
3065
|
};
|
|
3294
|
-
const __waitForClientInitialized_impl = waitForClientInitialized;
|
|
3295
|
-
const __waitForClientInitialized_wrapped = instrumentFunction({
|
|
3296
|
-
fn: __waitForClientInitialized_impl,
|
|
3297
|
-
functionName: "waitForClientInitialized",
|
|
3298
|
-
getCore: () => {
|
|
3299
|
-
try {
|
|
3300
|
-
return getCore(getDefaultClient());
|
|
3301
|
-
} catch {
|
|
3302
|
-
return;
|
|
3303
|
-
}
|
|
3304
|
-
}
|
|
3305
|
-
});
|
|
3306
3066
|
|
|
3307
3067
|
//#endregion
|
|
3308
3068
|
//#region src/modules/instrumentation/setInstrumentationEnabled/setInstrumentationEnabled.ts
|
|
@@ -3388,7 +3148,7 @@ const fetchWithTimeout = async (client) => {
|
|
|
3388
3148
|
/**
|
|
3389
3149
|
* The schema to store the cached wallet book data.
|
|
3390
3150
|
*/
|
|
3391
|
-
const walletBookCacheStorageKeySchema =
|
|
3151
|
+
const walletBookCacheStorageKeySchema = createStorageKeySchema({
|
|
3392
3152
|
key: "legacyWalletBookCache",
|
|
3393
3153
|
schema: z.object({
|
|
3394
3154
|
groups: z.record(z.string(), z.any()),
|
|
@@ -3631,7 +3391,7 @@ const getChainFromWalletSchema = ({ wallet, walletKey }) => {
|
|
|
3631
3391
|
const firstChain = wallet.chains[0];
|
|
3632
3392
|
const chainPrefix = extractChainPrefix({ chainIdentifier: firstChain });
|
|
3633
3393
|
try {
|
|
3634
|
-
return
|
|
3394
|
+
return getChainFromVerifiedCredentialChain(chainPrefix);
|
|
3635
3395
|
} catch {}
|
|
3636
3396
|
}
|
|
3637
3397
|
if (walletKey) {
|
|
@@ -3709,23 +3469,11 @@ const transformWalletBook = ({ walletBook }) => {
|
|
|
3709
3469
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3710
3470
|
* @returns A promise that resolves to the WalletConnect catalog containing groups and wallets.
|
|
3711
3471
|
* @throws If unable to fetch the wallet book from the API (when both CDN fetch and cache retrieval fail).
|
|
3712
|
-
* @instrumented
|
|
3472
|
+
* @not-instrumented
|
|
3713
3473
|
*/
|
|
3714
3474
|
const getWalletConnectCatalog = async (client = getDefaultClient()) => {
|
|
3715
3475
|
return transformWalletBook({ walletBook: await fetchLegacyWalletBook(client) });
|
|
3716
3476
|
};
|
|
3717
|
-
const __getWalletConnectCatalog_impl = getWalletConnectCatalog;
|
|
3718
|
-
const __getWalletConnectCatalog_wrapped = instrumentFunction({
|
|
3719
|
-
fn: __getWalletConnectCatalog_impl,
|
|
3720
|
-
functionName: "getWalletConnectCatalog",
|
|
3721
|
-
getCore: () => {
|
|
3722
|
-
try {
|
|
3723
|
-
return getCore(getDefaultClient());
|
|
3724
|
-
} catch {
|
|
3725
|
-
return;
|
|
3726
|
-
}
|
|
3727
|
-
}
|
|
3728
|
-
});
|
|
3729
3477
|
|
|
3730
3478
|
//#endregion
|
|
3731
3479
|
//#region src/modules/wallets/walletProvider/extractChainFromNormalizedName/extractChainFromNormalizedName.ts
|
|
@@ -3755,7 +3503,7 @@ const extractChainFromNormalizedName = ({ normalizedWalletNameWithChain }) => {
|
|
|
3755
3503
|
* @param params.walletProviderKey - The wallet provider key to get the catalog wallet entry for.
|
|
3756
3504
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3757
3505
|
* @returns A promise that resolves to the WalletConnect catalog wallet entry, or undefined if not found.
|
|
3758
|
-
* @instrumented
|
|
3506
|
+
* @not-instrumented
|
|
3759
3507
|
*/
|
|
3760
3508
|
const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProviderKey }, client = getDefaultClient()) => {
|
|
3761
3509
|
const { normalizedWalletNameWithChain } = splitWalletProviderKey(walletProviderKey);
|
|
@@ -3764,7 +3512,7 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3764
3512
|
let walletProviderName = normalizedWalletNameWithChain.toLowerCase();
|
|
3765
3513
|
if (walletProviderName.endsWith(chain.toLowerCase())) walletProviderName = walletProviderName.slice(0, -chain.length);
|
|
3766
3514
|
walletProviderName = walletProviderName.replace(/wallet/g, "");
|
|
3767
|
-
const walletConnectCatalog = await
|
|
3515
|
+
const walletConnectCatalog = await getWalletConnectCatalog(client);
|
|
3768
3516
|
for (const [walletKey, wallet] of Object.entries(walletConnectCatalog.wallets)) {
|
|
3769
3517
|
if (wallet.chain !== chain) continue;
|
|
3770
3518
|
const walletKeyLower = walletKey.toLowerCase();
|
|
@@ -3772,18 +3520,6 @@ const getWalletConnectCatalogWalletByWalletProviderKey = async ({ walletProvider
|
|
|
3772
3520
|
if (walletKeyLower.includes(walletProviderName) || walletNameLower.includes(walletProviderName)) return wallet;
|
|
3773
3521
|
}
|
|
3774
3522
|
};
|
|
3775
|
-
const __getWalletConnectCatalogWalletByWalletProviderKey_impl = getWalletConnectCatalogWalletByWalletProviderKey;
|
|
3776
|
-
const __getWalletConnectCatalogWalletByWalletProviderKey_wrapped = instrumentFunction({
|
|
3777
|
-
fn: __getWalletConnectCatalogWalletByWalletProviderKey_impl,
|
|
3778
|
-
functionName: "getWalletConnectCatalogWalletByWalletProviderKey",
|
|
3779
|
-
getCore: () => {
|
|
3780
|
-
try {
|
|
3781
|
-
return getCore(getDefaultClient());
|
|
3782
|
-
} catch {
|
|
3783
|
-
return;
|
|
3784
|
-
}
|
|
3785
|
-
}
|
|
3786
|
-
});
|
|
3787
3523
|
|
|
3788
3524
|
//#endregion
|
|
3789
3525
|
//#region src/modules/user/updateUser/updateUser.ts
|
|
@@ -3802,11 +3538,11 @@ const __getWalletConnectCatalogWalletByWalletProviderKey_wrapped = instrumentFun
|
|
|
3802
3538
|
*/
|
|
3803
3539
|
const updateUser = async ({ userFields }, client = getDefaultClient()) => {
|
|
3804
3540
|
const core = getCore(client);
|
|
3805
|
-
const response = await
|
|
3541
|
+
const response = await createApiClient({ includeMfaToken: true }, client).updateSelf({
|
|
3806
3542
|
environmentId: core.environmentId,
|
|
3807
3543
|
userFields
|
|
3808
3544
|
});
|
|
3809
|
-
|
|
3545
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
3810
3546
|
if (response.emailVerification) return {
|
|
3811
3547
|
email: response.emailVerification.email,
|
|
3812
3548
|
verificationUUID: response.emailVerification.verificationUUID
|
|
@@ -3877,7 +3613,7 @@ const __acknowledgeRecoveryCodes_wrapped = instrumentFunction({
|
|
|
3877
3613
|
*/
|
|
3878
3614
|
const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, requestedScopes }, client = getDefaultClient()) => {
|
|
3879
3615
|
const core = getCore(client);
|
|
3880
|
-
const apiClient =
|
|
3616
|
+
const apiClient = createApiClient({}, client);
|
|
3881
3617
|
try {
|
|
3882
3618
|
const response = await apiClient.authMfaRecovery({
|
|
3883
3619
|
environmentId: core.environmentId,
|
|
@@ -3887,7 +3623,7 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
|
|
|
3887
3623
|
requestedScopes
|
|
3888
3624
|
}
|
|
3889
3625
|
});
|
|
3890
|
-
|
|
3626
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
3891
3627
|
emitEvent({
|
|
3892
3628
|
args: { mfaToken: response.mfaToken },
|
|
3893
3629
|
event: "mfaCompletionSuccess"
|
|
@@ -3907,7 +3643,7 @@ const authenticateMfaRecoveryCode = async ({ code, createMfaTokenOptions, reques
|
|
|
3907
3643
|
/** @not-instrumented */
|
|
3908
3644
|
const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, client) => {
|
|
3909
3645
|
const core = getCore(client);
|
|
3910
|
-
return await
|
|
3646
|
+
return await createApiClient({}, client).getPasskeyAuthenticationOptions({
|
|
3911
3647
|
environmentId: core.environmentId,
|
|
3912
3648
|
relatedOriginRpId
|
|
3913
3649
|
});
|
|
@@ -3918,7 +3654,7 @@ const getPasskeyAuthenticationOptions = async ({ relatedOriginRpId } = {}, clien
|
|
|
3918
3654
|
/** @not-instrumented */
|
|
3919
3655
|
const serverAuthenticatePasskey = async ({ authentication, createMfaToken, requestedScopes }, client) => {
|
|
3920
3656
|
const core = getCore(client);
|
|
3921
|
-
return await
|
|
3657
|
+
return await createApiClient({}, client).authenticateMfaPasskeyDevice({
|
|
3922
3658
|
environmentId: core.environmentId,
|
|
3923
3659
|
passkeyAuthRequest: {
|
|
3924
3660
|
...authentication,
|
|
@@ -3967,7 +3703,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
|
|
|
3967
3703
|
createMfaToken,
|
|
3968
3704
|
requestedScopes
|
|
3969
3705
|
}, client);
|
|
3970
|
-
|
|
3706
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
3971
3707
|
emitEvent({
|
|
3972
3708
|
args: { mfaToken: response.mfaToken },
|
|
3973
3709
|
event: "mfaCompletionSuccess"
|
|
@@ -4000,7 +3736,7 @@ const authenticatePasskeyMFA = async ({ createMfaToken, relatedOriginRpId, reque
|
|
|
4000
3736
|
*/
|
|
4001
3737
|
const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions, requestedScopes }, client = getDefaultClient()) => {
|
|
4002
3738
|
const core = getCore(client);
|
|
4003
|
-
const apiClient =
|
|
3739
|
+
const apiClient = createApiClient({}, client);
|
|
4004
3740
|
try {
|
|
4005
3741
|
const response = await apiClient.authMfaTotpDevice({
|
|
4006
3742
|
environmentId: core.environmentId,
|
|
@@ -4011,7 +3747,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4011
3747
|
requestedScopes
|
|
4012
3748
|
}
|
|
4013
3749
|
});
|
|
4014
|
-
|
|
3750
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
4015
3751
|
emitEvent({
|
|
4016
3752
|
args: {
|
|
4017
3753
|
deviceId,
|
|
@@ -4046,7 +3782,7 @@ const authenticateTotpMfaDevice = async ({ deviceId, code, createMfaTokenOptions
|
|
|
4046
3782
|
*/
|
|
4047
3783
|
const createNewMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
4048
3784
|
const core = getCore(client);
|
|
4049
|
-
return
|
|
3785
|
+
return createApiClient({}, client).createNewRecoveryCodes({ environmentId: core.environmentId });
|
|
4050
3786
|
};
|
|
4051
3787
|
const __createNewMfaRecoveryCodes_impl = createNewMfaRecoveryCodes;
|
|
4052
3788
|
const __createNewMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
@@ -4084,7 +3820,7 @@ const deleteMfaDevice = async ({ deviceId, mfaAuthToken }, client = getDefaultCl
|
|
|
4084
3820
|
consume: false,
|
|
4085
3821
|
scope: TokenScope.Credentialunlink
|
|
4086
3822
|
}, client)) assertDefined(mfaAuthToken, "mfaAuthToken is required");
|
|
4087
|
-
return
|
|
3823
|
+
return createApiClient({ elevatedAccessTokenScope: TokenScope.Credentialunlink }, client).deleteMfaDevice({
|
|
4088
3824
|
environmentId: core.environmentId,
|
|
4089
3825
|
mfaDeviceId: deviceId,
|
|
4090
3826
|
xMfaAuthToken: mfaAuthToken ?? ""
|
|
@@ -4113,25 +3849,13 @@ const __deleteMfaDevice_wrapped = instrumentFunction({
|
|
|
4113
3849
|
*
|
|
4114
3850
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4115
3851
|
* @returns A promise that resolves to an array of the user's registered MFA devices.
|
|
4116
|
-
* @instrumented
|
|
3852
|
+
* @not-instrumented
|
|
4117
3853
|
*/
|
|
4118
3854
|
const getMfaDevices = async (client = getDefaultClient()) => {
|
|
4119
3855
|
const core = getCore(client);
|
|
4120
|
-
const { devices } = await
|
|
3856
|
+
const { devices } = await createApiClient({}, client).getUserMfaDevices({ environmentId: core.environmentId });
|
|
4121
3857
|
return devices;
|
|
4122
3858
|
};
|
|
4123
|
-
const __getMfaDevices_impl = getMfaDevices;
|
|
4124
|
-
const __getMfaDevices_wrapped = instrumentFunction({
|
|
4125
|
-
fn: __getMfaDevices_impl,
|
|
4126
|
-
functionName: "getMfaDevices",
|
|
4127
|
-
getCore: () => {
|
|
4128
|
-
try {
|
|
4129
|
-
return getCore(getDefaultClient());
|
|
4130
|
-
} catch {
|
|
4131
|
-
return;
|
|
4132
|
-
}
|
|
4133
|
-
}
|
|
4134
|
-
});
|
|
4135
3859
|
|
|
4136
3860
|
//#endregion
|
|
4137
3861
|
//#region src/modules/mfa/getMfaRecoveryCodes/getMfaRecoveryCodes.ts
|
|
@@ -4145,24 +3869,12 @@ const __getMfaDevices_wrapped = instrumentFunction({
|
|
|
4145
3869
|
*
|
|
4146
3870
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4147
3871
|
* @returns A promise that resolves to the user's MFA recovery codes.
|
|
4148
|
-
* @instrumented
|
|
3872
|
+
* @not-instrumented
|
|
4149
3873
|
*/
|
|
4150
3874
|
const getMfaRecoveryCodes = async (client = getDefaultClient()) => {
|
|
4151
3875
|
const core = getCore(client);
|
|
4152
|
-
return
|
|
3876
|
+
return createApiClient({}, client).getRecoveryCodes({ environmentId: core.environmentId });
|
|
4153
3877
|
};
|
|
4154
|
-
const __getMfaRecoveryCodes_impl = getMfaRecoveryCodes;
|
|
4155
|
-
const __getMfaRecoveryCodes_wrapped = instrumentFunction({
|
|
4156
|
-
fn: __getMfaRecoveryCodes_impl,
|
|
4157
|
-
functionName: "getMfaRecoveryCodes",
|
|
4158
|
-
getCore: () => {
|
|
4159
|
-
try {
|
|
4160
|
-
return getCore(getDefaultClient());
|
|
4161
|
-
} catch {
|
|
4162
|
-
return;
|
|
4163
|
-
}
|
|
4164
|
-
}
|
|
4165
|
-
});
|
|
4166
3878
|
|
|
4167
3879
|
//#endregion
|
|
4168
3880
|
//#region src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts
|
|
@@ -4197,7 +3909,7 @@ const isPendingRecoveryCodesAcknowledgment = (client = getDefaultClient()) => {
|
|
|
4197
3909
|
*/
|
|
4198
3910
|
const registerTotpMfaDevice = async (client = getDefaultClient()) => {
|
|
4199
3911
|
const core = getCore(client);
|
|
4200
|
-
return
|
|
3912
|
+
return createApiClient({ elevatedAccessTokenScope: TokenScope.Credentiallink }, client).registerTotpMfaDevice({ environmentId: core.environmentId });
|
|
4201
3913
|
};
|
|
4202
3914
|
const __registerTotpMfaDevice_impl = registerTotpMfaDevice;
|
|
4203
3915
|
const __registerTotpMfaDevice_wrapped = instrumentFunction({
|
|
@@ -4227,7 +3939,7 @@ const __registerTotpMfaDevice_wrapped = instrumentFunction({
|
|
|
4227
3939
|
*/
|
|
4228
3940
|
const setDefaultMfaDevice = async ({ deviceId }, client = getDefaultClient()) => {
|
|
4229
3941
|
const core = getCore(client);
|
|
4230
|
-
const apiClient =
|
|
3942
|
+
const apiClient = createApiClient({}, client);
|
|
4231
3943
|
assertDefined(deviceId, "deviceId is required");
|
|
4232
3944
|
return apiClient.updateUserMfaDevice({
|
|
4233
3945
|
environmentId: core.environmentId,
|
|
@@ -4262,9 +3974,9 @@ const __setDefaultMfaDevice_wrapped = instrumentFunction({
|
|
|
4262
3974
|
*/
|
|
4263
3975
|
const sendEmailOTP = async ({ email }, client = getDefaultClient()) => {
|
|
4264
3976
|
const core = getCore(client);
|
|
4265
|
-
const { verificationUUID } = await
|
|
3977
|
+
const { verificationUUID } = await createApiClient({}, client).createEmailVerification({
|
|
4266
3978
|
emailVerificationCreateRequest: {
|
|
4267
|
-
captchaToken:
|
|
3979
|
+
captchaToken: consumeCaptchaToken(client),
|
|
4268
3980
|
email
|
|
4269
3981
|
},
|
|
4270
3982
|
environmentId: core.environmentId
|
|
@@ -5223,12 +4935,12 @@ const supportedCountries = {
|
|
|
5223
4935
|
*/
|
|
5224
4936
|
const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = getDefaultClient()) => {
|
|
5225
4937
|
const core = getCore(client);
|
|
5226
|
-
const apiClient =
|
|
4938
|
+
const apiClient = createApiClient({}, client);
|
|
5227
4939
|
const phoneCountryCode = supportedCountries[isoCountryCode].code;
|
|
5228
4940
|
const { verificationUUID } = await apiClient.createSmsVerification({
|
|
5229
4941
|
environmentId: core.environmentId,
|
|
5230
4942
|
smsVerificationCreateRequest: {
|
|
5231
|
-
captchaToken:
|
|
4943
|
+
captchaToken: consumeCaptchaToken(client),
|
|
5232
4944
|
isoCountryCode,
|
|
5233
4945
|
phoneCountryCode,
|
|
5234
4946
|
phoneNumber
|
|
@@ -5260,7 +4972,7 @@ const __sendSmsOTP_wrapped = instrumentFunction({
|
|
|
5260
4972
|
/** @not-instrumented */
|
|
5261
4973
|
const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, client) => {
|
|
5262
4974
|
const core = getCore(client);
|
|
5263
|
-
const apiClient =
|
|
4975
|
+
const apiClient = createApiClient({}, client);
|
|
5264
4976
|
const verifyRequest = {
|
|
5265
4977
|
verificationToken,
|
|
5266
4978
|
verificationUUID: otpVerification.verificationUUID
|
|
@@ -5280,7 +4992,7 @@ const verifyOTPForUserSignIn = async ({ otpVerification, verificationToken }, cl
|
|
|
5280
4992
|
/** @not-instrumented */
|
|
5281
4993
|
const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requestedScopes }, client) => {
|
|
5282
4994
|
const core = getCore(client);
|
|
5283
|
-
const apiClient =
|
|
4995
|
+
const apiClient = createApiClient({}, client);
|
|
5284
4996
|
const verifyRequest = {
|
|
5285
4997
|
verificationToken,
|
|
5286
4998
|
verificationUUID: otpVerification.verificationUUID
|
|
@@ -5321,7 +5033,7 @@ const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }
|
|
|
5321
5033
|
otpVerification,
|
|
5322
5034
|
verificationToken
|
|
5323
5035
|
}, client);
|
|
5324
|
-
|
|
5036
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
5325
5037
|
return response;
|
|
5326
5038
|
};
|
|
5327
5039
|
const __verifyOTP_impl = verifyOTP;
|
|
@@ -5345,11 +5057,11 @@ const __verifyOTP_wrapped = instrumentFunction({
|
|
|
5345
5057
|
* @param params GetSwapQuoteParams - The parameters for the swap quote.
|
|
5346
5058
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5347
5059
|
* @returns The swap quote details. Use the `signingPayload` field to get the transaction data for the wallet to sign.
|
|
5348
|
-
* @instrumented
|
|
5060
|
+
* @not-instrumented
|
|
5349
5061
|
*/
|
|
5350
5062
|
const getSwapQuote = async (params, client = getDefaultClient()) => {
|
|
5351
5063
|
const core = getCore(client);
|
|
5352
|
-
const apiClient =
|
|
5064
|
+
const apiClient = createApiClient({}, client);
|
|
5353
5065
|
if (!params.from.amount && !params.to.amount) throw new InvalidParamError("Either from.amount or to.amount is required");
|
|
5354
5066
|
if (params.from.amount && params.to.amount) throw new InvalidParamError("Only one of from.amount or to.amount is allowed");
|
|
5355
5067
|
return await apiClient.swapQuote({
|
|
@@ -5371,18 +5083,6 @@ const getSwapQuote = async (params, client = getDefaultClient()) => {
|
|
|
5371
5083
|
}
|
|
5372
5084
|
});
|
|
5373
5085
|
};
|
|
5374
|
-
const __getSwapQuote_impl = getSwapQuote;
|
|
5375
|
-
const __getSwapQuote_wrapped = instrumentFunction({
|
|
5376
|
-
fn: __getSwapQuote_impl,
|
|
5377
|
-
functionName: "getSwapQuote",
|
|
5378
|
-
getCore: () => {
|
|
5379
|
-
try {
|
|
5380
|
-
return getCore(getDefaultClient());
|
|
5381
|
-
} catch {
|
|
5382
|
-
return;
|
|
5383
|
-
}
|
|
5384
|
-
}
|
|
5385
|
-
});
|
|
5386
5086
|
|
|
5387
5087
|
//#endregion
|
|
5388
5088
|
//#region src/modules/swap/getSwapStatus/getSwapStatus.ts
|
|
@@ -5392,11 +5092,11 @@ const __getSwapQuote_wrapped = instrumentFunction({
|
|
|
5392
5092
|
* @param params GetSwapStatusParams - The parameters for the swap status.
|
|
5393
5093
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5394
5094
|
* @returns The swap status.
|
|
5395
|
-
* @instrumented
|
|
5095
|
+
* @not-instrumented
|
|
5396
5096
|
*/
|
|
5397
5097
|
const getSwapStatus = async (params, client = getDefaultClient()) => {
|
|
5398
5098
|
const core = getCore(client);
|
|
5399
|
-
const apiClient =
|
|
5099
|
+
const apiClient = createApiClient({}, client);
|
|
5400
5100
|
let from;
|
|
5401
5101
|
if (params.from) from = {
|
|
5402
5102
|
chainId: params.from.networkId,
|
|
@@ -5427,18 +5127,6 @@ const getSwapStatus = async (params, client = getDefaultClient()) => {
|
|
|
5427
5127
|
});
|
|
5428
5128
|
}
|
|
5429
5129
|
};
|
|
5430
|
-
const __getSwapStatus_impl = getSwapStatus;
|
|
5431
|
-
const __getSwapStatus_wrapped = instrumentFunction({
|
|
5432
|
-
fn: __getSwapStatus_impl,
|
|
5433
|
-
functionName: "getSwapStatus",
|
|
5434
|
-
getCore: () => {
|
|
5435
|
-
try {
|
|
5436
|
-
return getCore(getDefaultClient());
|
|
5437
|
-
} catch {
|
|
5438
|
-
return;
|
|
5439
|
-
}
|
|
5440
|
-
}
|
|
5441
|
-
});
|
|
5442
5130
|
|
|
5443
5131
|
//#endregion
|
|
5444
5132
|
//#region src/modules/user/deleteUser/deleteUser.ts
|
|
@@ -5454,7 +5142,7 @@ const __getSwapStatus_wrapped = instrumentFunction({
|
|
|
5454
5142
|
*/
|
|
5455
5143
|
const deleteUser = async (client = getDefaultClient()) => {
|
|
5456
5144
|
const core = getCore(client);
|
|
5457
|
-
await
|
|
5145
|
+
await createApiClient({ includeMfaToken: true }, client).hardDeleteUser({ environmentId: core.environmentId });
|
|
5458
5146
|
await __logoutWithReason_wrapped({ reason: "user-deleted" }, client);
|
|
5459
5147
|
};
|
|
5460
5148
|
const __deleteUser_impl = deleteUser;
|
|
@@ -5510,7 +5198,7 @@ const isUserOnboardingComplete = (client = getDefaultClient()) => {
|
|
|
5510
5198
|
* @not-instrumented
|
|
5511
5199
|
*/
|
|
5512
5200
|
const assertWalletAccountSigningAvailability = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
5513
|
-
const { addresses } = await
|
|
5201
|
+
const { addresses } = await getWalletProviderFromWalletAccount({ walletAccount }, client).getConnectedAddresses();
|
|
5514
5202
|
if (addresses.length > 0 && !addresses.includes(walletAccount.address)) throw new WalletAccountNotSelectedError({
|
|
5515
5203
|
expectedAddress: walletAccount.address,
|
|
5516
5204
|
selectedAddress: addresses[0]
|
|
@@ -5534,7 +5222,7 @@ const assertWalletAccountSigningAvailability = async ({ walletAccount }, client
|
|
|
5534
5222
|
* @instrumented
|
|
5535
5223
|
*/
|
|
5536
5224
|
const confirmTransaction = async ({ walletAccount, transactionHash }, client = getDefaultClient()) => {
|
|
5537
|
-
const walletProvider =
|
|
5225
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
5538
5226
|
assertWalletProviderMethodDefined(walletProvider, "confirmTransaction");
|
|
5539
5227
|
await walletProvider.confirmTransaction({
|
|
5540
5228
|
transactionHash,
|
|
@@ -5610,7 +5298,7 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
5610
5298
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
5611
5299
|
assertWalletProviderMethodDefined(walletProvider, "connect");
|
|
5612
5300
|
const { addresses } = await walletProvider.connect();
|
|
5613
|
-
const currentAddresses =
|
|
5301
|
+
const currentAddresses = getWalletAccounts(client).map(({ address }) => address);
|
|
5614
5302
|
const mainAddress = addresses?.length ? addresses[0].address : null;
|
|
5615
5303
|
/**
|
|
5616
5304
|
* This error is thrown in case the wallet has no addresses connected
|
|
@@ -5634,9 +5322,9 @@ const connectWithWalletProvider = async ({ walletProviderKey, addToDynamicWallet
|
|
|
5634
5322
|
};
|
|
5635
5323
|
if (currentAddresses.includes(mainAddress)) return walletAccount;
|
|
5636
5324
|
if (addToDynamicWalletAccounts) {
|
|
5637
|
-
|
|
5325
|
+
setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [walletAccount] }, client);
|
|
5638
5326
|
emitWalletAccountsChangedEvent(client);
|
|
5639
|
-
|
|
5327
|
+
createVisit({ walletAccount }, client);
|
|
5640
5328
|
}
|
|
5641
5329
|
return walletAccount;
|
|
5642
5330
|
};
|
|
@@ -5688,8 +5376,8 @@ const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client)
|
|
|
5688
5376
|
assertDefined(universalLink, "Universal link is not set");
|
|
5689
5377
|
const url = new URL(universalLink);
|
|
5690
5378
|
const domain = url.host;
|
|
5691
|
-
const nonce = nonceOverride ?? await
|
|
5692
|
-
const walletProvider =
|
|
5379
|
+
const nonce = nonceOverride ?? await getNonce(client);
|
|
5380
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
5693
5381
|
if (walletProvider.chain === "STARK")
|
|
5694
5382
|
/**
|
|
5695
5383
|
* Starknet requires the strings to be 31 chars long
|
|
@@ -5700,7 +5388,7 @@ const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client)
|
|
|
5700
5388
|
domain: domain.substring(0, 31),
|
|
5701
5389
|
nonce
|
|
5702
5390
|
});
|
|
5703
|
-
const statement =
|
|
5391
|
+
const statement = createSignInMessageStatement(client);
|
|
5704
5392
|
return await formatSignInMessage({
|
|
5705
5393
|
address: walletAccount.address,
|
|
5706
5394
|
blockchainName: CHAINS_INFO_MAP[walletProvider.chain].blockchainName,
|
|
@@ -5728,7 +5416,7 @@ const getSignInMessage = async ({ nonce: nonceOverride, walletAccount }, client)
|
|
|
5728
5416
|
* @instrumented
|
|
5729
5417
|
*/
|
|
5730
5418
|
const proveWalletAccountOwnership = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
5731
|
-
const walletProvider =
|
|
5419
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
5732
5420
|
assertWalletProviderMethodDefined(walletProvider, "signMessage");
|
|
5733
5421
|
const messageToSign = await getSignInMessage({
|
|
5734
5422
|
nonce: walletProvider.getConnectProofNonce?.(),
|
|
@@ -5772,14 +5460,14 @@ const isSameAddress = ({ chain, left, right }) => normalizeAddress({
|
|
|
5772
5460
|
/** @not-instrumented */
|
|
5773
5461
|
const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfer, requestedScopes }, client) => {
|
|
5774
5462
|
if (walletAccount.verifiedCredentialId) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
|
|
5775
|
-
const walletProvider =
|
|
5463
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
5776
5464
|
const { messageToSign, signature } = await __proveWalletAccountOwnership_wrapped({ walletAccount }, client);
|
|
5777
5465
|
const formattedSignature = walletAccount.hardwareWalletVendor ? formatSignatureForHardwareWallet({
|
|
5778
5466
|
hardwareWalletVendor: walletAccount.hardwareWalletVendor,
|
|
5779
5467
|
signature
|
|
5780
5468
|
}) : signature;
|
|
5781
5469
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
5782
|
-
const response = await
|
|
5470
|
+
const response = await verifyMessageSignatureOwnership({
|
|
5783
5471
|
addressesWithTypes: walletAccount.addressesWithTypes,
|
|
5784
5472
|
chain: walletAccount.chain,
|
|
5785
5473
|
isTransfer,
|
|
@@ -5797,17 +5485,17 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
|
|
|
5797
5485
|
right: walletAccount.address
|
|
5798
5486
|
}));
|
|
5799
5487
|
assertDefined(walletVerifiedCredential, `After verifying, still unable to find verified wallet credential for wallet account ${walletAccount.address} on chain ${walletAccount.chain}`);
|
|
5800
|
-
|
|
5488
|
+
updateWalletProviderKeysForVerifiedCredentials({ keysToUpdate: { [walletVerifiedCredential.id]: walletProvider.key } }, client);
|
|
5801
5489
|
/**
|
|
5802
5490
|
* Adds the user with the new wallet verified credential
|
|
5803
5491
|
* This will add the new verified wallet account to the client`s state
|
|
5804
5492
|
*/
|
|
5805
|
-
|
|
5493
|
+
updateAuthFromVerifyResponse({ response }, client);
|
|
5806
5494
|
/**
|
|
5807
5495
|
* Remove the now verified wallet account from the unverified wallet accounts
|
|
5808
5496
|
*/
|
|
5809
|
-
|
|
5810
|
-
const verifiedWalletAccount =
|
|
5497
|
+
removeUnverifiedWalletAccount({ unverifiedWalletAccount: walletAccount }, client);
|
|
5498
|
+
const verifiedWalletAccount = getWalletAccounts(client).find(({ address }) => isSameAddress({
|
|
5811
5499
|
chain: walletAccount.chain,
|
|
5812
5500
|
left: address,
|
|
5813
5501
|
right: walletAccount.address
|
|
@@ -5893,7 +5581,7 @@ const connectAndVerifyWithWalletProvider = async ({ walletProviderKey, hardwareW
|
|
|
5893
5581
|
walletProviderKey
|
|
5894
5582
|
}, client);
|
|
5895
5583
|
await __verifyWalletAccount_wrapped({ walletAccount }, client);
|
|
5896
|
-
|
|
5584
|
+
createVisit({
|
|
5897
5585
|
authMode: AuthModeEnum.AndSign,
|
|
5898
5586
|
walletAccount
|
|
5899
5587
|
}, client);
|
|
@@ -5922,10 +5610,10 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
5922
5610
|
*
|
|
5923
5611
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5924
5612
|
* @returns An array of wallet provider data including chain, keys, and metadata.
|
|
5925
|
-
* @instrumented
|
|
5613
|
+
* @not-instrumented
|
|
5926
5614
|
*/
|
|
5927
5615
|
const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
5928
|
-
return
|
|
5616
|
+
return getWalletProviders(client).filter((walletProvider) => Boolean(walletProvider.connect)).map((walletProvider) => ({
|
|
5929
5617
|
chain: walletProvider.chain,
|
|
5930
5618
|
groupKey: walletProvider.groupKey,
|
|
5931
5619
|
key: walletProvider.key,
|
|
@@ -5933,18 +5621,6 @@ const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
|
5933
5621
|
walletProviderType: walletProvider.walletProviderType
|
|
5934
5622
|
}));
|
|
5935
5623
|
};
|
|
5936
|
-
const __getAvailableWalletProvidersData_impl = getAvailableWalletProvidersData;
|
|
5937
|
-
const __getAvailableWalletProvidersData_wrapped = instrumentFunction({
|
|
5938
|
-
fn: __getAvailableWalletProvidersData_impl,
|
|
5939
|
-
functionName: "getAvailableWalletProvidersData",
|
|
5940
|
-
getCore: () => {
|
|
5941
|
-
try {
|
|
5942
|
-
return getCore(getDefaultClient());
|
|
5943
|
-
} catch {
|
|
5944
|
-
return;
|
|
5945
|
-
}
|
|
5946
|
-
}
|
|
5947
|
-
});
|
|
5948
5624
|
|
|
5949
5625
|
//#endregion
|
|
5950
5626
|
//#region src/modules/wallets/getConnectedAddresses/getConnectedAddresses.ts
|
|
@@ -5957,44 +5633,20 @@ const __getAvailableWalletProvidersData_wrapped = instrumentFunction({
|
|
|
5957
5633
|
* @param params.walletProviderKey - The unique key of the wallet provider to query.
|
|
5958
5634
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
5959
5635
|
* @returns An array of connected wallet addresses.
|
|
5960
|
-
* @instrumented
|
|
5636
|
+
* @not-instrumented
|
|
5961
5637
|
*/
|
|
5962
5638
|
const getConnectedAddresses = ({ walletProviderKey }, client = getDefaultClient()) => {
|
|
5963
5639
|
return getWalletProviderByKey({ walletProviderKey }, client).getConnectedAddresses();
|
|
5964
5640
|
};
|
|
5965
|
-
const __getConnectedAddresses_impl = getConnectedAddresses;
|
|
5966
|
-
const __getConnectedAddresses_wrapped = instrumentFunction({
|
|
5967
|
-
fn: __getConnectedAddresses_impl,
|
|
5968
|
-
functionName: "getConnectedAddresses",
|
|
5969
|
-
getCore: () => {
|
|
5970
|
-
try {
|
|
5971
|
-
return getCore(getDefaultClient());
|
|
5972
|
-
} catch {
|
|
5973
|
-
return;
|
|
5974
|
-
}
|
|
5975
|
-
}
|
|
5976
|
-
});
|
|
5977
5641
|
|
|
5978
5642
|
//#endregion
|
|
5979
5643
|
//#region src/modules/wallets/getOwnerWalletAccountForSmartWalletAccount/getOwnerWalletAccountForSmartWalletAccount.ts
|
|
5980
|
-
/** @instrumented */
|
|
5644
|
+
/** @not-instrumented */
|
|
5981
5645
|
const getOwnerWalletAccountForSmartWalletAccount = ({ smartWalletAccount }, client = getDefaultClient()) => {
|
|
5982
|
-
const smartWalletVerifiedCredential =
|
|
5646
|
+
const smartWalletVerifiedCredential = getVerifiedCredentialForWalletAccount({ walletAccount: smartWalletAccount }, client);
|
|
5983
5647
|
assertDefined(smartWalletVerifiedCredential?.signerRefId, "Invalid smart wallet account");
|
|
5984
|
-
return
|
|
5648
|
+
return getWalletAccounts(client).find((walletAccount) => walletAccount.verifiedCredentialId === smartWalletVerifiedCredential.signerRefId);
|
|
5985
5649
|
};
|
|
5986
|
-
const __getOwnerWalletAccountForSmartWalletAccount_impl = getOwnerWalletAccountForSmartWalletAccount;
|
|
5987
|
-
const __getOwnerWalletAccountForSmartWalletAccount_wrapped = instrumentFunction({
|
|
5988
|
-
fn: __getOwnerWalletAccountForSmartWalletAccount_impl,
|
|
5989
|
-
functionName: "getOwnerWalletAccountForSmartWalletAccount",
|
|
5990
|
-
getCore: () => {
|
|
5991
|
-
try {
|
|
5992
|
-
return getCore(getDefaultClient());
|
|
5993
|
-
} catch {
|
|
5994
|
-
return;
|
|
5995
|
-
}
|
|
5996
|
-
}
|
|
5997
|
-
});
|
|
5998
5650
|
|
|
5999
5651
|
//#endregion
|
|
6000
5652
|
//#region src/modules/wallets/getWalletAccountAddressByType/getWalletAccountAddressByType.ts
|
|
@@ -6112,25 +5764,13 @@ const __addNetwork_wrapped = instrumentFunction({
|
|
|
6112
5764
|
* @param params.walletAccount - The wallet account to get network data for.
|
|
6113
5765
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6114
5766
|
* @returns A promise that resolves to the network data, or undefined if not found.
|
|
6115
|
-
* @instrumented
|
|
5767
|
+
* @not-instrumented
|
|
6116
5768
|
*/
|
|
6117
5769
|
const getActiveNetworkData = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
6118
|
-
const walletProvider =
|
|
5770
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
6119
5771
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
6120
|
-
return { networkData:
|
|
5772
|
+
return { networkData: getNetworksData(client).find((data) => data.networkId === networkId && data.chain === walletProvider.chain) };
|
|
6121
5773
|
};
|
|
6122
|
-
const __getActiveNetworkData_impl = getActiveNetworkData;
|
|
6123
|
-
const __getActiveNetworkData_wrapped = instrumentFunction({
|
|
6124
|
-
fn: __getActiveNetworkData_impl,
|
|
6125
|
-
functionName: "getActiveNetworkData",
|
|
6126
|
-
getCore: () => {
|
|
6127
|
-
try {
|
|
6128
|
-
return getCore(getDefaultClient());
|
|
6129
|
-
} catch {
|
|
6130
|
-
return;
|
|
6131
|
-
}
|
|
6132
|
-
}
|
|
6133
|
-
});
|
|
6134
5774
|
|
|
6135
5775
|
//#endregion
|
|
6136
5776
|
//#region src/modules/wallets/networks/getActiveNetworkId/getActiveNetworkId.ts
|
|
@@ -6140,23 +5780,11 @@ const __getActiveNetworkData_wrapped = instrumentFunction({
|
|
|
6140
5780
|
* @param params.walletAccount - The wallet account to get the network ID for.
|
|
6141
5781
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6142
5782
|
* @returns A promise that resolves to the active network ID for the wallet account.
|
|
6143
|
-
* @instrumented
|
|
5783
|
+
* @not-instrumented
|
|
6144
5784
|
*/
|
|
6145
5785
|
const getActiveNetworkId = ({ walletAccount }, client = getDefaultClient()) => {
|
|
6146
|
-
return
|
|
5786
|
+
return getWalletProviderFromWalletAccount({ walletAccount }, client).getActiveNetworkId();
|
|
6147
5787
|
};
|
|
6148
|
-
const __getActiveNetworkId_impl = getActiveNetworkId;
|
|
6149
|
-
const __getActiveNetworkId_wrapped = instrumentFunction({
|
|
6150
|
-
fn: __getActiveNetworkId_impl,
|
|
6151
|
-
functionName: "getActiveNetworkId",
|
|
6152
|
-
getCore: () => {
|
|
6153
|
-
try {
|
|
6154
|
-
return getCore(getDefaultClient());
|
|
6155
|
-
} catch {
|
|
6156
|
-
return;
|
|
6157
|
-
}
|
|
6158
|
-
}
|
|
6159
|
-
});
|
|
6160
5788
|
|
|
6161
5789
|
//#endregion
|
|
6162
5790
|
//#region src/modules/wallets/networks/getBalance/getBalance.ts
|
|
@@ -6169,28 +5797,16 @@ const __getActiveNetworkId_wrapped = instrumentFunction({
|
|
|
6169
5797
|
* @param params.walletAccount - The wallet account to get the balance for.
|
|
6170
5798
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6171
5799
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
6172
|
-
* @instrumented
|
|
5800
|
+
* @not-instrumented
|
|
6173
5801
|
*/
|
|
6174
5802
|
const getBalance = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
6175
|
-
const walletProvider =
|
|
5803
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
6176
5804
|
const { networkId } = await walletProvider.getActiveNetworkId();
|
|
6177
|
-
return
|
|
5805
|
+
return getNetworkProviderFromNetworkId({
|
|
6178
5806
|
chain: walletProvider.chain,
|
|
6179
5807
|
networkId
|
|
6180
5808
|
}, client).getBalance({ address: walletAccount.address });
|
|
6181
5809
|
};
|
|
6182
|
-
const __getBalance_impl = getBalance;
|
|
6183
|
-
const __getBalance_wrapped = instrumentFunction({
|
|
6184
|
-
fn: __getBalance_impl,
|
|
6185
|
-
functionName: "getBalance",
|
|
6186
|
-
getCore: () => {
|
|
6187
|
-
try {
|
|
6188
|
-
return getCore(getDefaultClient());
|
|
6189
|
-
} catch {
|
|
6190
|
-
return;
|
|
6191
|
-
}
|
|
6192
|
-
}
|
|
6193
|
-
});
|
|
6194
5810
|
|
|
6195
5811
|
//#endregion
|
|
6196
5812
|
//#region src/modules/wallets/networks/getBalanceForAddress/getBalanceForAddress.ts
|
|
@@ -6205,28 +5821,16 @@ const __getBalance_wrapped = instrumentFunction({
|
|
|
6205
5821
|
* @param params.networkId - The specific network ID within the chain.
|
|
6206
5822
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6207
5823
|
* @returns A promise that resolves to an object containing the balance as a string or null.
|
|
6208
|
-
* @instrumented
|
|
5824
|
+
* @not-instrumented
|
|
6209
5825
|
*/
|
|
6210
5826
|
const getBalanceForAddress = async ({ address, chain, networkId }, client = getDefaultClient()) => {
|
|
6211
|
-
const networkProvider =
|
|
5827
|
+
const networkProvider = getNetworkProviderFromNetworkId({
|
|
6212
5828
|
chain,
|
|
6213
5829
|
networkId
|
|
6214
5830
|
}, client);
|
|
6215
5831
|
assertDefined(networkProvider, `No network found for chain ${chain} and network id ${networkId}. Please ensure you've enabled this network in the Dashboard.`);
|
|
6216
5832
|
return networkProvider.getBalance({ address });
|
|
6217
5833
|
};
|
|
6218
|
-
const __getBalanceForAddress_impl = getBalanceForAddress;
|
|
6219
|
-
const __getBalanceForAddress_wrapped = instrumentFunction({
|
|
6220
|
-
fn: __getBalanceForAddress_impl,
|
|
6221
|
-
functionName: "getBalanceForAddress",
|
|
6222
|
-
getCore: () => {
|
|
6223
|
-
try {
|
|
6224
|
-
return getCore(getDefaultClient());
|
|
6225
|
-
} catch {
|
|
6226
|
-
return;
|
|
6227
|
-
}
|
|
6228
|
-
}
|
|
6229
|
-
});
|
|
6230
5834
|
|
|
6231
5835
|
//#endregion
|
|
6232
5836
|
//#region src/modules/wallets/networks/getTransactionHistory/getTransactionHistory.ts
|
|
@@ -6243,29 +5847,17 @@ const __getBalanceForAddress_wrapped = instrumentFunction({
|
|
|
6243
5847
|
* @param [params.offset] - The offset to use for pagination.
|
|
6244
5848
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6245
5849
|
* @returns A promise that resolves to the transaction history along with nextOffset for the given wallet address and chain.
|
|
6246
|
-
* @instrumented
|
|
5850
|
+
* @not-instrumented
|
|
6247
5851
|
*/
|
|
6248
5852
|
const getTransactionHistory = async (params, client = getDefaultClient()) => {
|
|
6249
5853
|
const core = getCore(client);
|
|
6250
|
-
return await
|
|
5854
|
+
return await createApiClient({}, client).getWalletTransactions({
|
|
6251
5855
|
address: params.address,
|
|
6252
5856
|
chainName: params.chain,
|
|
6253
5857
|
environmentId: core.environmentId,
|
|
6254
5858
|
networkId: params.networkId
|
|
6255
5859
|
});
|
|
6256
5860
|
};
|
|
6257
|
-
const __getTransactionHistory_impl = getTransactionHistory;
|
|
6258
|
-
const __getTransactionHistory_wrapped = instrumentFunction({
|
|
6259
|
-
fn: __getTransactionHistory_impl,
|
|
6260
|
-
functionName: "getTransactionHistory",
|
|
6261
|
-
getCore: () => {
|
|
6262
|
-
try {
|
|
6263
|
-
return getCore(getDefaultClient());
|
|
6264
|
-
} catch {
|
|
6265
|
-
return;
|
|
6266
|
-
}
|
|
6267
|
-
}
|
|
6268
|
-
});
|
|
6269
5861
|
|
|
6270
5862
|
//#endregion
|
|
6271
5863
|
//#region src/modules/wallets/networks/isProgrammaticNetworkSwitchAvailable/isProgrammaticNetworkSwitchAvailable.ts
|
|
@@ -6329,12 +5921,12 @@ const __switchActiveNetwork_wrapped = instrumentFunction({
|
|
|
6329
5921
|
*/
|
|
6330
5922
|
const selectPrimaryWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
6331
5923
|
const core = getCore(client);
|
|
6332
|
-
if (
|
|
6333
|
-
if (walletAccount.verifiedCredentialId)
|
|
5924
|
+
if (getPrimaryWalletAccount(client)?.id === walletAccount.id) return;
|
|
5925
|
+
if (walletAccount.verifiedCredentialId) updateAuthFromVerifyResponse({ response: await createApiClient({}, client).selectUserWallet({
|
|
6334
5926
|
environmentId: core.environmentId,
|
|
6335
5927
|
userWalletSelectionRequest: { walletId: walletAccount.verifiedCredentialId }
|
|
6336
5928
|
}) }, client);
|
|
6337
|
-
else
|
|
5929
|
+
else setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: [{
|
|
6338
5930
|
...walletAccount,
|
|
6339
5931
|
lastSelectedAt: /* @__PURE__ */ new Date()
|
|
6340
5932
|
}] }, client);
|
|
@@ -6363,7 +5955,7 @@ const __selectPrimaryWalletAccount_wrapped = instrumentFunction({
|
|
|
6363
5955
|
*/
|
|
6364
5956
|
const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
6365
5957
|
try {
|
|
6366
|
-
await
|
|
5958
|
+
await getWalletProviderFromWalletAccount({ walletAccount }, client).disconnectWalletAccount?.({ walletAccount });
|
|
6367
5959
|
} catch (error) {
|
|
6368
5960
|
if (error instanceof NoWalletProviderFoundError) return;
|
|
6369
5961
|
throw error;
|
|
@@ -6386,13 +5978,13 @@ const disconnectWalletAccount = async ({ walletAccount }, client) => {
|
|
|
6386
5978
|
*/
|
|
6387
5979
|
const removeWalletAccount = async ({ walletAccount }, client = getDefaultClient()) => {
|
|
6388
5980
|
const core = getCore(client);
|
|
6389
|
-
const apiClient =
|
|
5981
|
+
const apiClient = createApiClient({}, client);
|
|
6390
5982
|
await disconnectWalletAccount({ walletAccount }, client);
|
|
6391
5983
|
if (!walletAccount.verifiedCredentialId) {
|
|
6392
|
-
|
|
5984
|
+
removeUnverifiedWalletAccount({ unverifiedWalletAccount: walletAccount }, client);
|
|
6393
5985
|
return;
|
|
6394
5986
|
}
|
|
6395
|
-
|
|
5987
|
+
updateAuthFromVerifyResponse({ response: await apiClient.verifyUnlink({
|
|
6396
5988
|
environmentId: core.environmentId,
|
|
6397
5989
|
verifyUnlinkRequest: { walletId: walletAccount.verifiedCredentialId }
|
|
6398
5990
|
}) }, client);
|
|
@@ -6425,7 +6017,7 @@ const __removeWalletAccount_wrapped = instrumentFunction({
|
|
|
6425
6017
|
* @instrumented
|
|
6426
6018
|
*/
|
|
6427
6019
|
const signMessage = async ({ walletAccount, message }, client = getDefaultClient()) => {
|
|
6428
|
-
const walletProvider =
|
|
6020
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
6429
6021
|
assertWalletProviderMethodDefined(walletProvider, "signMessage");
|
|
6430
6022
|
const { signature } = await walletProvider.signMessage({
|
|
6431
6023
|
message,
|
|
@@ -6464,7 +6056,7 @@ const __signMessage_wrapped = instrumentFunction({
|
|
|
6464
6056
|
* @instrumented
|
|
6465
6057
|
*/
|
|
6466
6058
|
const transferAmount = async ({ walletAccount, amount, recipient, token }, client = getDefaultClient()) => {
|
|
6467
|
-
const walletProvider =
|
|
6059
|
+
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
6468
6060
|
assertWalletProviderMethodDefined(walletProvider, "transferAmount");
|
|
6469
6061
|
const { transactionHash } = await walletProvider.transferAmount({
|
|
6470
6062
|
amount,
|
|
@@ -6537,7 +6129,7 @@ const __transferWalletAccount_wrapped = instrumentFunction({
|
|
|
6537
6129
|
* @not-instrumented
|
|
6538
6130
|
*/
|
|
6539
6131
|
const getWalletAccountFromAddress = ({ address, chain }, client = getDefaultClient()) => {
|
|
6540
|
-
return
|
|
6132
|
+
return getWalletAccounts(client).find((walletAccount) => walletAccount.address === address && walletAccount.chain === chain);
|
|
6541
6133
|
};
|
|
6542
6134
|
|
|
6543
6135
|
//#endregion
|
|
@@ -6551,25 +6143,13 @@ const getWalletAccountFromAddress = ({ address, chain }, client = getDefaultClie
|
|
|
6551
6143
|
* @param params.event - The event name to remove the listener from.
|
|
6552
6144
|
* @param params.walletProviderKey - The unique key identifying the wallet provider to remove the listener from.
|
|
6553
6145
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6554
|
-
* @instrumented
|
|
6146
|
+
* @not-instrumented
|
|
6555
6147
|
*/
|
|
6556
6148
|
const offWalletProviderEvent = ({ callback, event, walletProviderKey }, client = getDefaultClient()) => {
|
|
6557
6149
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
6558
6150
|
assertWalletProviderMethodDefined(walletProvider, "events");
|
|
6559
6151
|
walletProvider.events.off(event, callback);
|
|
6560
6152
|
};
|
|
6561
|
-
const __offWalletProviderEvent_impl = offWalletProviderEvent;
|
|
6562
|
-
const __offWalletProviderEvent_wrapped = instrumentFunction({
|
|
6563
|
-
fn: __offWalletProviderEvent_impl,
|
|
6564
|
-
functionName: "offWalletProviderEvent",
|
|
6565
|
-
getCore: () => {
|
|
6566
|
-
try {
|
|
6567
|
-
return getCore(getDefaultClient());
|
|
6568
|
-
} catch {
|
|
6569
|
-
return;
|
|
6570
|
-
}
|
|
6571
|
-
}
|
|
6572
|
-
});
|
|
6573
6153
|
|
|
6574
6154
|
//#endregion
|
|
6575
6155
|
//#region src/modules/wallets/walletProvider/events/onWalletProviderEvent/onWalletProviderEvent.ts
|
|
@@ -6581,7 +6161,7 @@ const __offWalletProviderEvent_wrapped = instrumentFunction({
|
|
|
6581
6161
|
* @param params.walletProviderKey - The unique key identifying the wallet provider to listen to.
|
|
6582
6162
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6583
6163
|
* @returns A function that can be called to remove the listener.
|
|
6584
|
-
* @instrumented
|
|
6164
|
+
* @not-instrumented
|
|
6585
6165
|
*/
|
|
6586
6166
|
const onWalletProviderEvent = ({ callback, event, walletProviderKey }, client = getDefaultClient()) => {
|
|
6587
6167
|
const walletProvider = getWalletProviderByKey({ walletProviderKey }, client);
|
|
@@ -6591,18 +6171,6 @@ const onWalletProviderEvent = ({ callback, event, walletProviderKey }, client =
|
|
|
6591
6171
|
walletProvider.events.off(event, callback);
|
|
6592
6172
|
};
|
|
6593
6173
|
};
|
|
6594
|
-
const __onWalletProviderEvent_impl = onWalletProviderEvent;
|
|
6595
|
-
const __onWalletProviderEvent_wrapped = instrumentFunction({
|
|
6596
|
-
fn: __onWalletProviderEvent_impl,
|
|
6597
|
-
functionName: "onWalletProviderEvent",
|
|
6598
|
-
getCore: () => {
|
|
6599
|
-
try {
|
|
6600
|
-
return getCore(getDefaultClient());
|
|
6601
|
-
} catch {
|
|
6602
|
-
return;
|
|
6603
|
-
}
|
|
6604
|
-
}
|
|
6605
|
-
});
|
|
6606
6174
|
|
|
6607
6175
|
//#endregion
|
|
6608
6176
|
//#region src/utils/parseUserAgent/parseUserAgent.ts
|
|
@@ -6685,5 +6253,5 @@ const parseUserAgent = ({ userAgent }) => {
|
|
|
6685
6253
|
assertPackageVersion(name, version);
|
|
6686
6254
|
|
|
6687
6255
|
//#endregion
|
|
6688
|
-
export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes,
|
|
6256
|
+
export { BaseError, CheckoutSessionTokenMissingError, ClientAlreadyInitializedError, DeeplinkConnectAndVerifyUnsupportedError, FeeEstimationFailedError, InvalidDeviceRegistrationRedirectError, InvalidExternalAuthError, InvalidParamError, InvalidRedirectStorageStateError, LinkCredentialError, MFAAction, MfaInvalidOtpError, MfaRateLimitedError, MissingRedirectStorageStateError, MissingSocialUrlParamError, MissingUserVerificationError, NetworkAddingUnavailableError, NetworkNotAddedError, NetworkSwitchingUnavailableError, NoAddressFoundError, NoNetworkProvidersError, NoPasskeyCredentialsFoundError, NoSmartWalletAccountSignerFoundError, NoWebAuthNSupportError, NotWaasWalletAccountError, SandboxMaximumThresholdReachedError, SimulationFailedError, TokenSwapError, UnauthorizedError, UnavailableInServerSideError, UnrecognizedNetworkError, UserNotAuthenticatedError, UserRejectedError, WalletAccountAlreadyVerifiedError, WalletAccountNotSelectedError, WalletAlreadyLinkedToAnotherUserError, WalletProviderMethodUnavailableError, __acknowledgeRecoveryCodes_wrapped as acknowledgeRecoveryCodes, addCoinbaseOnrampOrderEventListener, __addNetwork_wrapped as addNetwork, assertWalletAccountSigningAvailability, assertWalletProviderMethodDefined, __attachCheckoutTransactionSource_wrapped as attachCheckoutTransactionSource, authenticateMfaRecoveryCode, authenticatePasskeyMFA, authenticateTotpMfaDevice, __authenticateWithSocial_wrapped as authenticateWithSocial, __broadcastCheckoutTransaction_wrapped as broadcastCheckoutTransaction, canConnectWithHardwareWallet, __cancelCheckoutTransaction_wrapped as cancelCheckoutTransaction, __checkStepUpAuth_wrapped as checkStepUpAuth, __completeDeviceRegistration_wrapped as completeDeviceRegistration, __completeSocialAuthentication_wrapped as completeSocialAuthentication, __completeSocialRedirect_wrapped as completeSocialRedirect, __confirmTransaction_wrapped as confirmTransaction, __connectAndVerifyWithWalletProvider_wrapped as connectAndVerifyWithWalletProvider, __connectWithWalletProvider_wrapped as connectWithWalletProvider, __consumeMfaToken_wrapped as consumeMfaToken, __createCheckoutTransaction_wrapped as createCheckoutTransaction, __createCoinbaseOnrampOrder_wrapped as createCoinbaseOnrampOrder, __createCryptoDotComPayment_wrapped as createCryptoDotComPayment, __createDynamicClient_wrapped as createDynamicClient, __createKrakenExchangeTransfer_wrapped as createKrakenExchangeTransfer, __createNewMfaRecoveryCodes_wrapped as createNewMfaRecoveryCodes, __deleteMfaDevice_wrapped as deleteMfaDevice, __deletePasskey_wrapped as deletePasskey, __deleteUser_wrapped as deleteUser, detectDeviceRegistrationRedirect, detectOAuthRedirect, detectSocialRedirectUrl, __executeSwapTransaction_wrapped as executeSwapTransaction, fetchProjectSettings, getActiveNetworkData, getActiveNetworkId, getAvailableWalletProvidersData, getBalance, getBalanceForAddress, getBalances, getCheckoutTransaction, getCheckoutTransactionQuote, getCoinbaseBuyUrl, getConnectedAddresses, getDefaultClient, getDeviceRegistrationTokenFromUrl, __getElevatedAccessToken_wrapped as getElevatedAccessToken, getKrakenAccounts, getKrakenWhitelistedAddresses, getMfaDevices, getMfaMethods, getMfaRecoveryCodes, getMissingVerificationForCoinbaseOnrampOrder, getMultichainBalances, getNetworksData, getOwnerWalletAccountForSmartWalletAccount, getPasskeys, getPrimaryWalletAccount, getRegisteredDevices, getSwapQuote, getSwapStatus, getTransactionHistory, getUserSocialAccounts, getWalletAccountAddressByType, getWalletAccountFromAddress, getWalletAccounts, getWalletConnectCatalog, getWalletConnectCatalogWalletByWalletProviderKey, getWalletProviderDataByKey, hasExtension, __initializeClient_wrapped as initializeClient, isCaptchaRequired, isDeeplinkWalletProvider, isDeviceRegistrationRequired, isHardwareWalletAccount, isMfaRequiredForAction, isMobile, isPendingRecoveryCodesAcknowledgment, isProgrammaticNetworkSwitchAvailable, isSignedIn, isUserMissingMfaAuth, isUserOnboardingComplete, isWalletAccountVerified, logout, offEvent, offWalletProviderEvent, onEvent, onWalletProviderEvent, onceEvent, parseUserAgent, __prepareCheckoutTransaction_wrapped as prepareCheckoutTransaction, __proveWalletAccountOwnership_wrapped as proveWalletAccountOwnership, __refreshAuth_wrapped as refreshAuth, __refreshUser_wrapped as refreshUser, __registerPasskey_wrapped as registerPasskey, __registerTotpMfaDevice_wrapped as registerTotpMfaDevice, __removeWalletAccount_wrapped as removeWalletAccount, __requestExternalAuthElevatedToken_wrapped as requestExternalAuthElevatedToken, requiresConversion, __revokeAllRegisteredDevices_wrapped as revokeAllRegisteredDevices, __revokeRegisteredDevice_wrapped as revokeRegisteredDevice, __selectPrimaryWalletAccount_wrapped as selectPrimaryWalletAccount, __sendEmailOTP_wrapped as sendEmailOTP, __sendSmsOTP_wrapped as sendSmsOTP, __setCaptchaToken_wrapped as setCaptchaToken, __setDefaultMfaDevice_wrapped as setDefaultMfaDevice, __setInstrumentationEnabled_wrapped as setInstrumentationEnabled, __signInWithExternalJwt_wrapped as signInWithExternalJwt, __signInWithPasskey_wrapped as signInWithPasskey, __signInWithSocialRedirect_wrapped as signInWithSocialRedirect, __signMessage_wrapped as signMessage, __submitCheckoutTransaction_wrapped as submitCheckoutTransaction, supportedCountries, __switchActiveNetwork_wrapped as switchActiveNetwork, trackCheckoutTransaction, __transferAmount_wrapped as transferAmount, __transferWalletAccount_wrapped as transferWalletAccount, __unlinkSocialAccount_wrapped as unlinkSocialAccount, __updateUser_wrapped as updateUser, __verifyOTP_wrapped as verifyOTP, __verifyWalletAccount_wrapped as verifyWalletAccount, waitForClientInitialized };
|
|
6689
6257
|
//# sourceMappingURL=index.native.esm.js.map
|