@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,143 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { $ as instrumentFunction, D as CHAINS_INFO_MAP, S as getWalletAccounts, T as normalizeWalletNameWithChain, X as assertDefined, c as createApiClient, ct as getDefaultClient, dt as BaseError, f as getWalletProviderFromWalletAccount, ft as getCore, h as createRuntimeServiceAccessKey } from "./InvalidParamError-DkAMYJOW.native.esm.js";
|
|
2
|
+
import { f as checkAndRaiseWalletAccountsChangedEvent, p as emitWalletAccountsChangedEvent } from "./getVerifiedCredentialForWalletAccount-Ciac5d5L.native.esm.js";
|
|
3
3
|
import { AuthModeEnum } from "@dynamic-labs/sdk-api-core";
|
|
4
4
|
import * as z from "zod/mini";
|
|
5
|
-
import AsyncStorage from "@react-native-async-storage/async-storage";
|
|
6
|
-
import { getGenericPassword, resetGenericPassword, setGenericPassword } from "react-native-keychain";
|
|
7
5
|
import { Buffer as Buffer$1 } from "buffer";
|
|
8
6
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from "eventemitter3";
|
|
9
7
|
import { TurboModuleRegistry } from "react-native";
|
|
10
8
|
|
|
11
|
-
//#region src/utils/isEqualShallow/isEqualShallow.ts
|
|
12
|
-
/**
|
|
13
|
-
* Shallow compare two objects.
|
|
14
|
-
*
|
|
15
|
-
* Source: https://github.com/pmndrs/zustand/blob/main/src/vanilla/shallow.ts
|
|
16
|
-
* @not-instrumented
|
|
17
|
-
*/
|
|
18
|
-
const isEqualShallow = (objA, objB) => {
|
|
19
|
-
if (Object.is(objA, objB)) return true;
|
|
20
|
-
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return objA === objB;
|
|
21
|
-
if (objA instanceof Map && objB instanceof Map) {
|
|
22
|
-
if (objA.size !== objB.size) return false;
|
|
23
|
-
for (const [key, value] of objA) if (!Object.is(value, objB.get(key))) return false;
|
|
24
|
-
return true;
|
|
25
|
-
}
|
|
26
|
-
if (objA instanceof Set && objB instanceof Set) {
|
|
27
|
-
if (objA.size !== objB.size) return false;
|
|
28
|
-
for (const value of objA) if (!objB.has(value)) return false;
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
const keysA = Object.keys(objA);
|
|
32
|
-
if (keysA.length !== Object.keys(objB).length) return false;
|
|
33
|
-
for (const keyA of keysA) if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) return false;
|
|
34
|
-
if (objA.constructor !== objB.constructor) return false;
|
|
35
|
-
return true;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
//#endregion
|
|
39
|
-
//#region src/utils/observable/subscribeWithSelector/subscribeWithSelector.ts
|
|
40
|
-
/**
|
|
41
|
-
* Allows subscribing to a slice of the state.
|
|
42
|
-
* The slice is a computation of the states.
|
|
43
|
-
*
|
|
44
|
-
* The callback will only be called when the slice has changed.
|
|
45
|
-
* Change is determined by shallow comparison.
|
|
46
|
-
*
|
|
47
|
-
* Returns a function to unsubscribe the callback.
|
|
48
|
-
* @not-instrumented
|
|
49
|
-
*/
|
|
50
|
-
const subscribeWithSelector = (observable, selector) => (callback) => {
|
|
51
|
-
let lastSlice = selector(observable.get());
|
|
52
|
-
return observable.subscribe((value) => {
|
|
53
|
-
const nextSlice = selector(value);
|
|
54
|
-
if (isEqualShallow(nextSlice, lastSlice)) return;
|
|
55
|
-
lastSlice = nextSlice;
|
|
56
|
-
callback(nextSlice);
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
//#endregion
|
|
61
|
-
//#region src/utils/retryOnFail/InvalidRetryOnFailCallError.ts
|
|
62
|
-
/**
|
|
63
|
-
* This error is thrown when the `retryOnFail` function is called with an invalid
|
|
64
|
-
* number of retries (i.e. less than 0).
|
|
65
|
-
*/
|
|
66
|
-
var InvalidRetryOnFailCallError = class extends BaseError {
|
|
67
|
-
constructor(maxRetries) {
|
|
68
|
-
super({
|
|
69
|
-
cause: null,
|
|
70
|
-
code: "invalid_retry_on_fail_call_error",
|
|
71
|
-
docsUrl: null,
|
|
72
|
-
name: "InvalidRetryOnFailCallError",
|
|
73
|
-
shortMessage: `Invalid retries parameter for retryOnFail call: ${maxRetries}`
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
//#endregion
|
|
79
|
-
//#region src/utils/retryOnFail/retryOnFail.ts
|
|
80
|
-
/** @not-instrumented */
|
|
81
|
-
const retryOnFail = async ({ delay = 0, fn, maxRetries }) => {
|
|
82
|
-
for (let retry = 0; retry <= maxRetries; retry++) try {
|
|
83
|
-
return await fn();
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (retry >= maxRetries) throw error;
|
|
86
|
-
if (delay > 0) await new Promise((resolve) => setTimeout(resolve, delay));
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Reaching this point should never happen and this
|
|
90
|
-
* error is thrown to help us debug the issue.
|
|
91
|
-
*/
|
|
92
|
-
throw new InvalidRetryOnFailCallError(maxRetries);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region src/modules/auth/isSignedIn/isSignedIn.ts
|
|
97
|
-
/**
|
|
98
|
-
* Checks if the user is currently signed in to the Dynamic client.
|
|
99
|
-
*
|
|
100
|
-
* The client is considered to be in a signed in state if a user has
|
|
101
|
-
* authenticated or if the client has at least one wallet connected.
|
|
102
|
-
*
|
|
103
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
104
|
-
* @returns True if the user is signed in, false otherwise.
|
|
105
|
-
* @not-instrumented
|
|
106
|
-
*/
|
|
107
|
-
const isSignedIn = (client = getDefaultClient()) => Boolean(client.user || getWalletAccounts(client).length > 0);
|
|
108
|
-
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region src/services/storage/createLocalStorageAdapter/createLocalStorageAdapter.native.ts
|
|
111
|
-
const NAMESPACE = "dynamic";
|
|
112
|
-
const namespaceKey = (key) => `${NAMESPACE}:${key}`;
|
|
113
|
-
/**
|
|
114
|
-
* Creates a localStorage adapter for React Native.
|
|
115
|
-
* Routes operations based on the `storageTier` option:
|
|
116
|
-
* - `'default'`: uses AsyncStorage
|
|
117
|
-
* - `'secure'`: uses react-native-keychain
|
|
118
|
-
* @not-instrumented
|
|
119
|
-
*/
|
|
120
|
-
const createLocalStorageAdapter = () => {
|
|
121
|
-
return {
|
|
122
|
-
getItem: async (key, options) => {
|
|
123
|
-
if (options.storageTier === "secure") {
|
|
124
|
-
const result = await getGenericPassword({ service: key });
|
|
125
|
-
if (!result) return null;
|
|
126
|
-
return result.password;
|
|
127
|
-
} else return AsyncStorage.getItem(namespaceKey(key));
|
|
128
|
-
},
|
|
129
|
-
removeItem: async (key, options) => {
|
|
130
|
-
if (options.storageTier === "secure") await resetGenericPassword({ service: key });
|
|
131
|
-
else await AsyncStorage.removeItem(namespaceKey(key));
|
|
132
|
-
},
|
|
133
|
-
setItem: async (key, value, options) => {
|
|
134
|
-
if (options.storageTier === "secure") await setGenericPassword(key, value, { service: key });
|
|
135
|
-
else await AsyncStorage.setItem(namespaceKey(key), value);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
//#endregion
|
|
141
9
|
//#region src/errors/InvalidStorageSet.ts
|
|
142
10
|
var InvalidStorageSet = class extends BaseError {
|
|
143
11
|
constructor({ key, value }) {
|
|
@@ -236,183 +104,54 @@ const createStorage = ({ prefix = "", storageAdapter }) => {
|
|
|
236
104
|
};
|
|
237
105
|
|
|
238
106
|
//#endregion
|
|
239
|
-
//#region src/
|
|
240
|
-
/** @not-instrumented */
|
|
241
|
-
const createStorageKeySchema = (params) => {
|
|
242
|
-
return params;
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
//#endregion
|
|
246
|
-
//#region src/modules/projectSettings/fetchProjectSettings/projectSettingsExpirationScheme.ts
|
|
247
|
-
/**
|
|
248
|
-
* The schema to track the expiration time of the project settings.
|
|
249
|
-
*/
|
|
250
|
-
const projectSettingsExpirationStorageKeySchema = createStorageKeySchema({
|
|
251
|
-
key: "projectSettingsExpiration",
|
|
252
|
-
schema: z.number()
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
//#endregion
|
|
256
|
-
//#region src/modules/projectSettings/fetchProjectSettings/fetchProjectSettings.ts
|
|
257
|
-
/**
|
|
258
|
-
* Expiration time of the project settings in milliseconds.
|
|
259
|
-
*/
|
|
260
|
-
const PROJECT_SETTINGS_EXPIRATION_TIME = 1e3 * 60 * 5;
|
|
107
|
+
//#region src/utils/isEqualShallow/isEqualShallow.ts
|
|
261
108
|
/**
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
* This function retrieves the latest project configuration settings
|
|
265
|
-
* from Dynamic's servers, including authentication options, enabled chains,
|
|
266
|
-
* and security configurations. The settings are cached for performance.
|
|
109
|
+
* Shallow compare two objects.
|
|
267
110
|
*
|
|
268
|
-
*
|
|
269
|
-
* @returns A promise that resolves to the updated project settings.
|
|
111
|
+
* Source: https://github.com/pmndrs/zustand/blob/main/src/vanilla/shallow.ts
|
|
270
112
|
* @not-instrumented
|
|
271
113
|
*/
|
|
272
|
-
const
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
if (
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
//#endregion
|
|
292
|
-
//#region src/modules/sessionKeys/generateSessionKeys/generateSessionKeys.ts
|
|
293
|
-
/** @not-instrumented */
|
|
294
|
-
const generateSessionKeys = async (client) => {
|
|
295
|
-
const core = getCore(client);
|
|
296
|
-
await core.keychain.removeKey("session");
|
|
297
|
-
const publicKey = await core.keychain.generateKey("session");
|
|
298
|
-
assertDefined(publicKey, "Public key not found");
|
|
299
|
-
core.state.set({ sessionKeys: publicKey });
|
|
300
|
-
return { publicKey };
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
//#endregion
|
|
304
|
-
//#region src/modules/wallets/utils/getAvailableWalletProvidersFromWalletAccounts/getAvailableWalletProvidersFromWalletAccounts.ts
|
|
305
|
-
/** @not-instrumented */
|
|
306
|
-
const getAvailableWalletProvidersFromWalletAccounts = (client) => {
|
|
307
|
-
const core = getCore(client);
|
|
308
|
-
const walletProvidersMap = /* @__PURE__ */ new Map();
|
|
309
|
-
getWalletAccounts(client).forEach((walletAccount) => {
|
|
310
|
-
if (walletProvidersMap.has(walletAccount.walletProviderKey)) return;
|
|
311
|
-
try {
|
|
312
|
-
const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
|
|
313
|
-
walletProvidersMap.set(walletAccount.walletProviderKey, walletProvider);
|
|
314
|
-
} catch (error) {
|
|
315
|
-
core.logger.debug("Wallet provider not found for wallet account", {
|
|
316
|
-
error,
|
|
317
|
-
walletAccount: walletAccount.address
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
return Array.from(walletProvidersMap.values());
|
|
114
|
+
const isEqualShallow = (objA, objB) => {
|
|
115
|
+
if (Object.is(objA, objB)) return true;
|
|
116
|
+
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) return objA === objB;
|
|
117
|
+
if (objA instanceof Map && objB instanceof Map) {
|
|
118
|
+
if (objA.size !== objB.size) return false;
|
|
119
|
+
for (const [key, value] of objA) if (!Object.is(value, objB.get(key))) return false;
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
if (objA instanceof Set && objB instanceof Set) {
|
|
123
|
+
if (objA.size !== objB.size) return false;
|
|
124
|
+
for (const value of objA) if (!objB.has(value)) return false;
|
|
125
|
+
return true;
|
|
126
|
+
}
|
|
127
|
+
const keysA = Object.keys(objA);
|
|
128
|
+
if (keysA.length !== Object.keys(objB).length) return false;
|
|
129
|
+
for (const keyA of keysA) if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) return false;
|
|
130
|
+
if (objA.constructor !== objB.constructor) return false;
|
|
131
|
+
return true;
|
|
322
132
|
};
|
|
323
133
|
|
|
324
134
|
//#endregion
|
|
325
|
-
//#region src/
|
|
135
|
+
//#region src/utils/observable/subscribeWithSelector/subscribeWithSelector.ts
|
|
326
136
|
/**
|
|
327
|
-
*
|
|
137
|
+
* Allows subscribing to a slice of the state.
|
|
138
|
+
* The slice is a computation of the states.
|
|
328
139
|
*
|
|
329
|
-
*
|
|
330
|
-
*
|
|
331
|
-
* block teardown of the others (e.g. during logout).
|
|
140
|
+
* The callback will only be called when the slice has changed.
|
|
141
|
+
* Change is determined by shallow comparison.
|
|
332
142
|
*
|
|
143
|
+
* Returns a function to unsubscribe the callback.
|
|
333
144
|
* @not-instrumented
|
|
334
145
|
*/
|
|
335
|
-
const
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
} catch (err) {
|
|
343
|
-
core.logger.error(`Error destroying wallet provider ${walletProvider.key}`, err);
|
|
344
|
-
}
|
|
345
|
-
}));
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
//#endregion
|
|
349
|
-
//#region src/modules/auth/logoutWithReason/logoutWithReason.ts
|
|
350
|
-
/**
|
|
351
|
-
* Logs the user out with an explicit reason.
|
|
352
|
-
*
|
|
353
|
-
* Revokes the session, clears auth state, terminates wallet providers, and
|
|
354
|
-
* emits the `logout` client event with the given reason. The reason is also
|
|
355
|
-
* captured as an argument on the function-instrumentation event, which is
|
|
356
|
-
* how Datadog distinguishes between different logout causes.
|
|
357
|
-
*
|
|
358
|
-
* Use this instead of the public `logout` when triggering a logout from
|
|
359
|
-
* internal or extension code — the caller owns the reason string, so the
|
|
360
|
-
* telemetry correctly attributes *why* the logout happened.
|
|
361
|
-
*
|
|
362
|
-
* @param params - The logout params.
|
|
363
|
-
* @param params.reason - Why the logout is being triggered. Extension authors
|
|
364
|
-
* needing a reason outside the SDK catalog can cast with `as LogoutReason`.
|
|
365
|
-
* @param client - The Dynamic client instance.
|
|
366
|
-
* @instrumented
|
|
367
|
-
*/
|
|
368
|
-
const logoutWithReason = async ({ reason }, client) => {
|
|
369
|
-
const core = getCore(client);
|
|
370
|
-
core.logger.debug("[logoutWithReason] Logging out...", { reason });
|
|
371
|
-
await destroyWalletProviders({ reason }, client);
|
|
372
|
-
if (client.user !== null) {
|
|
373
|
-
const apiClient = createApiClient({}, client);
|
|
374
|
-
try {
|
|
375
|
-
await apiClient.revokeSession({ environmentId: core.environmentId });
|
|
376
|
-
} catch (error) {
|
|
377
|
-
core.logger.error("Failed to revoke session", error);
|
|
378
|
-
}
|
|
379
|
-
/**
|
|
380
|
-
* This deletes the auth cookie if it exists.
|
|
381
|
-
* If the cookie doesn't exist, this sets a new cookie that expires immediately.
|
|
382
|
-
*/
|
|
383
|
-
if (isCookieEnabled(client)) setCookie(`${DYNAMIC_AUTH_COOKIE_NAME}=; Max-Age=-99999999; path=/; SameSite=Lax`);
|
|
384
|
-
}
|
|
385
|
-
await core.keychain.removeKey("session");
|
|
386
|
-
core.state.set({
|
|
387
|
-
captchaToken: null,
|
|
388
|
-
elevatedAccessTokens: [],
|
|
389
|
-
legacyToken: null,
|
|
390
|
-
mfaToken: null,
|
|
391
|
-
sessionExpiresAt: null,
|
|
392
|
-
sessionKeys: null,
|
|
393
|
-
token: null,
|
|
394
|
-
unverifiedWalletAccounts: [],
|
|
395
|
-
user: null
|
|
146
|
+
const subscribeWithSelector = (observable, selector) => (callback) => {
|
|
147
|
+
let lastSlice = selector(observable.get());
|
|
148
|
+
return observable.subscribe((value) => {
|
|
149
|
+
const nextSlice = selector(value);
|
|
150
|
+
if (isEqualShallow(nextSlice, lastSlice)) return;
|
|
151
|
+
lastSlice = nextSlice;
|
|
152
|
+
callback(nextSlice);
|
|
396
153
|
});
|
|
397
|
-
emitEvent({
|
|
398
|
-
args: { reason },
|
|
399
|
-
event: "logout"
|
|
400
|
-
}, client);
|
|
401
|
-
fetchProjectSettings(client);
|
|
402
|
-
generateSessionKeys(client);
|
|
403
154
|
};
|
|
404
|
-
const __logoutWithReason_impl = logoutWithReason;
|
|
405
|
-
const __logoutWithReason_wrapped = instrumentFunction({
|
|
406
|
-
fn: __logoutWithReason_impl,
|
|
407
|
-
functionName: "logoutWithReason",
|
|
408
|
-
getCore: () => {
|
|
409
|
-
try {
|
|
410
|
-
return getCore(getDefaultClient());
|
|
411
|
-
} catch {
|
|
412
|
-
return;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
155
|
|
|
417
156
|
//#endregion
|
|
418
157
|
//#region src/utils/getBuffer/getBuffer.ts
|
|
@@ -1036,6 +775,7 @@ const consumeCaptchaToken = (client) => {
|
|
|
1036
775
|
* @param params.captchaToken - The captcha token to set.
|
|
1037
776
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
1038
777
|
* @instrumented
|
|
778
|
+
* @redact-params
|
|
1039
779
|
*/
|
|
1040
780
|
const setCaptchaToken = ({ captchaToken }, client = getDefaultClient()) => {
|
|
1041
781
|
getCore(client).state.set({ captchaToken });
|
|
@@ -1050,7 +790,8 @@ const __setCaptchaToken_wrapped = instrumentFunction({
|
|
|
1050
790
|
} catch {
|
|
1051
791
|
return;
|
|
1052
792
|
}
|
|
1053
|
-
}
|
|
793
|
+
},
|
|
794
|
+
redactAll: true
|
|
1054
795
|
});
|
|
1055
796
|
|
|
1056
797
|
//#endregion
|
|
@@ -1114,6 +855,71 @@ const setUnverifiedWalletAccounts = ({ unverifiedWalletAccountsToUpdate }, clien
|
|
|
1114
855
|
core.state.set({ unverifiedWalletAccounts: [...filteredUnverifiedWalletAccounts, ...unverifiedWalletAccountsToUpdate] });
|
|
1115
856
|
};
|
|
1116
857
|
|
|
858
|
+
//#endregion
|
|
859
|
+
//#region src/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.ts
|
|
860
|
+
/** @not-instrumented */
|
|
861
|
+
const updateWalletProviderKeysForVerifiedCredentials = ({ keysToUpdate }, client) => {
|
|
862
|
+
const core = getCore(client);
|
|
863
|
+
core.state.set({ walletProviderKeyMap: {
|
|
864
|
+
...core.state.get().walletProviderKeyMap,
|
|
865
|
+
...keysToUpdate
|
|
866
|
+
} });
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region src/modules/wallets/reconcileWalletAccountsAgainstClient/reconcileWalletAccountsAgainstClient.ts
|
|
871
|
+
/**
|
|
872
|
+
* Reconciles freshly-connected wallet accounts against the client state. For
|
|
873
|
+
* each candidate it classifies as new, a re-connect of an existing unverified
|
|
874
|
+
* account, or a re-connect of an already-verified account, then runs the
|
|
875
|
+
* appropriate state mutation (`setUnverifiedWalletAccounts`,
|
|
876
|
+
* `updateWalletProviderKeysForVerifiedCredentials`, `createVisit` for truly-new
|
|
877
|
+
* entries) and emits a single `walletAccountsChanged` event if anything
|
|
878
|
+
* actually changed. Returns the candidates with `verifiedCredentialId`
|
|
879
|
+
* populated when the address already corresponded to a verified credential.
|
|
880
|
+
*
|
|
881
|
+
* @not-instrumented
|
|
882
|
+
*/
|
|
883
|
+
const reconcileWalletAccountsAgainstClient = ({ addToDynamicWalletAccounts = true, walletAccounts, walletProviderKey }, client) => {
|
|
884
|
+
if (walletAccounts.length === 0) return [];
|
|
885
|
+
const existingWalletAccounts = getWalletAccounts(client);
|
|
886
|
+
const newWalletAccounts = [];
|
|
887
|
+
const unverifiedWalletAccountsToUpdate = [];
|
|
888
|
+
const verifiedCredentialIdToWalletProviderKeyMap = {};
|
|
889
|
+
const reconciledWalletAccounts = walletAccounts.map((candidate) => {
|
|
890
|
+
const matchingExistingWalletAccount = existingWalletAccounts.find((existingWalletAccount) => existingWalletAccount.id === candidate.id);
|
|
891
|
+
if (!matchingExistingWalletAccount) {
|
|
892
|
+
newWalletAccounts.push(candidate);
|
|
893
|
+
return candidate;
|
|
894
|
+
}
|
|
895
|
+
const isWalletProviderKeyChanged = matchingExistingWalletAccount.walletProviderKey !== walletProviderKey;
|
|
896
|
+
if (matchingExistingWalletAccount.verifiedCredentialId) {
|
|
897
|
+
if (isWalletProviderKeyChanged) verifiedCredentialIdToWalletProviderKeyMap[matchingExistingWalletAccount.verifiedCredentialId] = walletProviderKey;
|
|
898
|
+
return {
|
|
899
|
+
...candidate,
|
|
900
|
+
verifiedCredentialId: matchingExistingWalletAccount.verifiedCredentialId
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
if (isWalletProviderKeyChanged) unverifiedWalletAccountsToUpdate.push(candidate);
|
|
904
|
+
return candidate;
|
|
905
|
+
});
|
|
906
|
+
let walletAccountsChanged = false;
|
|
907
|
+
if (Object.keys(verifiedCredentialIdToWalletProviderKeyMap).length > 0) {
|
|
908
|
+
updateWalletProviderKeysForVerifiedCredentials({ keysToUpdate: verifiedCredentialIdToWalletProviderKeyMap }, client);
|
|
909
|
+
walletAccountsChanged = true;
|
|
910
|
+
}
|
|
911
|
+
if (addToDynamicWalletAccounts) {
|
|
912
|
+
const accountsToWrite = [...unverifiedWalletAccountsToUpdate, ...newWalletAccounts];
|
|
913
|
+
if (accountsToWrite.length > 0) {
|
|
914
|
+
setUnverifiedWalletAccounts({ unverifiedWalletAccountsToUpdate: accountsToWrite }, client);
|
|
915
|
+
walletAccountsChanged = true;
|
|
916
|
+
for (const newWalletAccount of newWalletAccounts) createVisit({ walletAccount: newWalletAccount }, client);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
if (walletAccountsChanged) emitWalletAccountsChangedEvent(client);
|
|
920
|
+
return reconciledWalletAccounts;
|
|
921
|
+
};
|
|
922
|
+
|
|
1117
923
|
//#endregion
|
|
1118
924
|
//#region src/modules/wallets/utils/formatSignInMessage/formatSignInMessage.ts
|
|
1119
925
|
/**
|
|
@@ -1229,17 +1035,6 @@ const verifyMessageSignatureOwnership = async ({ messageToSign, walletAddress, a
|
|
|
1229
1035
|
}
|
|
1230
1036
|
};
|
|
1231
1037
|
|
|
1232
|
-
//#endregion
|
|
1233
|
-
//#region src/modules/wallets/walletProvider/walletProviderKeyMap/updateWalletProviderKeysForVerifiedCredentials/updateWalletProviderKeysForVerifiedCredentials.ts
|
|
1234
|
-
/** @not-instrumented */
|
|
1235
|
-
const updateWalletProviderKeysForVerifiedCredentials = ({ keysToUpdate }, client) => {
|
|
1236
|
-
const core = getCore(client);
|
|
1237
|
-
core.state.set({ walletProviderKeyMap: {
|
|
1238
|
-
...core.state.get().walletProviderKeyMap,
|
|
1239
|
-
...keysToUpdate
|
|
1240
|
-
} });
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
1038
|
//#endregion
|
|
1244
1039
|
//#region src/modules/wallets/networks/getSdkChainFromApiChainName/getSdkChainFromApiChainName.ts
|
|
1245
1040
|
/**
|
|
@@ -1344,5 +1139,5 @@ const getNetworkProviderFromNetworkId = ({ networkId, chain }, client) => {
|
|
|
1344
1139
|
};
|
|
1345
1140
|
|
|
1346
1141
|
//#endregion
|
|
1347
|
-
export {
|
|
1348
|
-
//# sourceMappingURL=getNetworkProviderFromNetworkId-
|
|
1142
|
+
export { FETCH_PROJECT_SETTINGS_TRACKER_KEY as A, InvalidStorageSet as B, createKeychainService as C, CrossTabBroadcastMessageSchema as D, createCrossTabBroadcast as E, isServerSideRendering as F, getBuffer as I, subscribeWithSelector as L, INITIALIZE_STORAGE_SYNC_TRACKER_KEY as M, REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY as N, CannotTrackError as O, REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY as P, isEqualShallow as R, createRealtimeService as S, createLogger as T, getAppMetadata as _, verifyMessageSignatureOwnership as a, NoNetworkProvidersError as b, formatSignInMessage as c, setUnverifiedWalletAccounts as d, createVisit as f, isCaptchaRequired as g, consumeCaptchaToken as h, getNetworksData as i, GENERATE_SESSION_KEYS_TRACKER_KEY as j, createDeferredPromise as k, reconcileWalletAccountsAgainstClient as l, __setCaptchaToken_wrapped as m, getNetworkProviders as n, removeUnverifiedWalletAccount as o, hasExtension as p, getNetworkProviderBuilderRegistry as r, createSignInMessageStatement as s, getNetworkProviderFromNetworkId as t, updateWalletProviderKeysForVerifiedCredentials as u, MethodNotImplementedError as v, NativeModuleNotLinkedError as w, getKeychainIndexedDBName as x, WalletAlreadyLinkedToAnotherUserError as y, createStorage as z };
|
|
1143
|
+
//# sourceMappingURL=getNetworkProviderFromNetworkId-Bs1kQdWk.native.esm.js.map
|