@dynamic-labs-sdk/client 0.23.2 → 0.23.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 (40) hide show
  1. package/dist/{InvalidParamError-CMLuCl4V.esm.js → InvalidParamError-16q5iBqn.esm.js} +3 -3
  2. package/dist/{InvalidParamError-CMLuCl4V.esm.js.map → InvalidParamError-16q5iBqn.esm.js.map} +1 -1
  3. package/dist/{InvalidParamError-B2Zg4cNy.cjs.js → InvalidParamError-AGSIdKWg.cjs.js} +4 -4
  4. package/dist/{InvalidParamError-B2Zg4cNy.cjs.js.map → InvalidParamError-AGSIdKWg.cjs.js.map} +1 -1
  5. package/dist/{NotWaasWalletAccountError-CDTnlyoi.cjs.js → NotWaasWalletAccountError-BF6AAjX2.cjs.js} +3 -3
  6. package/dist/{NotWaasWalletAccountError-CDTnlyoi.cjs.js.map → NotWaasWalletAccountError-BF6AAjX2.cjs.js.map} +1 -1
  7. package/dist/{NotWaasWalletAccountError-Cc-JW6v2.esm.js → NotWaasWalletAccountError-nhXCxVcy.esm.js} +3 -3
  8. package/dist/{NotWaasWalletAccountError-Cc-JW6v2.esm.js.map → NotWaasWalletAccountError-nhXCxVcy.esm.js.map} +1 -1
  9. package/dist/core.cjs.js +5 -5
  10. package/dist/core.esm.js +5 -5
  11. package/dist/{getNetworkProviderFromNetworkId-DZT4uwvK.esm.js → getNetworkProviderFromNetworkId-BcIgAfM0.esm.js} +3 -3
  12. package/dist/{getNetworkProviderFromNetworkId-DZT4uwvK.esm.js.map → getNetworkProviderFromNetworkId-BcIgAfM0.esm.js.map} +1 -1
  13. package/dist/{getNetworkProviderFromNetworkId--laFFnCw.cjs.js → getNetworkProviderFromNetworkId-Its21Jgg.cjs.js} +3 -3
  14. package/dist/{getNetworkProviderFromNetworkId--laFFnCw.cjs.js.map → getNetworkProviderFromNetworkId-Its21Jgg.cjs.js.map} +1 -1
  15. package/dist/{getSignedSessionId-DAiBb3Cs.cjs.js → getSignedSessionId-DzWdq-Af.cjs.js} +3 -3
  16. package/dist/{getSignedSessionId-DAiBb3Cs.cjs.js.map → getSignedSessionId-DzWdq-Af.cjs.js.map} +1 -1
  17. package/dist/{getSignedSessionId-BxIa5aIJ.esm.js → getSignedSessionId-dezYwjyJ.esm.js} +3 -3
  18. package/dist/{getSignedSessionId-BxIa5aIJ.esm.js.map → getSignedSessionId-dezYwjyJ.esm.js.map} +1 -1
  19. package/dist/{getVerifiedCredentialForWalletAccount-ppy36Ru3.esm.js → getVerifiedCredentialForWalletAccount-BSZiw2I7.esm.js} +2 -2
  20. package/dist/{getVerifiedCredentialForWalletAccount-ppy36Ru3.esm.js.map → getVerifiedCredentialForWalletAccount-BSZiw2I7.esm.js.map} +1 -1
  21. package/dist/{getVerifiedCredentialForWalletAccount-CxDYYgVI.cjs.js → getVerifiedCredentialForWalletAccount-CExk0n4h.cjs.js} +3 -3
  22. package/dist/{getVerifiedCredentialForWalletAccount-CxDYYgVI.cjs.js.map → getVerifiedCredentialForWalletAccount-CExk0n4h.cjs.js.map} +1 -1
  23. package/dist/index.cjs.js +16 -8
  24. package/dist/index.cjs.js.map +1 -1
  25. package/dist/index.esm.js +16 -8
  26. package/dist/index.esm.js.map +1 -1
  27. package/dist/{isMfaRequiredForAction-CriARzkK.esm.js → isMfaRequiredForAction-DSjzrlmn.esm.js} +2 -2
  28. package/dist/{isMfaRequiredForAction-CriARzkK.esm.js.map → isMfaRequiredForAction-DSjzrlmn.esm.js.map} +1 -1
  29. package/dist/{isMfaRequiredForAction-x-QgXEWm.cjs.js → isMfaRequiredForAction-Drc_xwpq.cjs.js} +2 -2
  30. package/dist/{isMfaRequiredForAction-x-QgXEWm.cjs.js.map → isMfaRequiredForAction-Drc_xwpq.cjs.js.map} +1 -1
  31. package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts +14 -2
  32. package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
  33. package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts +3 -2
  34. package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts.map +1 -1
  35. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  36. package/dist/waas.cjs.js +4 -4
  37. package/dist/waas.esm.js +3 -3
  38. package/dist/waasCore.cjs.js +4 -4
  39. package/dist/waasCore.esm.js +3 -3
  40. package/package.json +3 -3
package/dist/index.esm.js CHANGED
@@ -1,8 +1,8 @@
1
- import { A as ValueMustBeDefinedError, B as name, D as extractSessionId, E as getUserAgent, F as getDefaultClient, I as setDefaultClient, M as CLIENT_SDK_NAME, O as isCookieEnabled, P as NONCE_POOL_SIZE, R as BaseError, S as __getElevatedAccessToken_wrapped, T as DEFAULT_PII_FIELDS, V as version, _ 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_wrapped, j as randomString, k as assertDefined, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as __getChainFromVerifiedCredentialChain_wrapped, t as InvalidParamError, u as __createApiClient_wrapped, v as MfaInvalidOtpError, w as instrumentFunction, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-CMLuCl4V.esm.js";
2
- import { A as getBuffer, C as CannotTrackError, D as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, E as GENERATE_SESSION_KEYS_TRACKER_KEY, F as __createLocalStorageAdapter_wrapped, I as __subscribeWithSelector_wrapped, L as isEqualShallow, M as __createStorageKeySchema_wrapped, N as __createStorage_wrapped, O as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, T as FETCH_PROJECT_SETTINGS_TRACKER_KEY, _ as NoNetworkProvidersError, a as __updateWalletProviderKeysForVerifiedCredentials_wrapped, b as __createLogger_wrapped, c as __createSignInMessageStatement_wrapped, d as __createVisit_wrapped, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as __getNetworksData_wrapped, j as __generateSessionKeys_wrapped, k as isServerSideRendering, l as formatSignInMessage, m as __consumeCaptchaToken_wrapped, o as __verifyMessageSignatureOwnership_wrapped, p as __setCaptchaToken_wrapped, s as __removeUnverifiedWalletAccount_wrapped, t as __getNetworkProviderFromNetworkId_wrapped, u as __setUnverifiedWalletAccounts_wrapped, v as __createRealtimeService_wrapped, w as __createDeferredPromise_wrapped, x as __createCrossTabBroadcast_wrapped, y as __createIndexedDBKeychainService_wrapped } from "./getNetworkProviderFromNetworkId-DZT4uwvK.esm.js";
3
- import { A as setCookie, C as normalizeAddress, D as __onEvent_wrapped, E as __offEvent_wrapped, O as __onceEvent_wrapped, S as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, f as emitWalletAccountsChangedEvent, i as upsertElevatedAccessToken, k as emitEvent, m as __getWalletProviderFromWalletAccount_wrapped, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as DYNAMIC_AUTH_COOKIE_NAME, r as __updateAuthFromVerifyResponse_wrapped, t as __getVerifiedCredentialForWalletAccount_wrapped, u as __getWalletProviders_wrapped, v as NoWalletProviderFoundError, w as splitWalletProviderKey, y as __getWalletAccounts_wrapped } from "./getVerifiedCredentialForWalletAccount-ppy36Ru3.esm.js";
4
- import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-Cc-JW6v2.esm.js";
5
- import { n as __getMfaMethods_wrapped, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-CriARzkK.esm.js";
1
+ import { A as ValueMustBeDefinedError, B as name, D as extractSessionId, E as getUserAgent, F as getDefaultClient, I as setDefaultClient, M as CLIENT_SDK_NAME, O as isCookieEnabled, P as NONCE_POOL_SIZE, R as BaseError, S as __getElevatedAccessToken_wrapped, T as DEFAULT_PII_FIELDS, V as version, _ 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_wrapped, j as randomString, k as assertDefined, l as fetchAndStoreNonces, o as SDK_API_CORE_VERSION, s as __getChainFromVerifiedCredentialChain_wrapped, t as InvalidParamError, u as __createApiClient_wrapped, v as MfaInvalidOtpError, w as instrumentFunction, x as APIError, y as LinkCredentialError, z as getCore } from "./InvalidParamError-16q5iBqn.esm.js";
2
+ import { A as getBuffer, C as CannotTrackError, D as INITIALIZE_STORAGE_SYNC_TRACKER_KEY, E as GENERATE_SESSION_KEYS_TRACKER_KEY, F as __createLocalStorageAdapter_wrapped, I as __subscribeWithSelector_wrapped, L as isEqualShallow, M as __createStorageKeySchema_wrapped, N as __createStorage_wrapped, O as REFRESH_USER_STATE_FROM_COOKIE_TRACKER_KEY, T as FETCH_PROJECT_SETTINGS_TRACKER_KEY, _ as NoNetworkProvidersError, a as __updateWalletProviderKeysForVerifiedCredentials_wrapped, b as __createLogger_wrapped, c as __createSignInMessageStatement_wrapped, d as __createVisit_wrapped, f as hasExtension, g as WalletAlreadyLinkedToAnotherUserError, h as isCaptchaRequired, i as __getNetworksData_wrapped, j as __generateSessionKeys_wrapped, k as isServerSideRendering, l as formatSignInMessage, m as __consumeCaptchaToken_wrapped, o as __verifyMessageSignatureOwnership_wrapped, p as __setCaptchaToken_wrapped, s as __removeUnverifiedWalletAccount_wrapped, t as __getNetworkProviderFromNetworkId_wrapped, u as __setUnverifiedWalletAccounts_wrapped, v as __createRealtimeService_wrapped, w as __createDeferredPromise_wrapped, x as __createCrossTabBroadcast_wrapped, y as __createIndexedDBKeychainService_wrapped } from "./getNetworkProviderFromNetworkId-BcIgAfM0.esm.js";
3
+ import { A as setCookie, C as normalizeAddress, D as __onEvent_wrapped, E as __offEvent_wrapped, O as __onceEvent_wrapped, S as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, f as emitWalletAccountsChangedEvent, i as upsertElevatedAccessToken, k as emitEvent, m as __getWalletProviderFromWalletAccount_wrapped, n as getWalletProviderByKey, o as restoreUserSharesForAllWalletAccounts, p as DYNAMIC_AUTH_COOKIE_NAME, r as __updateAuthFromVerifyResponse_wrapped, t as __getVerifiedCredentialForWalletAccount_wrapped, u as __getWalletProviders_wrapped, v as NoWalletProviderFoundError, w as splitWalletProviderKey, y as __getWalletAccounts_wrapped } from "./getVerifiedCredentialForWalletAccount-BSZiw2I7.esm.js";
4
+ import { n as __refreshAuth_wrapped, t as NotWaasWalletAccountError } from "./NotWaasWalletAccountError-nhXCxVcy.esm.js";
5
+ import { n as __getMfaMethods_wrapped, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-DSjzrlmn.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";
@@ -2668,10 +2668,14 @@ const __getCheckoutTransactionQuote_wrapped = instrumentFunction({
2668
2668
  * @returns The updated checkout transaction
2669
2669
  * @instrumented
2670
2670
  */
2671
- const prepareCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
2671
+ const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalanceForTransferAmount, transactionId }, client = getDefaultClient()) => {
2672
2672
  const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
2673
2673
  return apiClient.prepareCheckoutTransaction({
2674
2674
  environmentId,
2675
+ prepareSigningRequest: {
2676
+ assertBalanceForGasCost: assertBalanceForGasCost ?? false,
2677
+ assertBalanceForTransferAmount: assertBalanceForTransferAmount ?? false
2678
+ },
2675
2679
  transactionId,
2676
2680
  xDynamicCheckoutSessionToken: sessionToken
2677
2681
  });
@@ -2779,8 +2783,12 @@ const __executeSwapTransaction_wrapped = instrumentFunction({
2779
2783
  * @returns The broadcasted checkout transaction
2780
2784
  * @instrumented
2781
2785
  */
2782
- const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount }, client = getDefaultClient()) => {
2783
- const signingPayload = (await __prepareCheckoutTransaction_wrapped({ transactionId }, client)).quote?.signingPayload;
2786
+ const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount, assertBalanceForGasCost, assertBalanceForTransferAmount }, client = getDefaultClient()) => {
2787
+ const signingPayload = (await __prepareCheckoutTransaction_wrapped({
2788
+ assertBalanceForGasCost,
2789
+ assertBalanceForTransferAmount,
2790
+ transactionId
2791
+ }, client)).quote?.signingPayload;
2784
2792
  assertDefined(signingPayload, "No signing payload returned from prepare — quote may be missing transaction data");
2785
2793
  const { transactionHash } = await __executeSwapTransaction_wrapped({
2786
2794
  onStepChange,