@dynamic-labs-sdk/client 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{InvalidParamError-DQvZQdQ9.cjs → InvalidParamError-DKJhDrK8.cjs} +1056 -110
- package/dist/InvalidParamError-DKJhDrK8.cjs.map +1 -0
- package/dist/{InvalidParamError-Za4cvW7K.esm.js → InvalidParamError-DWjMfOZ5.esm.js} +852 -95
- package/dist/InvalidParamError-DWjMfOZ5.esm.js.map +1 -0
- package/dist/{InvalidParamError-9kQBK3sP.native.esm.js → InvalidParamError-DkAMYJOW.native.esm.js} +885 -95
- package/dist/InvalidParamError-DkAMYJOW.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-By3Y4taq.esm.js → NotWaasWalletAccountError-BVrvQzLz.native.esm.js} +7 -5
- package/dist/NotWaasWalletAccountError-BVrvQzLz.native.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-BTMvHTA8.native.esm.js → NotWaasWalletAccountError-C7NUlvvM.esm.js} +7 -5
- package/dist/NotWaasWalletAccountError-C7NUlvvM.esm.js.map +1 -0
- package/dist/{NotWaasWalletAccountError-Ciq7b-Y6.cjs → NotWaasWalletAccountError-CHzpa9kk.cjs} +7 -5
- package/dist/NotWaasWalletAccountError-CHzpa9kk.cjs.map +1 -0
- package/dist/core.cjs +46 -23
- package/dist/core.cjs.map +1 -1
- package/dist/core.esm.js +29 -8
- package/dist/core.esm.js.map +1 -1
- package/dist/core.native.esm.js +27 -6
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/core.d.ts +6 -0
- package/dist/exports/core.d.ts.map +1 -1
- package/dist/exports/index.d.ts +14 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BA0CHZzu.cjs → getNetworkProviderFromNetworkId-BJ27N-7S.cjs} +113 -348
- package/dist/getNetworkProviderFromNetworkId-BJ27N-7S.cjs.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js → getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js} +106 -311
- package/dist/getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js.map +1 -0
- package/dist/{getNetworkProviderFromNetworkId-RWcIZDgC.esm.js → getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js} +110 -282
- package/dist/getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js.map +1 -0
- package/dist/{getSignedSessionId-la6RXITX.esm.js → getSignedSessionId-CDdKrnw6.esm.js} +3 -3
- package/dist/{getSignedSessionId-la6RXITX.esm.js.map → getSignedSessionId-CDdKrnw6.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BCU987hO.cjs → getSignedSessionId-CHDHr-hY.cjs} +3 -3
- package/dist/{getSignedSessionId-BCU987hO.cjs.map → getSignedSessionId-CHDHr-hY.cjs.map} +1 -1
- package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js → getSignedSessionId-D3KQrN8W.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-DzNCj6g_.native.esm.js.map → getSignedSessionId-D3KQrN8W.native.esm.js.map} +1 -1
- package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-BuUCX040.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js +269 -0
- package/dist/getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js.map +1 -0
- package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs +346 -0
- package/dist/getVerifiedCredentialForWalletAccount-gCx0smU8.cjs.map +1 -0
- package/dist/index.cjs +754 -319
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +687 -260
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +684 -257
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-C1u4Z__n.esm.js → isMfaRequiredForAction-B0xNvBpU.native.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-B0xNvBpU.native.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-CMClgbT0.cjs → isMfaRequiredForAction-CLMvTTwl.cjs} +5 -3
- package/dist/isMfaRequiredForAction-CLMvTTwl.cjs.map +1 -0
- package/dist/{isMfaRequiredForAction-DSX-TV2z.native.esm.js → isMfaRequiredForAction-C_QPI1LH.esm.js} +5 -3
- package/dist/isMfaRequiredForAction-C_QPI1LH.esm.js.map +1 -0
- package/dist/modules/apiClient/apiClient.types.d.ts +12 -0
- package/dist/modules/apiClient/apiClient.types.d.ts.map +1 -1
- package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts +27 -0
- package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts.map +1 -0
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts +1 -0
- package/dist/modules/auth/externalAuth/requestExternalAuthElevatedToken/requestExternalAuthElevatedToken.d.ts.map +1 -1
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts +11 -1
- package/dist/modules/auth/isSignedIn/isSignedIn.d.ts.map +1 -1
- package/dist/modules/auth/logoutReason.d.ts +1 -1
- package/dist/modules/auth/logoutReason.d.ts.map +1 -1
- package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts +2 -1
- package/dist/modules/auth/passkeys/registerPasskey/registerPasskey.d.ts.map +1 -1
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts +1 -0
- package/dist/modules/auth/passkeys/signInWithPasskey/signInWithPasskey.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts +2 -1
- package/dist/modules/auth/social/oauth/unlinkSocialAccount/unlinkSocialAccount.d.ts.map +1 -1
- package/dist/modules/balances/getBalances/getBalances.d.ts +9 -45
- package/dist/modules/balances/getBalances/getBalances.d.ts.map +1 -1
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts +13 -20
- package/dist/modules/balances/getMultichainBalances/getMultichainBalances.d.ts.map +1 -1
- package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts +26 -0
- package/dist/modules/balances/getMultichainTokenBalances/getMultichainTokenBalances.d.ts.map +1 -0
- package/dist/modules/balances/getMultichainTokenBalances/index.d.ts +2 -0
- package/dist/modules/balances/getMultichainTokenBalances/index.d.ts.map +1 -0
- package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts +56 -0
- package/dist/modules/balances/getTokenBalances/getTokenBalances.d.ts.map +1 -0
- package/dist/modules/balances/getTokenBalances/index.d.ts +3 -0
- package/dist/modules/balances/getTokenBalances/index.d.ts.map +1 -0
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts +2 -1
- package/dist/modules/captcha/setCaptchaToken/setCaptchaToken.d.ts.map +1 -1
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts +22 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/clearCheckoutSessionToken.d.ts.map +1 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts +3 -0
- package/dist/modules/checkout/utils/clearCheckoutSessionToken/index.d.ts.map +1 -0
- package/dist/modules/checkout/utils/subscribeToCheckoutTransaction/subscribeToCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts +3 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/index.d.ts.map +1 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts +16 -0
- package/dist/modules/checkout/utils/withCheckoutSessionTokenCleanupOn401/withCheckoutSessionTokenCleanupOn401.d.ts.map +1 -0
- package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
- package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayCurrenciesFetchError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayInvalidUrlError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts +5 -0
- package/dist/modules/funding/moonpay/errors/MoonPayProviderNotAvailableError.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts +14 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/getMoonPayCurrencies.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts +2 -0
- package/dist/modules/funding/moonpay/getMoonPayCurrencies/index.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts +15 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/getMoonPayUrl.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts +2 -0
- package/dist/modules/funding/moonpay/getMoonPayUrl/index.d.ts.map +1 -0
- package/dist/modules/funding/moonpay/moonpay.types.d.ts +26 -0
- package/dist/modules/funding/moonpay/moonpay.types.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts +12 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainFromWalletSchema/getChainFromWalletSchema.d.ts.map +1 -1
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts +26 -0
- package/dist/modules/legacyWalletBook/getWalletConnectCatalog/getChainsFromWalletSchema/getChainsFromWalletSchema.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts +18 -0
- package/dist/modules/legacyWalletBook/hasUsableDeeplink/hasUsableDeeplink.d.ts.map +1 -0
- package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts +2 -2
- package/dist/modules/legacyWalletBook/legacyWalletBook.types.d.ts.map +1 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts +2 -1
- package/dist/modules/mfa/consumeMfaToken/consumeMfaToken.d.ts.map +1 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts +2 -1
- package/dist/modules/mfa/createNewMfaRecoveryCodes/createNewMfaRecoveryCodes.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts +2 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
- package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts +13 -1
- package/dist/modules/swap/executeSwapTransaction/executeSwapTransaction.d.ts.map +1 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts +2 -1
- package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts +27 -0
- package/dist/modules/walletOptionsCatalogue/buildMetaMaskSdkUriOptions/buildMetaMaskSdkUriOptions.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts +8 -5
- package/dist/modules/walletOptionsCatalogue/buildWalletConnectOptions/buildWalletConnectOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts +11 -4
- package/dist/modules/walletOptionsCatalogue/buildWalletOption/buildWalletOption.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/buildWithWalletProviderOptions/buildWithWalletProviderOptions.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/getConnectionOptionPriority/getConnectionOptionPriority.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts +35 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/getInstallationLinkForCurrentPlatform.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts +2 -0
- package/dist/modules/walletOptionsCatalogue/getInstallationLinkForCurrentPlatform/index.d.ts.map +1 -0
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts +9 -14
- package/dist/modules/walletOptionsCatalogue/getWalletOptionsCatalogue/getWalletOptionsCatalogue.d.ts.map +1 -1
- package/dist/modules/walletOptionsCatalogue/resolveWalletBookWalletOptionKey/resolveWalletBookWalletOptionKey.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/sortConnectionOptions/sortConnectionOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/sortWalletOptions/sortWalletOptions.d.ts +1 -1
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts +34 -35
- package/dist/modules/walletOptionsCatalogue/walletOptionsCatalogue.types.d.ts.map +1 -1
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts +1 -1
- package/dist/modules/wallets/connectWithWalletProvider/connectWithWalletProvider.d.ts.map +1 -1
- package/dist/modules/wallets/constants.d.ts +7 -0
- package/dist/modules/wallets/constants.d.ts.map +1 -1
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts.map +1 -1
- package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts +26 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/hasWalletProviderConnectMethod.d.ts.map +1 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts +2 -0
- package/dist/modules/wallets/hasWalletProviderConnectMethod/index.d.ts.map +1 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts +2 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/index.d.ts.map +1 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts +14 -0
- package/dist/modules/wallets/isAnyWalletAccountConnected/isAnyWalletAccountConnected.d.ts.map +1 -0
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts +6 -17
- package/dist/modules/wallets/networks/getBalance/getBalance.d.ts.map +1 -1
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts +24 -0
- package/dist/modules/wallets/networks/getNativeBalance/getNativeBalance.d.ts.map +1 -0
- package/dist/modules/wallets/networks/getNativeBalance/index.d.ts +2 -0
- package/dist/modules/wallets/networks/getNativeBalance/index.d.ts.map +1 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts +2 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/index.d.ts.map +1 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts +25 -0
- package/dist/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.d.ts.map +1 -0
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts +10 -0
- package/dist/modules/wallets/walletProvider/walletProvider.types.d.ts.map +1 -1
- package/dist/services/instrumentation/connectLoggerToInstrumentation/connectLoggerToInstrumentation.d.ts.map +1 -1
- package/dist/services/instrumentation/constants.d.ts +22 -0
- package/dist/services/instrumentation/constants.d.ts.map +1 -1
- package/dist/services/instrumentation/scrubParameters/scrubParameters.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts +29 -0
- package/dist/utils/appendConnectionUriToDeeplink/appendConnectionUriToDeeplink.d.ts.map +1 -0
- package/dist/utils/appendConnectionUriToDeeplink/index.d.ts +2 -0
- package/dist/utils/appendConnectionUriToDeeplink/index.d.ts.map +1 -0
- package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts +22 -0
- package/dist/utils/getChainFromWalletBookIdentifier/getChainFromWalletBookIdentifier.d.ts.map +1 -0
- package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts +2 -0
- package/dist/utils/getChainFromWalletBookIdentifier/index.d.ts.map +1 -0
- package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts +18 -0
- package/dist/utils/getNativeLinkScheme/getNativeLinkScheme.d.ts.map +1 -0
- package/dist/utils/getNativeLinkScheme/index.d.ts +3 -0
- package/dist/utils/getNativeLinkScheme/index.d.ts.map +1 -0
- package/dist/utils/isMobile/isMobile.d.ts +8 -0
- package/dist/utils/isMobile/isMobile.d.ts.map +1 -1
- package/dist/waas.cjs +8 -9
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +3 -3
- package/dist/waas.native.esm.js +3 -3
- package/dist/waasCore.cjs +3 -4
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +3 -3
- package/dist/waasCore.native.esm.js +3 -3
- package/package.json +4 -4
- package/dist/InvalidParamError-9kQBK3sP.native.esm.js.map +0 -1
- package/dist/InvalidParamError-DQvZQdQ9.cjs.map +0 -1
- package/dist/InvalidParamError-Za4cvW7K.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-BTMvHTA8.native.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-By3Y4taq.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-Ciq7b-Y6.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-BA0CHZzu.cjs.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-COptFPwJ.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-RWcIZDgC.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-DKJcLLHq.native.esm.js.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs +0 -887
- package/dist/getVerifiedCredentialForWalletAccount-DSSDwOyq.cjs.map +0 -1
- package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js +0 -701
- package/dist/getVerifiedCredentialForWalletAccount-Ozctwnyv.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-C1u4Z__n.esm.js.map +0 -1
- package/dist/isMfaRequiredForAction-CMClgbT0.cjs.map +0 -1
- package/dist/isMfaRequiredForAction-DSX-TV2z.native.esm.js.map +0 -1
|
@@ -1,109 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { E as CHAINS_INFO_MAP, Q as instrumentFunction, Y as assertDefined, c as createApiClient, dt as getCore, f as getWalletProviderFromWalletAccount, h as createRuntimeServiceAccessKey, st as getDefaultClient, ut as BaseError, w as normalizeWalletNameWithChain, x as getWalletAccounts } from "./InvalidParamError-DWjMfOZ5.esm.js";
|
|
2
|
+
import { f as checkAndRaiseWalletAccountsChangedEvent, p as emitWalletAccountsChangedEvent } from "./getVerifiedCredentialForWalletAccount-BuUCX040.esm.js";
|
|
3
3
|
import { AuthModeEnum } from "@dynamic-labs/sdk-api-core";
|
|
4
4
|
import * as z from "zod/mini";
|
|
5
5
|
import { Buffer as Buffer$1 } from "buffer";
|
|
6
|
-
import EventEmitter, { EventEmitter
|
|
6
|
+
import EventEmitter$1, { EventEmitter } from "eventemitter3";
|
|
7
7
|
|
|
8
|
-
//#region src/utils/isEqualShallow/isEqualShallow.ts
|
|
9
|
-
/**
|
|
10
|
-
* Shallow compare two objects.
|
|
11
|
-
*
|
|
12
|
-
* Source: https://github.com/pmndrs/zustand/blob/main/src/vanilla/shallow.ts
|
|
13
|
-
* @not-instrumented
|
|
14
|
-
*/
|
|
15
|
-
const isEqualShallow = (objA, objB) => {
|
|
16
|
-
if (Object.is(objA, objB)) return true;
|
|
17
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return objA === objB;
|
|
18
|
-
if (objA instanceof Map && objB instanceof Map) {
|
|
19
|
-
if (objA.size !== objB.size) return false;
|
|
20
|
-
for (const [key, value] of objA) if (!Object.is(value, objB.get(key))) return false;
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
if (objA instanceof Set && objB instanceof Set) {
|
|
24
|
-
if (objA.size !== objB.size) return false;
|
|
25
|
-
for (const value of objA) if (!objB.has(value)) return false;
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
const keysA = Object.keys(objA);
|
|
29
|
-
if (keysA.length !== Object.keys(objB).length) return false;
|
|
30
|
-
for (const keyA of keysA) if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) return false;
|
|
31
|
-
if (objA.constructor !== objB.constructor) return false;
|
|
32
|
-
return true;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
//#endregion
|
|
36
|
-
//#region src/utils/observable/subscribeWithSelector/subscribeWithSelector.ts
|
|
37
|
-
/**
|
|
38
|
-
* Allows subscribing to a slice of the state.
|
|
39
|
-
* The slice is a computation of the states.
|
|
40
|
-
*
|
|
41
|
-
* The callback will only be called when the slice has changed.
|
|
42
|
-
* Change is determined by shallow comparison.
|
|
43
|
-
*
|
|
44
|
-
* Returns a function to unsubscribe the callback.
|
|
45
|
-
* @not-instrumented
|
|
46
|
-
*/
|
|
47
|
-
const subscribeWithSelector = (observable, selector) => (callback) => {
|
|
48
|
-
let lastSlice = selector(observable.get());
|
|
49
|
-
return observable.subscribe((value) => {
|
|
50
|
-
const nextSlice = selector(value);
|
|
51
|
-
if (isEqualShallow(nextSlice, lastSlice)) return;
|
|
52
|
-
lastSlice = nextSlice;
|
|
53
|
-
callback(nextSlice);
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/utils/retryOnFail/InvalidRetryOnFailCallError.ts
|
|
59
|
-
/**
|
|
60
|
-
* This error is thrown when the `retryOnFail` function is called with an invalid
|
|
61
|
-
* number of retries (i.e. less than 0).
|
|
62
|
-
*/
|
|
63
|
-
var InvalidRetryOnFailCallError = class extends BaseError {
|
|
64
|
-
constructor(maxRetries) {
|
|
65
|
-
super({
|
|
66
|
-
cause: null,
|
|
67
|
-
code: "invalid_retry_on_fail_call_error",
|
|
68
|
-
docsUrl: null,
|
|
69
|
-
name: "InvalidRetryOnFailCallError",
|
|
70
|
-
shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/utils/retryOnFail/retryOnFail.ts
|
|
77
|
-
/** @not-instrumented */
|
|
78
|
-
const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
|
|
79
|
-
for (let retry = 0; retry <= maxRetries; retry++) try {
|
|
80
|
-
return await fn();
|
|
81
|
-
} catch (error) {
|
|
82
|
-
if (retry >= maxRetries) throw error;
|
|
83
|
-
if (delay > 0) await new Promise((resolve) => setTimeout(resolve, delay));
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Reaching this point should never happen and this
|
|
87
|
-
* error is thrown to help us debug the issue.
|
|
88
|
-
*/
|
|
89
|
-
throw new InvalidRetryOnFailCallError(maxRetries);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/modules/auth/isSignedIn/isSignedIn.ts
|
|
94
|
-
/**
|
|
95
|
-
* Checks if the user is currently signed in to the Dynamic client.
|
|
96
|
-
*
|
|
97
|
-
* The client is considered to be in a signed in state if a user has
|
|
98
|
-
* authenticated or if the client has at least one wallet connected.
|
|
99
|
-
*
|
|
100
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
101
|
-
* @returns True if the user is signed in, false otherwise.
|
|
102
|
-
* @not-instrumented
|
|
103
|
-
*/
|
|
104
|
-
const isSignedIn = (client = getDefaultClient()) => Boolean(client.user || getWalletAccounts(client).length > 0);
|
|
105
|
-
|
|
106
|
-
//#endregion
|
|
107
8
|
//#region src/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.ts
|
|
108
9
|
/**
|
|
109
10
|
* Creates a localStorage adapter.
|
|
@@ -214,183 +115,54 @@ const createStorage = ({ prefix = "", storageAdapter }) => {
|
|
|
214
115
|
};
|
|
215
116
|
|
|
216
117
|
//#endregion
|
|
217
|
-
//#region src/
|
|
218
|
-
/** @not-instrumented */
|
|
219
|
-
const createStorageKeySchema = (params) => {
|
|
220
|
-
return params;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts
|
|
225
|
-
/**
|
|
226
|
-
* The schema to track the expiration time of the project settings.
|
|
227
|
-
*/
|
|
228
|
-
const projectSettingsExpirationStorageKeySchema = createStorageKeySchema({
|
|
229
|
-
key: "projectSettingsExpiration",
|
|
230
|
-
schema: z.number()
|
|
231
|
-
});
|
|
232
|
-
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts
|
|
235
|
-
/**
|
|
236
|
-
* Expiration time of the project settings in milliseconds.
|
|
237
|
-
*/
|
|
238
|
-
const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
|
|
118
|
+
//#region src/utils/isEqualShallow/isEqualShallow.ts
|
|
239
119
|
/**
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
* This function retrieves the latest project configuration settings
|
|
243
|
-
* from Dynamic's servers, including authentication options, enabled chains,
|
|
244
|
-
* and security configurations. The settings are cached for performance.
|
|
120
|
+
* Shallow compare two objects.
|
|
245
121
|
*
|
|
246
|
-
*
|
|
247
|
-
* @returns A promise that resolves to the updated project settings.
|
|
122
|
+
* Source: https://github.com/pmndrs/zustand/blob/main/src/vanilla/shallow.ts
|
|
248
123
|
* @not-instrumented
|
|
249
124
|
*/
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
if (
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
return
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
//#endregion
|
|
270
|
-
//#region src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts
|
|
271
|
-
/** @not-instrumented */
|
|
272
|
-
const generateSessionKeys = async (client) => {
|
|
273
|
-
const core = getCore(client);
|
|
274
|
-
await core.keychain.removeKey("session");
|
|
275
|
-
const publicKey = await core.keychain.generateKey("session");
|
|
276
|
-
assertDefined(publicKey, "Public key not found");
|
|
277
|
-
core.state.set({ sessionKeys: publicKey });
|
|
278
|
-
return { publicKey };
|
|
279
|
-
};
|
|
280
|
-
|
|
281
|
-
//#endregion
|
|
282
|
-
//#region src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts
|
|
283
|
-
/** @not-instrumented */
|
|
284
|
-
const getAvailableWalletProvidersFromWalletAccounts = (client) => {
|
|
285
|
-
const core = getCore(client);
|
|
286
|
-
const walletProvidersMap = /* @__PURE__ */ new Map();
|
|
287
|
-
getWalletAccounts(client).forEach((walletAccount) => {
|
|
288
|
-
if (walletProvidersMap.has(walletAccount.walletProviderKey)) return;
|
|
289
|
-
try {
|
|
290
|
-
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
291
|
-
walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);
|
|
292
|
-
} catch (error) {
|
|
293
|
-
core.logger.debug("Wallet provider not found for wallet account", {
|
|
294
|
-
error,
|
|
295
|
-
walletAccount: walletAccount.address
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
return Array.from(walletProvidersMap.values());
|
|
125
|
+
const isEqualShallow = (objA, objB) => {
|
|
126
|
+
if (Object.is(objA, objB)) return true;
|
|
127
|
+
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return objA === objB;
|
|
128
|
+
if (objA instanceof Map && objB instanceof Map) {
|
|
129
|
+
if (objA.size !== objB.size) return false;
|
|
130
|
+
for (const [key, value] of objA) if (!Object.is(value, objB.get(key))) return false;
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
if (objA instanceof Set && objB instanceof Set) {
|
|
134
|
+
if (objA.size !== objB.size) return false;
|
|
135
|
+
for (const value of objA) if (!objB.has(value)) return false;
|
|
136
|
+
return true;
|
|
137
|
+
}
|
|
138
|
+
const keysA = Object.keys(objA);
|
|
139
|
+
if (keysA.length !== Object.keys(objB).length) return false;
|
|
140
|
+
for (const keyA of keysA) if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) return false;
|
|
141
|
+
if (objA.constructor !== objB.constructor) return false;
|
|
142
|
+
return true;
|
|
300
143
|
};
|
|
301
144
|
|
|
302
145
|
//#endregion
|
|
303
|
-
//#region src/
|
|
146
|
+
//#region src/utils/observable/subscribeWithSelector/subscribeWithSelector.ts
|
|
304
147
|
/**
|
|
305
|
-
*
|
|
148
|
+
* Allows subscribing to a slice of the state.
|
|
149
|
+
* The slice is a computation of the states.
|
|
306
150
|
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
* block teardown of the others (e.g. during logout).
|
|
151
|
+
* The callback will only be called when the slice has changed.
|
|
152
|
+
* Change is determined by shallow comparison.
|
|
310
153
|
*
|
|
154
|
+
* Returns a function to unsubscribe the callback.
|
|
311
155
|
* @not-instrumented
|
|
312
156
|
*/
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
if (
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
} catch (err) {
|
|
321
|
-
core.logger.error(`Error destroying wallet provider ${walletProvider.key}`, err);
|
|
322
|
-
}
|
|
323
|
-
}));
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
//#endregion
|
|
327
|
-
//#region src/modules/auth/logoutWithReason/logoutWithReason.ts
|
|
328
|
-
/**
|
|
329
|
-
* Logs the user out with an explicit reason.
|
|
330
|
-
*
|
|
331
|
-
* Revokes the session, clears auth state, terminates wallet providers, and
|
|
332
|
-
* emits the `logout` client event with the given reason. The reason is also
|
|
333
|
-
* captured as an argument on the function-instrumentation event, which is
|
|
334
|
-
* how Datadog distinguishes between different logout causes.
|
|
335
|
-
*
|
|
336
|
-
* Use this instead of the public `logout` when triggering a logout from
|
|
337
|
-
* internal or extension code — the caller owns the reason string, so the
|
|
338
|
-
* telemetry correctly attributes *why* the logout happened.
|
|
339
|
-
*
|
|
340
|
-
* @param params - The logout params.
|
|
341
|
-
* @param params.reason - Why the logout is being triggered. Extension authors
|
|
342
|
-
* needing a reason outside the SDK catalog can cast with `as LogoutReason`.
|
|
343
|
-
* @param client - The Dynamic client instance.
|
|
344
|
-
* @instrumented
|
|
345
|
-
*/
|
|
346
|
-
const logoutWithReason = async ({ reason }, client) => {
|
|
347
|
-
const core = getCore(client);
|
|
348
|
-
core.logger.debug("[logoutWithReason] Logging out...", { reason });
|
|
349
|
-
await destroyWalletProviders({ reason }, client);
|
|
350
|
-
if (client.user !== null) {
|
|
351
|
-
const apiClient = createApiClient({}, client);
|
|
352
|
-
try {
|
|
353
|
-
await apiClient.revokeSession({ environmentId: core.environmentId });
|
|
354
|
-
} catch (error) {
|
|
355
|
-
core.logger.error("Failed to revoke session", error);
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* This deletes the auth cookie if it exists.
|
|
359
|
-
* If the cookie doesn't exist, this sets a new cookie that expires immediately.
|
|
360
|
-
*/
|
|
361
|
-
if (isCookieEnabled(client)) setCookie(`${DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`);
|
|
362
|
-
}
|
|
363
|
-
await core.keychain.removeKey("session");
|
|
364
|
-
core.state.set({
|
|
365
|
-
captchaToken: null,
|
|
366
|
-
elevatedAccessTokens: [],
|
|
367
|
-
legacyToken: null,
|
|
368
|
-
mfaToken: null,
|
|
369
|
-
sessionExpiresAt: null,
|
|
370
|
-
sessionKeys: null,
|
|
371
|
-
token: null,
|
|
372
|
-
unverifiedWalletAccounts: [],
|
|
373
|
-
user: null
|
|
157
|
+
const subscribeWithSelector = (observable, selector) => (callback) => {
|
|
158
|
+
let lastSlice = selector(observable.get());
|
|
159
|
+
return observable.subscribe((value) => {
|
|
160
|
+
const nextSlice = selector(value);
|
|
161
|
+
if (isEqualShallow(nextSlice, lastSlice)) return;
|
|
162
|
+
lastSlice = nextSlice;
|
|
163
|
+
callback(nextSlice);
|
|
374
164
|
});
|
|
375
|
-
emitEvent({
|
|
376
|
-
args: { reason },
|
|
377
|
-
event: "logout"
|
|
378
|
-
}, client);
|
|
379
|
-
fetchProjectSettings(client);
|
|
380
|
-
generateSessionKeys(client);
|
|
381
165
|
};
|
|
382
|
-
const __logoutWithReason_impl = logoutWithReason;
|
|
383
|
-
const __logoutWithReason_wrapped = instrumentFunction({
|
|
384
|
-
fn: __logoutWithReason_impl,
|
|
385
|
-
functionName: "logoutWithReason",
|
|
386
|
-
getCore: () => {
|
|
387
|
-
try {
|
|
388
|
-
return getCore(getDefaultClient());
|
|
389
|
-
} catch {
|
|
390
|
-
return;
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
});
|
|
394
166
|
|
|
395
167
|
//#endregion
|
|
396
168
|
//#region src/utils/getBuffer/getBuffer.ts
|
|
@@ -475,7 +247,7 @@ const createCrossTabBroadcast = ({ channelName }) => {
|
|
|
475
247
|
send: () => {}
|
|
476
248
|
};
|
|
477
249
|
const channel = new BroadcastChannel(channelName);
|
|
478
|
-
const eventEmitter = new EventEmitter();
|
|
250
|
+
const eventEmitter = new EventEmitter$1();
|
|
479
251
|
const handleMessage = (messageEvent) => {
|
|
480
252
|
const parsed = CrossTabBroadcastMessageSchema.safeParse(messageEvent.data);
|
|
481
253
|
if (!parsed.success) return;
|
|
@@ -517,7 +289,7 @@ const defaultConsole = console;
|
|
|
517
289
|
* @not-instrumented
|
|
518
290
|
*/
|
|
519
291
|
const createLogger = (options = {}) => {
|
|
520
|
-
const eventEmitter = new EventEmitter
|
|
292
|
+
const eventEmitter = new EventEmitter();
|
|
521
293
|
const minLevel = options.level ?? "warn";
|
|
522
294
|
const shouldLog = (level) => {
|
|
523
295
|
return LOG_LEVELS[level] >= LOG_LEVELS[minLevel];
|
|
@@ -805,7 +577,7 @@ const createRealtimeService = () => {
|
|
|
805
577
|
subscribe: () => Promise.resolve(),
|
|
806
578
|
unsubscribe: () => {}
|
|
807
579
|
};
|
|
808
|
-
const eventEmitter = new EventEmitter();
|
|
580
|
+
const eventEmitter = new EventEmitter$1();
|
|
809
581
|
const channels = /* @__PURE__ */ new Map();
|
|
810
582
|
const handlerMap = /* @__PURE__ */ new WeakMap();
|
|
811
583
|
let ablyClient;
|
|
@@ -988,6 +760,7 @@ const consumeCaptchaToken = (client) => {
|
|
|
988
760
|
* @param params.captchaToken - The captcha token to set.
|
|
989
761
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
990
762
|
* @instrumented
|
|
763
|
+
* @redact-params
|
|
991
764
|
*/
|
|
992
765
|
const setCaptchaToken = ({ captchaToken }, client = getDefaultClient()) => {
|
|
993
766
|
getCore(client).state.set({ captchaToken });
|
|
@@ -1002,7 +775,8 @@ const __setCaptchaToken_wrapped = instrumentFunction({
|
|
|
1002
775
|
} catch {
|
|
1003
776
|
return;
|
|
1004
777
|
}
|
|
1005
|
-
}
|
|
778
|
+
},
|
|
779
|
+
redactAll: true
|
|
1006
780
|
});
|
|
1007
781
|
|
|
1008
782
|
//#endregion
|
|
@@ -1066,6 +840,71 @@ const setUnverifiedWalletAccounts = ({ unverifiedWalletAccountsToUpdate }, clien
|
|
|
1066
840
|
core.state.set({ unverifiedWalletAccounts: [...filteredUnverifiedWalletAccounts, ...unverifiedWalletAccountsToUpdate] });
|
|
1067
841
|
};
|
|
1068
842
|
|
|
843
|
+
//#endregion
|
|
844
|
+
//#region src/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.ts
|
|
845
|
+
/** @not-instrumented */
|
|
846
|
+
const updateWalletProviderKeysForVerifiedCredentials = ({ keysToUpdate }, client) => {
|
|
847
|
+
const core = getCore(client);
|
|
848
|
+
core.state.set({ walletProviderKeyMap: {
|
|
849
|
+
...core.state.get().walletProviderKeyMap,
|
|
850
|
+
...keysToUpdate
|
|
851
|
+
} });
|
|
852
|
+
};
|
|
853
|
+
|
|
854
|
+
//#endregion
|
|
855
|
+
//#region src/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.ts
|
|
856
|
+
/**
|
|
857
|
+
* Reconciles freshly-connected wallet accounts against the client state. For
|
|
858
|
+
* each candidate it classifies as new, a re-connect of an existing unverified
|
|
859
|
+
* account, or a re-connect of an already-verified account, then runs the
|
|
860
|
+
* appropriate state mutation (`setUnverifiedWalletAccounts`,
|
|
861
|
+
* `updateWalletProviderKeysForVerifiedCredentials`, `createVisit` for truly-new
|
|
862
|
+
* entries) and emits a single `walletAccountsChanged` event if anything
|
|
863
|
+
* actually changed. Returns the candidates with `verifiedCredentialId`
|
|
864
|
+
* populated when the address already corresponded to a verified credential.
|
|
865
|
+
*
|
|
866
|
+
* @not-instrumented
|
|
867
|
+
*/
|
|
868
|
+
const reconcileWalletAccountsAgainstClient = ({ addToDynamicWalletAccounts = true, walletAccounts, walletProviderKey }, client) => {
|
|
869
|
+
if (walletAccounts.length === 0) return [];
|
|
870
|
+
const existingWalletAccounts = getWalletAccounts(client);
|
|
871
|
+
const newWalletAccounts = [];
|
|
872
|
+
const unverifiedWalletAccountsToUpdate = [];
|
|
873
|
+
const verifiedCredentialIdToWalletProviderKeyMap = {};
|
|
874
|
+
const reconciledWalletAccounts = walletAccounts.map((candidate) => {
|
|
875
|
+
const matchingExistingWalletAccount = existingWalletAccounts.find((existingWalletAccount) => existingWalletAccount.id === candidate.id);
|
|
876
|
+
if (!matchingExistingWalletAccount) {
|
|
877
|
+
newWalletAccounts.push(candidate);
|
|
878
|
+
return candidate;
|
|
879
|
+
}
|
|
880
|
+
const isWalletProviderKeyChanged = matchingExistingWalletAccount.walletProviderKey !== walletProviderKey;
|
|
881
|
+
if (matchingExistingWalletAccount.verifiedCredentialId) {
|
|
882
|
+
if (isWalletProviderKeyChanged) verifiedCredentialIdToWalletProviderKeyMap[matchingExistingWalletAccount.verifiedCredentialId] = walletProviderKey;
|
|
883
|
+
return {
|
|
884
|
+
...candidate,
|
|
885
|
+
verifiedCredentialId: matchingExistingWalletAccount.verifiedCredentialId
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
if (isWalletProviderKeyChanged) unverifiedWalletAccountsToUpdate.push(candidate);
|
|
889
|
+
return candidate;
|
|
890
|
+
});
|
|
891
|
+
let walletAccountsChanged = false;
|
|
892
|
+
if (Object.keys(verifiedCredentialIdToWalletProviderKeyMap).length > 0) {
|
|
893
|
+
updateWalletProviderKeysForVerifiedCredentials({ keysToUpdate: verifiedCredentialIdToWalletProviderKeyMap }, client);
|
|
894
|
+
walletAccountsChanged = true;
|
|
895
|
+
}
|
|
896
|
+
if (addToDynamicWalletAccounts) {
|
|
897
|
+
const accountsToWrite = [...unverifiedWalletAccountsToUpdate, ...newWalletAccounts];
|
|
898
|
+
if (accountsToWrite.length > 0) {
|
|
899
|
+
setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: accountsToWrite }, client);
|
|
900
|
+
walletAccountsChanged = true;
|
|
901
|
+
for (const newWalletAccount of newWalletAccounts) createVisit({ walletAccount: newWalletAccount }, client);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
if (walletAccountsChanged) emitWalletAccountsChangedEvent(client);
|
|
905
|
+
return reconciledWalletAccounts;
|
|
906
|
+
};
|
|
907
|
+
|
|
1069
908
|
//#endregion
|
|
1070
909
|
//#region src/utils/getAppMetadata/getAppMetadata.ts
|
|
1071
910
|
/**
|
|
@@ -1201,17 +1040,6 @@ const verifyMessageSignatureOwnership = async ({ messageToSign, walletAddress, a
|
|
|
1201
1040
|
}
|
|
1202
1041
|
};
|
|
1203
1042
|
|
|
1204
|
-
//#endregion
|
|
1205
|
-
//#region src/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.ts
|
|
1206
|
-
/** @not-instrumented */
|
|
1207
|
-
const updateWalletProviderKeysForVerifiedCredentials = ({ keysToUpdate }, client) => {
|
|
1208
|
-
const core = getCore(client);
|
|
1209
|
-
core.state.set({ walletProviderKeyMap: {
|
|
1210
|
-
...core.state.get().walletProviderKeyMap,
|
|
1211
|
-
...keysToUpdate
|
|
1212
|
-
} });
|
|
1213
|
-
};
|
|
1214
|
-
|
|
1215
1043
|
//#endregion
|
|
1216
1044
|
//#region src/modules/wallets/networks/getSdkChainFromApiChainName/getSdkChainFromApiChainName.ts
|
|
1217
1045
|
/**
|
|
@@ -1316,5 +1144,5 @@ const getNetworkProviderFromNetworkId = ({ networkId, chain }, client) => {
|
|
|
1316
1144
|
};
|
|
1317
1145
|
|
|
1318
1146
|
//#endregion
|
|
1319
|
-
export {
|
|
1320
|
-
//# sourceMappingURL=getNetworkProviderFromNetworkId-
|
|
1147
|
+
export { GENERATE_SESSION_KEYS_TRACKER_KEY as A, createLocalStorageAdapter as B, createKeychainService as C, CannotTrackError as D, CrossTabBroadcastMessageSchema as E, getBuffer as F, subscribeWithSelector as I, isEqualShallow as L, REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY as M, REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY as N, createDeferredPromise as O, isServerSideRendering as P, createStorage as R, createRealtimeService as S, createCrossTabBroadcast as T, isCaptchaRequired as _, verifyMessageSignatureOwnership as a, NoNetworkProvidersError as b, formatSignInMessage as c, updateWalletProviderKeysForVerifiedCredentials as d, setUnverifiedWalletAccounts as f, consumeCaptchaToken as g, __setCaptchaToken_wrapped as h, getNetworksData as i, INITIALIZE_STORAGE_SYNC_TRACKER_KEY as j, FETCH_PROJECT_SETTINGS_TRACKER_KEY as k, getAppMetadata as l, hasExtension as m, getNetworkProviders as n, removeUnverifiedWalletAccount as o, createVisit as p, getNetworkProviderBuilderRegistry as r, createSignInMessageStatement as s, getNetworkProviderFromNetworkId as t, reconcileWalletAccountsAgainstClient as u, MethodNotImplementedError as v, createLogger as w, getKeychainIndexedDBName as x, WalletAlreadyLinkedToAnotherUserError as y, InvalidStorageSet as z };
|
|
1148
|
+
//# sourceMappingURL=getNetworkProviderFromNetworkId-Cqp9eRSs.esm.js.map
|