@dynamic-labs-sdk/client 0.16.1 → 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.
Files changed (42) hide show
  1. package/dist/{InvalidParamError-BPKi-2Me.esm.js → InvalidParamError-BVx-qvip.esm.js} +8 -3
  2. package/dist/{InvalidParamError-BPKi-2Me.esm.js.map → InvalidParamError-BVx-qvip.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-DxdJ-Vjr.cjs.js → InvalidParamError-DgN3p6L7.cjs.js} +8 -3
  4. package/dist/{InvalidParamError-DxdJ-Vjr.cjs.js.map → InvalidParamError-DgN3p6L7.cjs.js.map} +1 -1
  5. package/dist/{NotWaasWalletAccountError-674h4R9F.esm.js → NotWaasWalletAccountError-Cf9lQuha.esm.js} +3 -3
  6. package/dist/{NotWaasWalletAccountError-674h4R9F.esm.js.map → NotWaasWalletAccountError-Cf9lQuha.esm.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-CC0TnXFG.cjs.js → NotWaasWalletAccountError-D-U7HAdA.cjs.js} +3 -3
  8. package/dist/{NotWaasWalletAccountError-CC0TnXFG.cjs.js.map → NotWaasWalletAccountError-D-U7HAdA.cjs.js.map} +1 -1
  9. package/dist/client/core/createCore/createCore.d.ts.map +1 -1
  10. package/dist/client/types/DynamicClientConfig.d.ts +2 -0
  11. package/dist/client/types/DynamicClientConfig.d.ts.map +1 -1
  12. package/dist/core.cjs.js +5 -5
  13. package/dist/core.esm.js +5 -5
  14. package/dist/{getNetworkProviderFromNetworkId-4aliEYIC.cjs.js → getNetworkProviderFromNetworkId-B3Q8FbYk.cjs.js} +3 -3
  15. package/dist/{getNetworkProviderFromNetworkId-4aliEYIC.cjs.js.map → getNetworkProviderFromNetworkId-B3Q8FbYk.cjs.js.map} +1 -1
  16. package/dist/{getNetworkProviderFromNetworkId-DMgQWVbk.esm.js → getNetworkProviderFromNetworkId-Dxgklnpy.esm.js} +3 -3
  17. package/dist/{getNetworkProviderFromNetworkId-DMgQWVbk.esm.js.map → getNetworkProviderFromNetworkId-Dxgklnpy.esm.js.map} +1 -1
  18. package/dist/{getSignedSessionId-lflDyi6Y.cjs.js → getSignedSessionId-CHghEuS-.cjs.js} +3 -3
  19. package/dist/{getSignedSessionId-lflDyi6Y.cjs.js.map → getSignedSessionId-CHghEuS-.cjs.js.map} +1 -1
  20. package/dist/{getSignedSessionId-QONqJpzq.esm.js → getSignedSessionId-DyHvgJWx.esm.js} +3 -3
  21. package/dist/{getSignedSessionId-QONqJpzq.esm.js.map → getSignedSessionId-DyHvgJWx.esm.js.map} +1 -1
  22. package/dist/{getVerifiedCredentialForWalletAccount-9U3-GhOF.esm.js → getVerifiedCredentialForWalletAccount-BNiAI52Z.esm.js} +2 -2
  23. package/dist/{getVerifiedCredentialForWalletAccount-9U3-GhOF.esm.js.map → getVerifiedCredentialForWalletAccount-BNiAI52Z.esm.js.map} +1 -1
  24. package/dist/{getVerifiedCredentialForWalletAccount-BdVRoKMM.cjs.js → getVerifiedCredentialForWalletAccount-CrCYutAz.cjs.js} +2 -2
  25. package/dist/{getVerifiedCredentialForWalletAccount-BdVRoKMM.cjs.js.map → getVerifiedCredentialForWalletAccount-CrCYutAz.cjs.js.map} +1 -1
  26. package/dist/index.cjs.js +13 -13
  27. package/dist/index.cjs.js.map +1 -1
  28. package/dist/index.esm.js +13 -13
  29. package/dist/index.esm.js.map +1 -1
  30. package/dist/{isMfaRequiredForAction-Du4D8WDp.cjs.js → isMfaRequiredForAction-C3HCyv2s.cjs.js} +2 -2
  31. package/dist/{isMfaRequiredForAction-Du4D8WDp.cjs.js.map → isMfaRequiredForAction-C3HCyv2s.cjs.js.map} +1 -1
  32. package/dist/{isMfaRequiredForAction-BMf88hKI.esm.js → isMfaRequiredForAction-cHOlNJRm.esm.js} +2 -2
  33. package/dist/{isMfaRequiredForAction-BMf88hKI.esm.js.map → isMfaRequiredForAction-cHOlNJRm.esm.js.map} +1 -1
  34. package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts +5 -3
  35. package/dist/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.d.ts.map +1 -1
  36. package/dist/modules/wallets/constants.d.ts.map +1 -1
  37. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  38. package/dist/waas.cjs.js +3 -3
  39. package/dist/waas.esm.js +3 -3
  40. package/dist/waasCore.cjs.js +3 -3
  41. package/dist/waasCore.esm.js +3 -3
  42. 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-BPKi-2Me.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-DMgQWVbk.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-9U3-GhOF.esm.js";
4
- import { n as refreshAuth, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-674h4R9F.esm.js";
5
- import { n as getMfaMethods, r as consumeMfaToken, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-BMf88hKI.esm.js";
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";
@@ -855,7 +855,10 @@ const createCore = (config) => {
855
855
  getApiHeaders: config.coreConfig?.getApiHeaders ?? (() => ({})),
856
856
  initTrack,
857
857
  logger,
858
- metadata: config.metadata,
858
+ metadata: {
859
+ ...config.metadata,
860
+ universalLink: config.metadata?.universalLink ?? (isServerSideRendering() ? void 0 : window.location.origin)
861
+ },
859
862
  navigate,
860
863
  openDeeplink,
861
864
  passkey,
@@ -2083,18 +2086,15 @@ const getRegisteredDevices = async (client = getDefaultClient()) => {
2083
2086
  //#endregion
2084
2087
  //#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
2085
2088
  /**
2086
- * Checks if device registration is required for the current user.
2089
+ * Checks if device registration is required for the given user.
2087
2090
  *
2088
- * This function determines if the current user has the deviceRegistration
2091
+ * This function determines if the user has the deviceRegistration
2089
2092
  * scope, indicating that device registration is required.
2090
2093
  *
2094
+ * @param user - The user to check.
2091
2095
  * @returns True if device registration is required, false otherwise.
2092
2096
  */
2093
- const isDeviceRegistrationRequired = (client = getDefaultClient()) => {
2094
- const user = client.user;
2095
- assertDefined(user, "User not logged in");
2096
- return Boolean(user.scope?.includes("device:register"));
2097
- };
2097
+ const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("device:register"));
2098
2098
 
2099
2099
  //#endregion
2100
2100
  //#region src/modules/deviceRegistration/revokeAllRegisteredDevices/revokeAllRegisteredDevices.ts