@dynamic-labs-sdk/client 1.6.0 → 1.7.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.
Files changed (90) hide show
  1. package/dist/{InvalidParamError-DyXEKMWn.cjs → InvalidParamError-CTssOe86.cjs} +105 -993
  2. package/dist/InvalidParamError-CTssOe86.cjs.map +1 -0
  3. package/dist/{InvalidParamError-BIptAjbC.native.esm.js → InvalidParamError-Crwntjl7.native.esm.js} +90 -828
  4. package/dist/InvalidParamError-Crwntjl7.native.esm.js.map +1 -0
  5. package/dist/{InvalidParamError-BZ0LHaml.esm.js → InvalidParamError-fQLJaGBW.esm.js} +90 -795
  6. package/dist/InvalidParamError-fQLJaGBW.esm.js.map +1 -0
  7. package/dist/{NotWaasWalletAccountError-CElqwdQO.cjs → NotWaasWalletAccountError-2RaDipZu.cjs} +4 -4
  8. package/dist/NotWaasWalletAccountError-2RaDipZu.cjs.map +1 -0
  9. package/dist/{NotWaasWalletAccountError-nT4jrLbp.esm.js → NotWaasWalletAccountError-BJLGGYmU.native.esm.js} +4 -4
  10. package/dist/NotWaasWalletAccountError-BJLGGYmU.native.esm.js.map +1 -0
  11. package/dist/{NotWaasWalletAccountError-BbOA5rPd.native.esm.js → NotWaasWalletAccountError-DF_S7gqo.esm.js} +4 -4
  12. package/dist/NotWaasWalletAccountError-DF_S7gqo.esm.js.map +1 -0
  13. package/dist/core.cjs +23 -23
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.esm.js +5 -5
  16. package/dist/core.native.esm.js +5 -5
  17. package/dist/{getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js → getNetworkProviderFromNetworkId-BCSmILlH.native.esm.js} +310 -39
  18. package/dist/getNetworkProviderFromNetworkId-BCSmILlH.native.esm.js.map +1 -0
  19. package/dist/{getNetworkProviderFromNetworkId-BkAPIdRC.esm.js → getNetworkProviderFromNetworkId-BWhaD23J.esm.js} +276 -38
  20. package/dist/getNetworkProviderFromNetworkId-BWhaD23J.esm.js.map +1 -0
  21. package/dist/{getNetworkProviderFromNetworkId-DbI5MZhq.cjs → getNetworkProviderFromNetworkId-C1p9Rrg3.cjs} +351 -44
  22. package/dist/getNetworkProviderFromNetworkId-C1p9Rrg3.cjs.map +1 -0
  23. package/dist/{getSignedSessionId-BF6n8gve.cjs → getSignedSessionId-CxxYNC_8.cjs} +3 -3
  24. package/dist/{getSignedSessionId-BF6n8gve.cjs.map → getSignedSessionId-CxxYNC_8.cjs.map} +1 -1
  25. package/dist/{getSignedSessionId-1TV-x__C.native.esm.js → getSignedSessionId-DPOXdh6y.native.esm.js} +3 -3
  26. package/dist/{getSignedSessionId-1TV-x__C.native.esm.js.map → getSignedSessionId-DPOXdh6y.native.esm.js.map} +1 -1
  27. package/dist/{getSignedSessionId-y3YtxFHZ.esm.js → getSignedSessionId-c7dS4PQ9.esm.js} +3 -3
  28. package/dist/{getSignedSessionId-y3YtxFHZ.esm.js.map → getSignedSessionId-c7dS4PQ9.esm.js.map} +1 -1
  29. package/dist/getVerifiedCredentialForWalletAccount-Cahp763h.esm.js +701 -0
  30. package/dist/getVerifiedCredentialForWalletAccount-Cahp763h.esm.js.map +1 -0
  31. package/dist/getVerifiedCredentialForWalletAccount-Di8dM5Wx.cjs +887 -0
  32. package/dist/getVerifiedCredentialForWalletAccount-Di8dM5Wx.cjs.map +1 -0
  33. package/dist/getVerifiedCredentialForWalletAccount-DuNbORNW.native.esm.js +701 -0
  34. package/dist/getVerifiedCredentialForWalletAccount-DuNbORNW.native.esm.js.map +1 -0
  35. package/dist/index.cjs +76 -76
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.esm.js +14 -14
  38. package/dist/index.esm.js.map +1 -1
  39. package/dist/index.native.esm.js +14 -14
  40. package/dist/index.native.esm.js.map +1 -1
  41. package/dist/{isMfaRequiredForAction-Dy4-S3mr.esm.js → isMfaRequiredForAction-BjRvPrU6.esm.js} +2 -2
  42. package/dist/{isMfaRequiredForAction-Dy4-S3mr.esm.js.map → isMfaRequiredForAction-BjRvPrU6.esm.js.map} +1 -1
  43. package/dist/{isMfaRequiredForAction-B2vKX31S.native.esm.js → isMfaRequiredForAction-D8G5PBAd.native.esm.js} +2 -2
  44. package/dist/{isMfaRequiredForAction-B2vKX31S.native.esm.js.map → isMfaRequiredForAction-D8G5PBAd.native.esm.js.map} +1 -1
  45. package/dist/{isMfaRequiredForAction-K2Jh-3-j.cjs → isMfaRequiredForAction-hlhj0qAC.cjs} +2 -2
  46. package/dist/{isMfaRequiredForAction-K2Jh-3-j.cjs.map → isMfaRequiredForAction-hlhj0qAC.cjs.map} +1 -1
  47. package/dist/modules/apiClient/apiClient.types.d.ts +0 -12
  48. package/dist/modules/apiClient/apiClient.types.d.ts.map +1 -1
  49. package/dist/modules/apiClient/createApiClient.d.ts.map +1 -1
  50. package/dist/modules/auth/logoutReason.d.ts +1 -1
  51. package/dist/modules/auth/logoutReason.d.ts.map +1 -1
  52. package/dist/modules/auth/logoutWithReason/logoutWithReason.d.ts.map +1 -1
  53. package/dist/modules/deviceRegistration/getRegisteredDevices/getRegisteredDevices.d.ts.map +1 -1
  54. package/dist/modules/user/refreshAuth/refreshAuth.d.ts.map +1 -1
  55. package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts +12 -1
  56. package/dist/modules/waas/backupWaasKeySharesToGoogleDrive/backupWaasKeySharesToGoogleDrive.d.ts.map +1 -1
  57. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  58. package/dist/modules/waas/waas.types.d.ts +1 -0
  59. package/dist/modules/waas/waas.types.d.ts.map +1 -1
  60. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  61. package/dist/waas.cjs +12 -9
  62. package/dist/waas.cjs.map +1 -1
  63. package/dist/waas.esm.js +6 -4
  64. package/dist/waas.esm.js.map +1 -1
  65. package/dist/waas.native.esm.js +6 -4
  66. package/dist/waas.native.esm.js.map +1 -1
  67. package/dist/waasCore.cjs +6 -4
  68. package/dist/waasCore.cjs.map +1 -1
  69. package/dist/waasCore.esm.js +5 -4
  70. package/dist/waasCore.esm.js.map +1 -1
  71. package/dist/waasCore.native.esm.js +5 -4
  72. package/dist/waasCore.native.esm.js.map +1 -1
  73. package/package.json +4 -2
  74. package/dist/InvalidParamError-BIptAjbC.native.esm.js.map +0 -1
  75. package/dist/InvalidParamError-BZ0LHaml.esm.js.map +0 -1
  76. package/dist/InvalidParamError-DyXEKMWn.cjs.map +0 -1
  77. package/dist/NotWaasWalletAccountError-BbOA5rPd.native.esm.js.map +0 -1
  78. package/dist/NotWaasWalletAccountError-CElqwdQO.cjs.map +0 -1
  79. package/dist/NotWaasWalletAccountError-nT4jrLbp.esm.js.map +0 -1
  80. package/dist/getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js.map +0 -1
  81. package/dist/getNetworkProviderFromNetworkId-BkAPIdRC.esm.js.map +0 -1
  82. package/dist/getNetworkProviderFromNetworkId-DbI5MZhq.cjs.map +0 -1
  83. package/dist/getVerifiedCredentialForWalletAccount-BfJ29erz.cjs +0 -346
  84. package/dist/getVerifiedCredentialForWalletAccount-BfJ29erz.cjs.map +0 -1
  85. package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js +0 -269
  86. package/dist/getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js.map +0 -1
  87. package/dist/getVerifiedCredentialForWalletAccount-etV50QRH.esm.js +0 -269
  88. package/dist/getVerifiedCredentialForWalletAccount-etV50QRH.esm.js.map +0 -1
  89. package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts +0 -27
  90. package/dist/modules/apiClient/utils/sessionExpiryLogoutMiddleware/createSessionExpiryLogoutMiddleware.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
- import { $ as instrumentFunction, A as splitWalletProviderKey, D as CHAINS_INFO_MAP, E as getChainFromVerifiedCredentialChain, F as onEvent, G as LinkCredentialError, H as SandboxMaximumThresholdReachedError, I as onceEvent, K as InvalidExternalAuthError, M as retryOnFail, N as emitEvent, O as formatWalletAccountId, P as offEvent, Q as __getElevatedAccessToken_wrapped, S as getWalletAccounts, U as MfaRateLimitedError, V as getNonce, W as MfaInvalidOtpError, X as assertDefined, Y as isCookieEnabled, Z as ValueMustBeDefinedError, _ as generateSessionKeys, a as DYNAMIC_ICONIC_SPRITE_URL, b as createLocalStorageAdapter, c as createApiClient, ct as getDefaultClient, dt as BaseError, et as scrubParameters, f as getWalletProviderFromWalletAccount, ft as getCore, g as NoWalletProviderFoundError, it as randomString, k as normalizeAddress, l as UnauthorizedError, lt as setDefaultClient, m as getWalletProviderRegistry, mt as version, nt as getUserAgent, o as SDK_API_CORE_VERSION, p as WalletProviderPriority, pt as name, q as APIError, rt as extractSessionId, s as fetchAndStoreNonces, st as NONCE_POOL_SIZE, t as InvalidParamError, tt as DEFAULT_PII_FIELDS, u as __logoutWithReason_wrapped, v as fetchProjectSettings, x as isSignedIn, y as createStorageKeySchema } from "./InvalidParamError-BIptAjbC.native.esm.js";
2
- import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, C as createKeychainService, D as CannotTrackError, F as getBuffer, I as subscribeWithSelector, L as isEqualShallow, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as createStorage, S as createRealtimeService, T as createCrossTabBroadcast, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as NoNetworkProvidersError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createLogger, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError } from "./getNetworkProviderFromNetworkId-B7DIqT2T.native.esm.js";
3
- import { a as parseElevatedAccessToken, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, i as upsertElevatedAccessToken, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders } from "./getVerifiedCredentialForWalletAccount-CLyC2nOl.native.esm.js";
4
- import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BbOA5rPd.native.esm.js";
5
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-B2vKX31S.native.esm.js";
1
+ import { A as getUserAgent, B as getCore, C as isCookieEnabled, D as instrumentFunction, E as __getElevatedAccessToken_wrapped, F as NONCE_POOL_SIZE, H as version, I as getDefaultClient, L as setDefaultClient, M as randomString, O as scrubParameters, T as ValueMustBeDefinedError, V as name, _ as MfaRateLimitedError, a as DYNAMIC_ICONIC_SPRITE_URL, b as InvalidExternalAuthError, c as CHAINS_INFO_MAP, d as UnauthorizedError, g as SandboxMaximumThresholdReachedError, h as getNonce, j as extractSessionId, k as DEFAULT_PII_FIELDS, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as getChainFromVerifiedCredentialChain, t as InvalidParamError, u as createApiClient, v as MfaInvalidOtpError, w as assertDefined, x as APIError, y as LinkCredentialError, z as BaseError } from "./InvalidParamError-Crwntjl7.native.esm.js";
2
+ import { A as GENERATE_SESSION_KEYS_TRACKER_KEY, B as createStorage, C as createKeychainService, D as CannotTrackError, F as getBuffer, G as subscribeWithSelector, H as createLocalStorageAdapter, I as __logoutWithReason_wrapped, K as isEqualShallow, L as generateSessionKeys, M as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, N as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, O as createDeferredPromise, P as isServerSideRendering, R as fetchProjectSettings, S as createRealtimeService, T as createCrossTabBroadcast, U as isSignedIn, W as retryOnFail, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as NoNetworkProvidersError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, k as FETCH_PROJECT_SETTINGS_TRACKER_KEY, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createLogger, x as getKeychainIndexedDBName, y as WalletAlreadyLinkedToAnotherUserError, z as createStorageKeySchema } from "./getNetworkProviderFromNetworkId-BCSmILlH.native.esm.js";
3
+ import { A as onceEvent, C as formatWalletAccountId, D as emitEvent, O as offEvent, T as splitWalletProviderKey, _ as getWalletProviderRegistry, a as parseElevatedAccessToken, b as getWalletAccounts, d as isUserMissingMfaAuth, f as checkAndRaiseWalletAccountsChangedEvent, g as WalletProviderPriority, h as getWalletProviderFromWalletAccount, i as upsertElevatedAccessToken, k as onEvent, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, r as updateAuthFromVerifyResponse, t as getVerifiedCredentialForWalletAccount, u as getWalletProviders, w as normalizeAddress, y as NoWalletProviderFoundError } from "./getVerifiedCredentialForWalletAccount-DuNbORNW.native.esm.js";
4
+ import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-BJLGGYmU.native.esm.js";
5
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-D8G5PBAd.native.esm.js";
6
6
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
7
7
  import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, TokenScope, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
8
8
  import * as z from "zod/mini";
@@ -55,6 +55,14 @@ const appendConnectionUriToDeeplink = ({ connectionUri, deeplinkUrl }) => {
55
55
  return url.href;
56
56
  };
57
57
 
58
+ //#endregion
59
+ //#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
60
+ /** @not-instrumented */
61
+ const prefetchNoncesIfNeeded = async (client) => {
62
+ if (getCore(client).state.get().prefetchedNonces.length >= NONCE_POOL_SIZE) return;
63
+ await fetchAndStoreNonces(client);
64
+ };
65
+
58
66
  //#endregion
59
67
  //#region src/services/runtimeServices/createRuntimeServices/createRuntimeServices.ts
60
68
  /**
@@ -72,14 +80,6 @@ const createRuntimeServices = () => {
72
80
  };
73
81
  };
74
82
 
75
- //#endregion
76
- //#region src/utils/getNonce/prefetchNoncesIfNeeded/prefetchNoncesIfNeeded.ts
77
- /** @not-instrumented */
78
- const prefetchNoncesIfNeeded = async (client) => {
79
- if (getCore(client).state.get().prefetchedNonces.length >= NONCE_POOL_SIZE) return;
80
- await fetchAndStoreNonces(client);
81
- };
82
-
83
83
  //#endregion
84
84
  //#region src/modules/auth/initializeAuth/setLongTimeout/setLongTimeout.ts
85
85
  /**
@@ -3073,7 +3073,7 @@ const detectDeviceRegistrationRedirect = ({ url }) => {
3073
3073
  /** @not-instrumented */
3074
3074
  const getRegisteredDevices = async (client = getDefaultClient()) => {
3075
3075
  const core = getCore(client);
3076
- const apiClient = createApiClient({ skipSessionExpiryLogout: true }, client);
3076
+ const apiClient = createApiClient({}, client);
3077
3077
  try {
3078
3078
  return (await apiClient.listDeviceRegistrations({ environmentId: core.environmentId })).deviceRegistrations;
3079
3079
  } catch (error) {