@dynamic-labs-sdk/client 0.16.2 → 0.16.3
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-DRf5Y5Aj.esm.js → InvalidParamError-BVx-qvip.esm.js} +8 -3
- package/dist/{InvalidParamError-DRf5Y5Aj.esm.js.map → InvalidParamError-BVx-qvip.esm.js.map} +1 -1
- package/dist/{InvalidParamError-BweYAZrY.cjs.js → InvalidParamError-DgN3p6L7.cjs.js} +8 -3
- package/dist/{InvalidParamError-BweYAZrY.cjs.js.map → InvalidParamError-DgN3p6L7.cjs.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-D_AuJFHM.esm.js → NotWaasWalletAccountError-Cf9lQuha.esm.js} +3 -3
- package/dist/{NotWaasWalletAccountError-D_AuJFHM.esm.js.map → NotWaasWalletAccountError-Cf9lQuha.esm.js.map} +1 -1
- package/dist/{NotWaasWalletAccountError-Cf966VSY.cjs.js → NotWaasWalletAccountError-D-U7HAdA.cjs.js} +3 -3
- package/dist/{NotWaasWalletAccountError-Cf966VSY.cjs.js.map → NotWaasWalletAccountError-D-U7HAdA.cjs.js.map} +1 -1
- package/dist/core.cjs.js +5 -5
- package/dist/core.esm.js +5 -5
- package/dist/{getNetworkProviderFromNetworkId-D1oubSr_.cjs.js → getNetworkProviderFromNetworkId-B3Q8FbYk.cjs.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-D1oubSr_.cjs.js.map → getNetworkProviderFromNetworkId-B3Q8FbYk.cjs.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-PYVbXW2g.esm.js → getNetworkProviderFromNetworkId-Dxgklnpy.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-PYVbXW2g.esm.js.map → getNetworkProviderFromNetworkId-Dxgklnpy.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-DrTDCzhj.cjs.js → getSignedSessionId-CHghEuS-.cjs.js} +3 -3
- package/dist/{getSignedSessionId-DrTDCzhj.cjs.js.map → getSignedSessionId-CHghEuS-.cjs.js.map} +1 -1
- package/dist/{getSignedSessionId-CA2ARcr3.esm.js → getSignedSessionId-DyHvgJWx.esm.js} +3 -3
- package/dist/{getSignedSessionId-CA2ARcr3.esm.js.map → getSignedSessionId-DyHvgJWx.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-Cc7DjHds.esm.js → getVerifiedCredentialForWalletAccount-BNiAI52Z.esm.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-Cc7DjHds.esm.js.map → getVerifiedCredentialForWalletAccount-BNiAI52Z.esm.js.map} +1 -1
- package/dist/{getVerifiedCredentialForWalletAccount-CnEQvQrG.cjs.js → getVerifiedCredentialForWalletAccount-CrCYutAz.cjs.js} +2 -2
- package/dist/{getVerifiedCredentialForWalletAccount-CnEQvQrG.cjs.js.map → getVerifiedCredentialForWalletAccount-CrCYutAz.cjs.js.map} +1 -1
- package/dist/index.cjs.js +9 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/{isMfaRequiredForAction-LvTNM74t.cjs.js → isMfaRequiredForAction-C3HCyv2s.cjs.js} +2 -2
- package/dist/{isMfaRequiredForAction-LvTNM74t.cjs.js.map → isMfaRequiredForAction-C3HCyv2s.cjs.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-Buji2Pg6.esm.js → isMfaRequiredForAction-cHOlNJRm.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-Buji2Pg6.esm.js.map → isMfaRequiredForAction-cHOlNJRm.esm.js.map} +1 -1
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +5 -3
- package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts.map +1 -1
- package/dist/modules/wallets/constants.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs.js +3 -3
- package/dist/waas.esm.js +3 -3
- package/dist/waasCore.cjs.js +3 -3
- package/dist/waasCore.esm.js +3 -3
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as randomString, B as version, C as InvalidExternalAuthError, D as isCookieEnabled, F as setDefaultClient, L as BaseError, N as NONCE_POOL_SIZE, O as assertDefined, P as getDefaultClient, R as getCore, S as LinkCredentialError, a as DYNAMIC_ICONIC_SPRITE_URL, b as MfaRateLimitedError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as createStorageKeySchema, j as CLIENT_SDK_NAME, k as ValueMustBeDefinedError, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as getNonce, w as APIError, x as MfaInvalidOtpError, y as SandboxMaximumThresholdReachedError, z as name } from "./InvalidParamError-
|
|
2
|
-
import { A as isEqualShallow, C as isServerSideRendering, D as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, E as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, N as createLocalStorageAdapter, O as generateSessionKeys, S as createDeferredPromise, T as GENERATE_SESSION_KEYS_TRACKER_KEY, _ as NoNetworkProvidersError, a as updateWalletProviderKeysForVerifiedCredentials, c as createSignInMessageStatement, d as createVisit, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as getNetworksData, j as createStorage, k as subscribeWithSelector, l as formatSignInMessage, m as consumeCaptchaToken, o as verifyMessageSignatureOwnership, p as setCaptchaToken, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as createLogger, w as FETCH_PROJECT_SETTINGS_TRACKER_KEY, x as CannotTrackError, y as createCrossTabBroadcast } from "./getNetworkProviderFromNetworkId-
|
|
3
|
-
import { D as onceEvent, E as onEvent, O as setCookie, S as splitWalletProviderKey, T as offEvent, _ as getWalletAccounts, b as formatWalletAccountId, c as getWalletProviders, d as DYNAMIC_AUTH_COOKIE_NAME, f as getWalletProviderFromWalletAccount, g as NoWalletProviderFoundError, i as restoreUserSharesForAllWalletAccounts, l as checkAndRaiseWalletAccountsChangedEvent, n as getWalletProviderByKey, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as emitWalletAccountsChangedEvent, w as emitEvent, x as normalizeAddress } from "./getVerifiedCredentialForWalletAccount-
|
|
4
|
-
import { n as refreshAuth, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-
|
|
5
|
-
import { n as getMfaMethods, r as consumeMfaToken, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
1
|
+
import { A as randomString, B as version, C as InvalidExternalAuthError, D as isCookieEnabled, F as setDefaultClient, L as BaseError, N as NONCE_POOL_SIZE, O as assertDefined, P as getDefaultClient, R as getCore, S as LinkCredentialError, a as DYNAMIC_ICONIC_SPRITE_URL, b as MfaRateLimitedError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as createStorageKeySchema, j as CLIENT_SDK_NAME, k as ValueMustBeDefinedError, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as getNonce, w as APIError, x as MfaInvalidOtpError, y as SandboxMaximumThresholdReachedError, z as name } from "./InvalidParamError-BVx-qvip.esm.js";
|
|
2
|
+
import { A as isEqualShallow, C as isServerSideRendering, D as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, E as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, N as createLocalStorageAdapter, O as generateSessionKeys, S as createDeferredPromise, T as GENERATE_SESSION_KEYS_TRACKER_KEY, _ as NoNetworkProvidersError, a as updateWalletProviderKeysForVerifiedCredentials, c as createSignInMessageStatement, d as createVisit, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as getNetworksData, j as createStorage, k as subscribeWithSelector, l as formatSignInMessage, m as consumeCaptchaToken, o as verifyMessageSignatureOwnership, p as setCaptchaToken, s as removeUnverifiedWalletAccount, t as getNetworkProviderFromNetworkId, u as setUnverifiedWalletAccounts, v as createLogger, w as FETCH_PROJECT_SETTINGS_TRACKER_KEY, x as CannotTrackError, y as createCrossTabBroadcast } from "./getNetworkProviderFromNetworkId-Dxgklnpy.esm.js";
|
|
3
|
+
import { D as onceEvent, E as onEvent, O as setCookie, S as splitWalletProviderKey, T as offEvent, _ as getWalletAccounts, b as formatWalletAccountId, c as getWalletProviders, d as DYNAMIC_AUTH_COOKIE_NAME, f as getWalletProviderFromWalletAccount, g as NoWalletProviderFoundError, i as restoreUserSharesForAllWalletAccounts, l as checkAndRaiseWalletAccountsChangedEvent, n as getWalletProviderByKey, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as emitWalletAccountsChangedEvent, w as emitEvent, x as normalizeAddress } from "./getVerifiedCredentialForWalletAccount-BNiAI52Z.esm.js";
|
|
4
|
+
import { n as refreshAuth, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-Cf9lQuha.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as consumeMfaToken, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-cHOlNJRm.esm.js";
|
|
6
6
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
7
7
|
import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
8
8
|
import * as z from "zod/mini";
|
|
@@ -2086,18 +2086,15 @@ const getRegisteredDevices = async (client = getDefaultClient()) => {
|
|
|
2086
2086
|
//#endregion
|
|
2087
2087
|
//#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
|
|
2088
2088
|
/**
|
|
2089
|
-
* Checks if device registration is required for the
|
|
2089
|
+
* Checks if device registration is required for the given user.
|
|
2090
2090
|
*
|
|
2091
|
-
* This function determines if the
|
|
2091
|
+
* This function determines if the user has the deviceRegistration
|
|
2092
2092
|
* scope, indicating that device registration is required.
|
|
2093
2093
|
*
|
|
2094
|
+
* @param user - The user to check.
|
|
2094
2095
|
* @returns True if device registration is required, false otherwise.
|
|
2095
2096
|
*/
|
|
2096
|
-
const isDeviceRegistrationRequired = (
|
|
2097
|
-
const user = client.user;
|
|
2098
|
-
assertDefined(user, "User not logged in");
|
|
2099
|
-
return Boolean(user.scope?.includes("device:register"));
|
|
2100
|
-
};
|
|
2097
|
+
const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("device:register"));
|
|
2101
2098
|
|
|
2102
2099
|
//#endregion
|
|
2103
2100
|
//#region src/modules/deviceRegistration/revokeAllRegisteredDevices/revokeAllRegisteredDevices.ts
|