@dynamic-labs-sdk/client 1.23.0 → 1.23.1

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 (102) hide show
  1. package/dist/{NativeModuleNotLinkedError-DIpQjh_K.native.esm.js → NativeModuleNotLinkedError-DLP1hpcM.native.esm.js} +3 -3
  2. package/dist/{NativeModuleNotLinkedError-DIpQjh_K.native.esm.js.map → NativeModuleNotLinkedError-DLP1hpcM.native.esm.js.map} +1 -1
  3. package/dist/{consumeMfaTokenIfRequiredForAction-jsAdDyDj.esm.js → consumeMfaTokenIfRequiredForAction-D2oiQdpj.esm.js} +2 -2
  4. package/dist/{consumeMfaTokenIfRequiredForAction-jsAdDyDj.esm.js.map → consumeMfaTokenIfRequiredForAction-D2oiQdpj.esm.js.map} +1 -1
  5. package/dist/{consumeMfaTokenIfRequiredForAction-pUcqlY3s.cjs → consumeMfaTokenIfRequiredForAction-DJAdtHe3.cjs} +2 -2
  6. package/dist/{consumeMfaTokenIfRequiredForAction-pUcqlY3s.cjs.map → consumeMfaTokenIfRequiredForAction-DJAdtHe3.cjs.map} +1 -1
  7. package/dist/core.cjs +6 -6
  8. package/dist/core.esm.js +8 -8
  9. package/dist/core.esm.js.map +1 -1
  10. package/dist/core.native.esm.js +5 -5
  11. package/dist/exports/waas.d.ts +1 -0
  12. package/dist/exports/waas.d.ts.map +1 -1
  13. package/dist/{getNetworkProviderFromNetworkId-DPFHY3b8.cjs → getNetworkProviderFromNetworkId-BVP0ghId.cjs} +2 -2
  14. package/dist/{getNetworkProviderFromNetworkId-DPFHY3b8.cjs.map → getNetworkProviderFromNetworkId-BVP0ghId.cjs.map} +1 -1
  15. package/dist/{getNetworkProviderFromNetworkId-YcalZlDG.native.esm.js → getNetworkProviderFromNetworkId-Bh4_-rhf.native.esm.js} +3 -261
  16. package/dist/getNetworkProviderFromNetworkId-Bh4_-rhf.native.esm.js.map +1 -0
  17. package/dist/{getNetworkProviderFromNetworkId-DTNPpR5H.esm.js → getNetworkProviderFromNetworkId-OfuaqHXU.esm.js} +6 -6
  18. package/dist/getNetworkProviderFromNetworkId-OfuaqHXU.esm.js.map +1 -0
  19. package/dist/{getSignedSessionId-BjhgfsJD.native.esm.js → getSignedSessionId-2jmv21__.native.esm.js} +3 -3
  20. package/dist/{getSignedSessionId-BjhgfsJD.native.esm.js.map → getSignedSessionId-2jmv21__.native.esm.js.map} +1 -1
  21. package/dist/{getSignedSessionId-Btl5p_7b.esm.js → getSignedSessionId-CDEQ6TMC.esm.js} +2 -2
  22. package/dist/{getSignedSessionId-Btl5p_7b.esm.js.map → getSignedSessionId-CDEQ6TMC.esm.js.map} +1 -1
  23. package/dist/{getSignedSessionId-VX7LkxVJ.cjs → getSignedSessionId-_ZPqzvm5.cjs} +2 -2
  24. package/dist/{getSignedSessionId-VX7LkxVJ.cjs.map → getSignedSessionId-_ZPqzvm5.cjs.map} +1 -1
  25. package/dist/getWalletProviderByKey-0VBVdu30.native.esm.js +279 -0
  26. package/dist/getWalletProviderByKey-0VBVdu30.native.esm.js.map +1 -0
  27. package/dist/{getWalletProviderByKey-5sZK6kAJ.esm.js → getWalletProviderByKey-BIHCI8S6.esm.js} +2 -2
  28. package/dist/{getWalletProviderByKey-5sZK6kAJ.esm.js.map → getWalletProviderByKey-BIHCI8S6.esm.js.map} +1 -1
  29. package/dist/{getWalletProviderByKey--K4N2u-M.cjs → getWalletProviderByKey-F5wxlC_k.cjs} +2 -2
  30. package/dist/{getWalletProviderByKey--K4N2u-M.cjs.map → getWalletProviderByKey-F5wxlC_k.cjs.map} +1 -1
  31. package/dist/index.cjs +14 -8
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.esm.js +17 -11
  34. package/dist/index.esm.js.map +1 -1
  35. package/dist/index.native.esm.js +14 -8
  36. package/dist/index.native.esm.js.map +1 -1
  37. package/dist/{isDynamicWaasEnabled-sI3vpWvA.esm.js → isDynamicWaasEnabled-OlDJAGIi.esm.js} +2 -2
  38. package/dist/{isDynamicWaasEnabled-sI3vpWvA.esm.js.map → isDynamicWaasEnabled-OlDJAGIi.esm.js.map} +1 -1
  39. package/dist/{isDynamicWaasEnabled-MtEVK3ov.cjs → isDynamicWaasEnabled-YigU-EAT.cjs} +2 -2
  40. package/dist/{isDynamicWaasEnabled-MtEVK3ov.cjs.map → isDynamicWaasEnabled-YigU-EAT.cjs.map} +1 -1
  41. package/dist/{isDynamicWaasEnabled-BR_pG4jM.native.esm.js → isDynamicWaasEnabled-cVxCp5BV.native.esm.js} +2 -2
  42. package/dist/{isDynamicWaasEnabled-BR_pG4jM.native.esm.js.map → isDynamicWaasEnabled-cVxCp5BV.native.esm.js.map} +1 -1
  43. package/dist/{isMfaRequiredForAction-DJ2UX11y.esm.js → isMfaRequiredForAction-Bn2HCYvZ.esm.js} +2 -2
  44. package/dist/{isMfaRequiredForAction-DJ2UX11y.esm.js.map → isMfaRequiredForAction-Bn2HCYvZ.esm.js.map} +1 -1
  45. package/dist/{isMfaRequiredForAction-BiPVqg49.cjs → isMfaRequiredForAction-BtPXuiSY.cjs} +2 -2
  46. package/dist/{isMfaRequiredForAction-BiPVqg49.cjs.map → isMfaRequiredForAction-BtPXuiSY.cjs.map} +1 -1
  47. package/dist/{isMfaRequiredForAction-GWZny7T2.native.esm.js → isMfaRequiredForAction-DjC0wQJ4.native.esm.js} +2 -2
  48. package/dist/{isMfaRequiredForAction-GWZny7T2.native.esm.js.map → isMfaRequiredForAction-DjC0wQJ4.native.esm.js.map} +1 -1
  49. package/dist/{isUserOnboardingComplete-Hzz6fwTk.native.esm.js → isUserOnboardingComplete-BCZpska8.native.esm.js} +3 -3
  50. package/dist/{isUserOnboardingComplete-Hzz6fwTk.native.esm.js.map → isUserOnboardingComplete-BCZpska8.native.esm.js.map} +1 -1
  51. package/dist/{isUserOnboardingComplete-D1hw1c5_.cjs → isUserOnboardingComplete-Bi7tw1lk.cjs} +3 -3
  52. package/dist/{isUserOnboardingComplete-D1hw1c5_.cjs.map → isUserOnboardingComplete-Bi7tw1lk.cjs.map} +1 -1
  53. package/dist/{isUserOnboardingComplete-OvzVH1rg.esm.js → isUserOnboardingComplete-DScTOOg_.esm.js} +3 -3
  54. package/dist/{isUserOnboardingComplete-OvzVH1rg.esm.js.map → isUserOnboardingComplete-DScTOOg_.esm.js.map} +1 -1
  55. package/dist/{migrateFromFireblocks-BiLoNIkA.native.esm.js → migrateFromFireblocks-7aKNa_3P.native.esm.js} +3 -3
  56. package/dist/{migrateFromFireblocks-BiLoNIkA.native.esm.js.map → migrateFromFireblocks-7aKNa_3P.native.esm.js.map} +1 -1
  57. package/dist/{migrateFromFireblocks-NRfLh1JL.cjs → migrateFromFireblocks-BnHU2AZJ.cjs} +4 -4
  58. package/dist/{migrateFromFireblocks-NRfLh1JL.cjs.map → migrateFromFireblocks-BnHU2AZJ.cjs.map} +1 -1
  59. package/dist/{migrateFromFireblocks-Y5pPtmew.esm.js → migrateFromFireblocks-DkQj3aYU.esm.js} +4 -4
  60. package/dist/{migrateFromFireblocks-Y5pPtmew.esm.js.map → migrateFromFireblocks-DkQj3aYU.esm.js.map} +1 -1
  61. package/dist/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.d.ts +29 -0
  62. package/dist/modules/auth/getActionAuthorizationTokens/getActionAuthorizationTokens.d.ts.map +1 -0
  63. package/dist/modules/auth/getActionAuthorizationTokens/index.d.ts +2 -0
  64. package/dist/modules/auth/getActionAuthorizationTokens/index.d.ts.map +1 -0
  65. package/dist/modules/auth/logoutReason.d.ts +1 -1
  66. package/dist/modules/auth/logoutReason.d.ts.map +1 -1
  67. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts +7 -2
  68. package/dist/modules/waas/businessAccounts/addBusinessAccountMember/addBusinessAccountMember.d.ts.map +1 -1
  69. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts +6 -1
  70. package/dist/modules/waas/businessAccounts/addWalletToBusinessAccount/addWalletToBusinessAccount.d.ts.map +1 -1
  71. package/dist/modules/waas/businessAccounts/businessAccounts.constants.d.ts +5 -0
  72. package/dist/modules/waas/businessAccounts/businessAccounts.constants.d.ts.map +1 -0
  73. package/dist/modules/waas/businessAccounts/transferBusinessAccountOwnership/transferBusinessAccountOwnership.d.ts.map +1 -1
  74. package/dist/modules/waas/businessAccounts/updateBusinessAccount/index.d.ts +2 -0
  75. package/dist/modules/waas/businessAccounts/updateBusinessAccount/index.d.ts.map +1 -0
  76. package/dist/modules/waas/businessAccounts/updateBusinessAccount/updateBusinessAccount.d.ts +26 -0
  77. package/dist/modules/waas/businessAccounts/updateBusinessAccount/updateBusinessAccount.d.ts.map +1 -0
  78. package/dist/modules/waas/createWaasProvider/createWaasProvider.d.ts.map +1 -1
  79. package/dist/modules/wallets/verifyWalletAccount/verifyWalletAccount.d.ts +1 -1
  80. package/dist/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.d.ts.map +1 -1
  81. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  82. package/dist/{updateAuthFromVerifyResponse-ChnvPY0m.cjs → updateAuthFromVerifyResponse-B2QePeNz.cjs} +3 -3
  83. package/dist/{updateAuthFromVerifyResponse-ChnvPY0m.cjs.map → updateAuthFromVerifyResponse-B2QePeNz.cjs.map} +1 -1
  84. package/dist/{updateAuthFromVerifyResponse-Ct1Y6O_T.esm.js → updateAuthFromVerifyResponse-wHGRunTk.esm.js} +3 -3
  85. package/dist/{updateAuthFromVerifyResponse-Ct1Y6O_T.esm.js.map → updateAuthFromVerifyResponse-wHGRunTk.esm.js.map} +1 -1
  86. package/dist/waas.cjs +87 -30
  87. package/dist/waas.cjs.map +1 -1
  88. package/dist/waas.esm.js +88 -32
  89. package/dist/waas.esm.js.map +1 -1
  90. package/dist/waas.native.esm.js +87 -31
  91. package/dist/waas.native.esm.js.map +1 -1
  92. package/dist/waasCore.cjs +53 -15
  93. package/dist/waasCore.cjs.map +1 -1
  94. package/dist/waasCore.esm.js +53 -15
  95. package/dist/waasCore.esm.js.map +1 -1
  96. package/dist/waasCore.native.esm.js +52 -14
  97. package/dist/waasCore.native.esm.js.map +1 -1
  98. package/package.json +3 -3
  99. package/dist/getNetworkProviderFromNetworkId-DTNPpR5H.esm.js.map +0 -1
  100. package/dist/getNetworkProviderFromNetworkId-YcalZlDG.native.esm.js.map +0 -1
  101. package/dist/getWalletProviderByKey-BhcBoGMW.native.esm.js +0 -20
  102. package/dist/getWalletProviderByKey-BhcBoGMW.native.esm.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { $ as UnauthorizedError, B as onEvent, Ct as name, E as getWalletProviderRegistry, F as normalizeAddress, H as createApiClient, I as splitWalletProviderKey, K as getNonce, M as getChainFromVerifiedCredentialChain, N as CHAINS_INFO_MAP, O as NoWalletProviderFoundError, P as formatWalletAccountId, Q as createLocalStorageAdapter, R as emitEvent, S as extractSessionId, St as getCore, T as WalletProviderPriority, V as onceEvent, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _ as instrumentFunction, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as APIError, b as getUserAgent, ct as DYNAMIC_ICONIC_SPRITE_URL, dt as isCookieEnabled, et as SandboxMaximumThresholdReachedError, ft as assertDefined, gt as getPlatform, h as checkAndRaiseWalletAccountsChangedEvent, ht as randomString, i as parseElevatedAccessToken, it as InvalidExternalAuthError, k as getWalletAccounts, lt as SDK_API_CORE_VERSION, m as isUserMissingMfaAuth, mt as getElevatedAccessToken, n as updateAuthFromVerifyResponse, nt as MfaInvalidOtpError, o as initializeWaasClientsForEagerRecovery, p as getWalletProviders, pt as ValueMustBeDefinedError, r as upsertElevatedAccessToken, rt as LinkCredentialError, tt as MfaRateLimitedError, v as scrubParameters, vt as getDefaultClient, w as getWalletProviderFromWalletAccount, wt as version, x as getOperatingSystem, xt as BaseError, y as DEFAULT_PII_FIELDS, yt as setDefaultClient, z as offEvent } from "./NativeModuleNotLinkedError-DIpQjh_K.native.esm.js";
2
- import { B as __logoutWithReason_wrapped, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, G as subscribeWithSelector, H as fetchProjectSettings, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, K as isEqualShallow, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as isServerSideRendering, S as MergeAccountsConfirmationError, T as createKeychainService, U as isSignedIn, V as generateSessionKeys, W as retryOnFail, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, l as reconcileWalletAccountsAgainstClient, m as __setCaptchaToken_wrapped, o as removeUnverifiedWalletAccount, p as hasExtension, q as createStorage, s as createSignInMessageStatement, t as getNetworkProviderFromNetworkId, u as updateWalletProviderKeysForVerifiedCredentials, v as MethodNotImplementedError, w as createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-YcalZlDG.native.esm.js";
3
- import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-BR_pG4jM.native.esm.js";
4
- import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-Hzz6fwTk.native.esm.js";
5
- import { n as getVerifiedCredentialForWalletAccount, t as getWalletProviderByKey } from "./getWalletProviderByKey-BhcBoGMW.native.esm.js";
6
- import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-GWZny7T2.native.esm.js";
1
+ import { $ as UnauthorizedError, B as onEvent, Ct as name, E as getWalletProviderRegistry, F as normalizeAddress, H as createApiClient, I as splitWalletProviderKey, K as getNonce, M as getChainFromVerifiedCredentialChain, N as CHAINS_INFO_MAP, O as NoWalletProviderFoundError, P as formatWalletAccountId, Q as createLocalStorageAdapter, R as emitEvent, S as extractSessionId, St as getCore, T as WalletProviderPriority, V as onceEvent, X as updateNoncePoolStorage, Y as fetchAndStoreNonces, Z as createStorageKeySchema, _ as instrumentFunction, _t as NONCE_POOL_SIZE, a as InvalidParamError, at as APIError, b as getUserAgent, ct as DYNAMIC_ICONIC_SPRITE_URL, dt as isCookieEnabled, et as SandboxMaximumThresholdReachedError, ft as assertDefined, gt as getPlatform, h as checkAndRaiseWalletAccountsChangedEvent, ht as randomString, i as parseElevatedAccessToken, it as InvalidExternalAuthError, k as getWalletAccounts, lt as SDK_API_CORE_VERSION, m as isUserMissingMfaAuth, mt as getElevatedAccessToken, n as updateAuthFromVerifyResponse, nt as MfaInvalidOtpError, o as initializeWaasClientsForEagerRecovery, p as getWalletProviders, pt as ValueMustBeDefinedError, r as upsertElevatedAccessToken, rt as LinkCredentialError, tt as MfaRateLimitedError, v as scrubParameters, vt as getDefaultClient, w as getWalletProviderFromWalletAccount, wt as version, x as getOperatingSystem, xt as BaseError, y as DEFAULT_PII_FIELDS, yt as setDefaultClient, z as offEvent } from "./NativeModuleNotLinkedError-DLP1hpcM.native.esm.js";
2
+ import { B as subscribeWithSelector, C as getKeychainIndexedDBName, E as assertSafeNavigationUrl, F as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, H as createStorage, I as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, L as REFRESH_USER_STATE_FROM_VALID_TOKEN_TRACKER_KEY, M as createDeferredPromise, N as FETCH_PROJECT_SETTINGS_TRACKER_KEY, O as createLogger, P as GENERATE_SESSION_KEYS_TRACKER_KEY, R as isServerSideRendering, S as MergeAccountsConfirmationError, T as createKeychainService, V as isEqualShallow, _ as getAppMetadata, a as verifyMessageSignatureOwnership, b as WalletAlreadyLinkedToAnotherUserError, c as formatSignInMessage, d as setUnverifiedWalletAccounts, f as createVisit, g as isCaptchaRequired, h as consumeCaptchaToken, i as getNetworksData, j as CannotTrackError, k as createCrossTabBroadcast, 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 createRealtimeService, x as NoNetworkProvidersError, y as WalletScreeningBlockedError, z as getBuffer } from "./getNetworkProviderFromNetworkId-Bh4_-rhf.native.esm.js";
3
+ import { a as fetchProjectSettings, i as generateSessionKeys, n as getVerifiedCredentialForWalletAccount, o as isSignedIn, r as __logoutWithReason_wrapped, s as retryOnFail, t as getWalletProviderByKey } from "./getWalletProviderByKey-0VBVdu30.native.esm.js";
4
+ import { n as NotWaasWalletAccountError, r as __refreshAuth_wrapped } from "./isDynamicWaasEnabled-cVxCp5BV.native.esm.js";
5
+ import { a as WaasOnboardingIncompleteError, i as preconnectWaasIframe, n as isPendingRecoveryCodesAcknowledgment, o as WaasLoadFailedError, r as isDeviceRegistrationRequired, t as isUserOnboardingComplete } from "./isUserOnboardingComplete-BCZpska8.native.esm.js";
6
+ import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DjC0wQJ4.native.esm.js";
7
7
  import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
8
8
  import { AuthModeEnum, CaptchaProviderEnum as CaptchaProviderEnum$1, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, JwtVerifiedCredentialFormatEnum as JwtVerifiedCredentialFormatEnum$1, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, ProviderEnum as ProviderEnum$1, TokenScope, TokenScope as TokenScope$1, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
9
9
  import * as z from "zod/mini";
@@ -8191,7 +8191,13 @@ const isSameAddress = ({ chain, left, right }) => normalizeAddress({
8191
8191
  //#region src/modules/wallets/verifyWalletAccountForSignInOrTransfer/verifyWalletAccountForSignInOrTransfer.ts
8192
8192
  /** @notInstrumented */
8193
8193
  const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfer, requestedScopes }, client) => {
8194
- if (walletAccount.verifiedCredentialId) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
8194
+ /**
8195
+ * A wallet that is already verified can still be used for step-up
8196
+ * authentication: the user proves ownership again to mint an elevated
8197
+ * access token for the requested scope. Skip the already-verified guard
8198
+ * when scopes are provided so the call reaches walletsVerify.
8199
+ */
8200
+ if (walletAccount.verifiedCredentialId && !requestedScopes) throw new WalletAccountAlreadyVerifiedError(walletAccount.address);
8195
8201
  const walletProvider = getWalletProviderFromWalletAccount({ walletAccount }, client);
8196
8202
  const { messageToSign, signature } = await __proveWalletAccountOwnership_wrapped({ walletAccount }, client);
8197
8203
  const formattedSignature = walletAccount.hardwareWalletVendor ? formatSignatureForHardwareWallet({
@@ -8260,7 +8266,7 @@ const verifyWalletAccountForSignInOrTransfer = async ({ walletAccount, isTransfe
8260
8266
  * @param [params.requestedScopes] - Optional token scopes to request during verification.
8261
8267
  * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
8262
8268
  * @returns A promise that resolves to the verified wallet account.
8263
- * @throws WalletAccountAlreadyVerifiedError If the wallet is already verified.
8269
+ * @throws WalletAccountAlreadyVerifiedError If the wallet is already verified and no requestedScopes are provided.
8264
8270
  * @throws WalletAlreadyLinkedToAnotherUserError If the wallet is linked to another user.
8265
8271
  * @see connectWithWalletProvider
8266
8272
  * @see connectAndVerifyWithWalletProvider