@dynamic-labs-sdk/client 1.11.0 → 1.12.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.
- package/dist/{InvalidParamError-BUpLSb5x.native.esm.js → InvalidParamError-CKUis748.native.esm.js} +3 -3
- package/dist/{InvalidParamError-BUpLSb5x.native.esm.js.map → InvalidParamError-CKUis748.native.esm.js.map} +1 -1
- package/dist/{InvalidParamError-BazEwozw.esm.js → InvalidParamError-I6NfUdQL.esm.js} +3 -3
- package/dist/{InvalidParamError-BazEwozw.esm.js.map → InvalidParamError-I6NfUdQL.esm.js.map} +1 -1
- package/dist/{InvalidParamError-CMesesy6.cjs → InvalidParamError-d0WFn5Ai.cjs} +4 -4
- package/dist/{InvalidParamError-CMesesy6.cjs.map → InvalidParamError-d0WFn5Ai.cjs.map} +1 -1
- package/dist/core.cjs +5 -5
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +7 -7
- package/dist/core.native.esm.js.map +1 -1
- package/dist/exports/index.d.ts +1 -1
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waasCore.d.ts +1 -0
- package/dist/exports/waasCore.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-D4xzWb7w.cjs → getNetworkProviderFromNetworkId-CfW0tOnr.cjs} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-D4xzWb7w.cjs.map → getNetworkProviderFromNetworkId-CfW0tOnr.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BfBE-dei.esm.js → getNetworkProviderFromNetworkId-D6ABmeNQ.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId-BfBE-dei.esm.js.map → getNetworkProviderFromNetworkId-D6ABmeNQ.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-C-1rPWZm.native.esm.js → getNetworkProviderFromNetworkId-DpiVLfs_.native.esm.js} +8 -8
- package/dist/getNetworkProviderFromNetworkId-DpiVLfs_.native.esm.js.map +1 -0
- package/dist/{getSignedSessionId-BimmHQvA.cjs → getSignedSessionId-Bc-sYE2A.cjs} +3 -3
- package/dist/{getSignedSessionId-BimmHQvA.cjs.map → getSignedSessionId-Bc-sYE2A.cjs.map} +1 -1
- package/dist/{getSignedSessionId-fwHlhBvt.native.esm.js → getSignedSessionId-C6LJdiSK.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-fwHlhBvt.native.esm.js.map → getSignedSessionId-C6LJdiSK.native.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-BWxWFaJW.esm.js → getSignedSessionId-IEoo2Kv9.esm.js} +3 -3
- package/dist/{getSignedSessionId-BWxWFaJW.esm.js.map → getSignedSessionId-IEoo2Kv9.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-sEzYqoCf.cjs → getWaasWalletProviderFromWalletAccount-CSmVAhr2.cjs} +4 -4
- package/dist/{getWaasWalletProviderFromWalletAccount-sEzYqoCf.cjs.map → getWaasWalletProviderFromWalletAccount-CSmVAhr2.cjs.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-CJdnAlDf.native.esm.js → getWaasWalletProviderFromWalletAccount-D1wxsNEI.native.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-CJdnAlDf.native.esm.js.map → getWaasWalletProviderFromWalletAccount-D1wxsNEI.native.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-OM-BlEFR.esm.js → getWaasWalletProviderFromWalletAccount-DojjjSIP.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-OM-BlEFR.esm.js.map → getWaasWalletProviderFromWalletAccount-DojjjSIP.esm.js.map} +1 -1
- package/dist/{getWalletProviderByKey-1zHjzqbz.cjs → getWalletProviderByKey-B821GpaI.cjs} +32 -21
- package/dist/getWalletProviderByKey-B821GpaI.cjs.map +1 -0
- package/dist/{getWalletProviderByKey-BXGcVzkf.esm.js → getWalletProviderByKey-DsTEubkT.esm.js} +26 -15
- package/dist/getWalletProviderByKey-DsTEubkT.esm.js.map +1 -0
- package/dist/{getWalletProviderByKey-CAQkYCGi.native.esm.js → getWalletProviderByKey-RTW-S68o.native.esm.js} +26 -15
- package/dist/{getWalletProviderByKey-CAQkYCGi.native.esm.js.map → getWalletProviderByKey-RTW-S68o.native.esm.js.map} +1 -1
- package/dist/index.cjs +48 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +47 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +49 -11
- package/dist/index.native.esm.js.map +1 -1
- package/dist/isDynamicWaasEnabled-CBLpFRnd.native.esm.js +37 -0
- package/dist/isDynamicWaasEnabled-CBLpFRnd.native.esm.js.map +1 -0
- package/dist/isDynamicWaasEnabled-CBOG0ITH.cjs +49 -0
- package/dist/isDynamicWaasEnabled-CBOG0ITH.cjs.map +1 -0
- package/dist/isDynamicWaasEnabled-vRyWP-1l.esm.js +37 -0
- package/dist/isDynamicWaasEnabled-vRyWP-1l.esm.js.map +1 -0
- package/dist/{isMfaRequiredForAction-DZVNUtPY.esm.js → isMfaRequiredForAction-C1-1spV9.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-DZVNUtPY.esm.js.map → isMfaRequiredForAction-C1-1spV9.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CPadAr7k.native.esm.js → isMfaRequiredForAction-D1AYL99a.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CPadAr7k.native.esm.js.map → isMfaRequiredForAction-D1AYL99a.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CxWuGsmB.cjs → isMfaRequiredForAction-DL013-fR.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-CxWuGsmB.cjs.map → isMfaRequiredForAction-DL013-fR.cjs.map} +1 -1
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts +1 -0
- package/dist/modules/auth/social/oauth/authenticateWithSocial/authenticateWithSocial.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts +1 -0
- package/dist/modules/auth/social/oauth/detectSocialRedirectUrl/detectSocialRedirectUrl.d.ts.map +1 -1
- package/dist/modules/auth/social/oauth/processSocialCallback/processSocialCallback.d.ts.map +1 -1
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts +3 -0
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts +4 -1
- package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +3 -0
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +3 -0
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +3 -0
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts.map +1 -1
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts +2 -2
- package/dist/modules/otp/sendEmailOTP/sendEmailOTP.d.ts.map +1 -1
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts +2 -2
- package/dist/modules/otp/sendSmsOTP/sendSmsOTP.d.ts.map +1 -1
- package/dist/modules/otp/verifyOTP/verifyOTP.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/initializeWaasClientsForEagerRecovery/index.d.ts +2 -0
- package/dist/modules/waas/{restoreUserSharesForAllWalletAccounts → initializeWaasClientsForEagerRecovery}/index.d.ts.map +1 -1
- package/dist/modules/waas/initializeWaasClientsForEagerRecovery/initializeWaasClientsForEagerRecovery.d.ts +11 -0
- package/dist/modules/waas/initializeWaasClientsForEagerRecovery/initializeWaasClientsForEagerRecovery.d.ts.map +1 -0
- package/dist/modules/waas/preconnectWaasIframe/index.d.ts +2 -0
- package/dist/modules/waas/preconnectWaasIframe/index.d.ts.map +1 -0
- package/dist/modules/waas/preconnectWaasIframe/preconnectWaasIframe.d.ts +13 -0
- package/dist/modules/waas/preconnectWaasIframe/preconnectWaasIframe.d.ts.map +1 -0
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts +1 -0
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts.map +1 -1
- package/dist/preconnectWaasIframe-BnyTG4Wy.native.esm.js +31 -0
- package/dist/preconnectWaasIframe-BnyTG4Wy.native.esm.js.map +1 -0
- package/dist/preconnectWaasIframe-DWYWeLor.cjs +37 -0
- package/dist/preconnectWaasIframe-DWYWeLor.cjs.map +1 -0
- package/dist/preconnectWaasIframe-Dn3RrrHd.esm.js +31 -0
- package/dist/preconnectWaasIframe-Dn3RrrHd.esm.js.map +1 -0
- package/dist/{refreshAuth-DlQw3Dky.esm.js → refreshAuth-BWQWl4uA.esm.js} +3 -3
- package/dist/{refreshAuth-DlQw3Dky.esm.js.map → refreshAuth-BWQWl4uA.esm.js.map} +1 -1
- package/dist/{refreshAuth-Cl3adySI.native.esm.js → refreshAuth-D8UjWFLB.native.esm.js} +3 -3
- package/dist/{refreshAuth-Cl3adySI.native.esm.js.map → refreshAuth-D8UjWFLB.native.esm.js.map} +1 -1
- package/dist/{refreshAuth-CKcNynMk.cjs → refreshAuth-tjEnkc58.cjs} +3 -3
- package/dist/{refreshAuth-CKcNynMk.cjs.map → refreshAuth-tjEnkc58.cjs.map} +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs +8 -25
- package/dist/waas.cjs.map +1 -1
- package/dist/waas.esm.js +6 -23
- package/dist/waas.esm.js.map +1 -1
- package/dist/waas.native.esm.js +6 -23
- package/dist/waas.native.esm.js.map +1 -1
- package/dist/waasCore.cjs +16 -9
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +16 -10
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +7 -5
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/NotWaasWalletAccountError-CIjFmQ_l.esm.js +0 -18
- package/dist/NotWaasWalletAccountError-CIjFmQ_l.esm.js.map +0 -1
- package/dist/NotWaasWalletAccountError-D-yqOoH6.cjs +0 -23
- package/dist/NotWaasWalletAccountError-D-yqOoH6.cjs.map +0 -1
- package/dist/NotWaasWalletAccountError-DWXGDcpr.native.esm.js +0 -18
- package/dist/NotWaasWalletAccountError-DWXGDcpr.native.esm.js.map +0 -1
- package/dist/getNetworkProviderFromNetworkId-C-1rPWZm.native.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-1zHjzqbz.cjs.map +0 -1
- package/dist/getWalletProviderByKey-BXGcVzkf.esm.js.map +0 -1
- package/dist/modules/waas/restoreUserSharesForAllWalletAccounts/index.d.ts +0 -2
- package/dist/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.d.ts +0 -4
- package/dist/modules/waas/restoreUserSharesForAllWalletAccounts/restoreUserSharesForAllWalletAccounts.d.ts.map +0 -1
package/dist/index.native.esm.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { $ as name, A as InvalidExternalAuthError, B as getUserAgent, D as MfaRateLimitedError, E as SandboxMaximumThresholdReachedError, F as ValueMustBeDefinedError, H as getOperatingSystem, I as __getElevatedAccessToken_wrapped, J as getDefaultClient, L as instrumentFunction, N as isCookieEnabled, O as MfaInvalidOtpError, P as assertDefined, Q as getCore, R as scrubParameters, T as getNonce, U as extractSessionId, V as getPlatform, W as randomString, Y as setDefaultClient, Z as BaseError, _ as onEvent, b as createApiClient, c as getWalletProviderFromWalletAccount, et as version, f as NoWalletProviderFoundError, g as offEvent, h as emitEvent, j as APIError, k as LinkCredentialError, l as WalletProviderPriority, m as CHAINS_INFO_MAP, o as DYNAMIC_ICONIC_SPRITE_URL, p as getChainFromVerifiedCredentialChain, q as NONCE_POOL_SIZE, s as SDK_API_CORE_VERSION, t as InvalidParamError, u as getWalletProviderRegistry, v as onceEvent, x as UnauthorizedError, y as fetchAndStoreNonces, z as DEFAULT_PII_FIELDS } from "./InvalidParamError-
|
|
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-
|
|
3
|
-
import { _ as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, i as upsertElevatedAccessToken, l as getWalletProviders, m as getWalletAccounts, n as getVerifiedCredentialForWalletAccount, o as
|
|
4
|
-
import { t as __refreshAuth_wrapped } from "./refreshAuth-
|
|
5
|
-
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-
|
|
6
|
-
import {
|
|
1
|
+
import { $ as name, A as InvalidExternalAuthError, B as getUserAgent, D as MfaRateLimitedError, E as SandboxMaximumThresholdReachedError, F as ValueMustBeDefinedError, H as getOperatingSystem, I as __getElevatedAccessToken_wrapped, J as getDefaultClient, L as instrumentFunction, N as isCookieEnabled, O as MfaInvalidOtpError, P as assertDefined, Q as getCore, R as scrubParameters, T as getNonce, U as extractSessionId, V as getPlatform, W as randomString, Y as setDefaultClient, Z as BaseError, _ as onEvent, b as createApiClient, c as getWalletProviderFromWalletAccount, et as version, f as NoWalletProviderFoundError, g as offEvent, h as emitEvent, j as APIError, k as LinkCredentialError, l as WalletProviderPriority, m as CHAINS_INFO_MAP, o as DYNAMIC_ICONIC_SPRITE_URL, p as getChainFromVerifiedCredentialChain, q as NONCE_POOL_SIZE, s as SDK_API_CORE_VERSION, t as InvalidParamError, u as getWalletProviderRegistry, v as onceEvent, x as UnauthorizedError, y as fetchAndStoreNonces, z as DEFAULT_PII_FIELDS } from "./InvalidParamError-CKUis748.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-DpiVLfs_.native.esm.js";
|
|
3
|
+
import { _ as formatWalletAccountId, a as parseElevatedAccessToken, d as checkAndRaiseWalletAccountsChangedEvent, i as upsertElevatedAccessToken, l as getWalletProviders, m as getWalletAccounts, n as getVerifiedCredentialForWalletAccount, o as initializeWaasClientsForEagerRecovery, r as updateAuthFromVerifyResponse, t as getWalletProviderByKey, u as isUserMissingMfaAuth, v as normalizeAddress, y as splitWalletProviderKey } from "./getWalletProviderByKey-RTW-S68o.native.esm.js";
|
|
4
|
+
import { t as __refreshAuth_wrapped } from "./refreshAuth-D8UjWFLB.native.esm.js";
|
|
5
|
+
import { n as getMfaMethods, r as __consumeMfaToken_wrapped, t as isMfaRequiredForAction } from "./isMfaRequiredForAction-D1AYL99a.native.esm.js";
|
|
6
|
+
import { n as NotWaasWalletAccountError } from "./isDynamicWaasEnabled-CBLpFRnd.native.esm.js";
|
|
7
|
+
import { t as preconnectWaasIframe } from "./preconnectWaasIframe-BnyTG4Wy.native.esm.js";
|
|
7
8
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
8
9
|
import { AuthModeEnum, ExchangeKeyEnum, JwtVerifiedCredentialFormatEnum, MFAAction, MfaBackupCodeAcknowledgement, ProviderEnum, TokenScope, WaasBackupOptionsEnum, WalletProviderEnum } from "@dynamic-labs/sdk-api-core";
|
|
9
10
|
import * as z from "zod/mini";
|
|
10
|
-
import EventEmitter, { EventEmitter
|
|
11
|
+
import EventEmitter$1, { EventEmitter } from "eventemitter3";
|
|
11
12
|
import { Passkey } from "react-native-passkey";
|
|
12
13
|
|
|
13
14
|
//#region src/modules/state/raiseStateEvents/events.ts
|
|
@@ -516,7 +517,7 @@ const initializeClient = async (client = getDefaultClient()) => {
|
|
|
516
517
|
});
|
|
517
518
|
throw error;
|
|
518
519
|
}
|
|
519
|
-
if (client.user)
|
|
520
|
+
if (client.user) initializeWaasClientsForEagerRecovery(client);
|
|
520
521
|
};
|
|
521
522
|
const __initializeClient_impl = initializeClient;
|
|
522
523
|
const __initializeClient_wrapped = instrumentFunction({
|
|
@@ -545,7 +546,7 @@ const createAsyncTrack = () => {
|
|
|
545
546
|
* This ensures no process is missed (as it would throw when tracked on a different node tick).
|
|
546
547
|
*/
|
|
547
548
|
let isTrackEnabled = true;
|
|
548
|
-
const eventEmitter = new EventEmitter
|
|
549
|
+
const eventEmitter = new EventEmitter();
|
|
549
550
|
const allSettledPromise = createDeferredPromise();
|
|
550
551
|
const tracker = /* @__PURE__ */ new Map();
|
|
551
552
|
/**
|
|
@@ -592,7 +593,7 @@ const createAsyncTrack = () => {
|
|
|
592
593
|
//#endregion
|
|
593
594
|
//#region src/services/eventEmitter/createEventEmitter.ts
|
|
594
595
|
/** @not-instrumented */
|
|
595
|
-
const createEventEmitter = () => new EventEmitter();
|
|
596
|
+
const createEventEmitter = () => new EventEmitter$1();
|
|
596
597
|
|
|
597
598
|
//#endregion
|
|
598
599
|
//#region src/errors/UnavailableInServerSideError.ts
|
|
@@ -1981,6 +1982,7 @@ const __signInWithSocialRedirect_wrapped = instrumentFunction({
|
|
|
1981
1982
|
* removed in a future major version.
|
|
1982
1983
|
*
|
|
1983
1984
|
* @instrumented
|
|
1985
|
+
* @noHook Deprecated alias that is not exposed as a React hook.
|
|
1984
1986
|
*/
|
|
1985
1987
|
const authenticateWithSocial = (params, client = getDefaultClient()) => __signInWithSocialRedirect_wrapped(params, client);
|
|
1986
1988
|
const __authenticateWithSocial_impl = authenticateWithSocial;
|
|
@@ -2117,6 +2119,7 @@ const processSocialCallback = async ({ url, requestedScopes }, client) => {
|
|
|
2117
2119
|
if (storedSocialRedirectState.state !== dynamicOauthState) throw new InvalidRedirectStorageStateError();
|
|
2118
2120
|
const { provider, codeVerifier } = storedSocialRedirectState;
|
|
2119
2121
|
await core.storage.removeItem(redirectStateStorageKeySchema);
|
|
2122
|
+
preconnectWaasIframe(client);
|
|
2120
2123
|
let response;
|
|
2121
2124
|
if (client.user) response = await apiClient.oauthVerify({
|
|
2122
2125
|
environmentId: core.environmentId,
|
|
@@ -2591,10 +2594,13 @@ const withCheckoutSessionTokenCleanupOn401 = async ({ call, transactionId }, cli
|
|
|
2591
2594
|
* exchange source record. The response includes `exchangeSource.metadata.url`
|
|
2592
2595
|
* which can be embedded in an iframe for the user to complete payment.
|
|
2593
2596
|
*
|
|
2597
|
+
* @deprecated Use {@link attachFlowSource} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2598
|
+
*
|
|
2594
2599
|
* @param params AttachCheckoutTransactionSourceParams - The source details to attach.
|
|
2595
2600
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2596
2601
|
* @returns The updated checkout transaction (with exchangeSource if sourceType is 'exchange')
|
|
2597
2602
|
* @instrumented
|
|
2603
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2598
2604
|
*/
|
|
2599
2605
|
const attachCheckoutTransactionSource = async (params, client = getDefaultClient()) => {
|
|
2600
2606
|
const { transactionId, sourceType = "wallet" } = params;
|
|
@@ -2638,10 +2644,13 @@ const __attachCheckoutTransactionSource_wrapped = instrumentFunction({
|
|
|
2638
2644
|
* For exchange sources, `txHash` can be omitted — the user confirms
|
|
2639
2645
|
* they completed the payment and the transaction moves to `broadcasted`.
|
|
2640
2646
|
*
|
|
2647
|
+
* @deprecated Use {@link broadcastFlow} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2648
|
+
*
|
|
2641
2649
|
* @param params BroadcastCheckoutTransactionParams - The transaction ID and optional tx hash.
|
|
2642
2650
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2643
2651
|
* @returns The updated checkout transaction
|
|
2644
2652
|
* @instrumented
|
|
2653
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2645
2654
|
*/
|
|
2646
2655
|
const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client = getDefaultClient()) => {
|
|
2647
2656
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2673,10 +2682,13 @@ const __broadcastCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2673
2682
|
/**
|
|
2674
2683
|
* Cancels a checkout transaction before it has been broadcasted
|
|
2675
2684
|
*
|
|
2685
|
+
* @deprecated Use {@link cancelFlow} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2686
|
+
*
|
|
2676
2687
|
* @param params CancelCheckoutTransactionParams - The transaction to cancel.
|
|
2677
2688
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2678
2689
|
* @returns The cancelled checkout transaction
|
|
2679
2690
|
* @instrumented
|
|
2691
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2680
2692
|
*/
|
|
2681
2693
|
const cancelCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
|
|
2682
2694
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2718,10 +2730,13 @@ const getCheckouts = async (client) => {
|
|
|
2718
2730
|
/**
|
|
2719
2731
|
* Creates a new checkout transaction and stores the session token for subsequent calls
|
|
2720
2732
|
*
|
|
2733
|
+
* @deprecated Use the Flow API instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2734
|
+
*
|
|
2721
2735
|
* @param params CreateCheckoutTransactionParams - The parameters for the checkout transaction.
|
|
2722
2736
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2723
2737
|
* @returns The created transaction with session token
|
|
2724
2738
|
* @instrumented
|
|
2739
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2725
2740
|
*/
|
|
2726
2741
|
const createCheckoutTransaction = async (params, client = getDefaultClient()) => {
|
|
2727
2742
|
const core = getCore(client);
|
|
@@ -2764,10 +2779,13 @@ const __createCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
2764
2779
|
/**
|
|
2765
2780
|
* Fetches the current state of a checkout transaction
|
|
2766
2781
|
*
|
|
2782
|
+
* @deprecated Use {@link getFlow} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2783
|
+
*
|
|
2767
2784
|
* @param params GetCheckoutTransactionParams - The parameters for fetching the transaction.
|
|
2768
2785
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2769
2786
|
* @returns The checkout transaction
|
|
2770
2787
|
* @not-instrumented
|
|
2788
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2771
2789
|
*/
|
|
2772
2790
|
const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClient()) => {
|
|
2773
2791
|
const core = getCore(client);
|
|
@@ -2782,10 +2800,13 @@ const getCheckoutTransaction = async ({ transactionId }, client = getDefaultClie
|
|
|
2782
2800
|
/**
|
|
2783
2801
|
* Fetches a quote for a checkout transaction
|
|
2784
2802
|
*
|
|
2803
|
+
* @deprecated Use {@link getFlowQuote} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2804
|
+
*
|
|
2785
2805
|
* @param params GetCheckoutTransactionQuoteParams - The quote parameters.
|
|
2786
2806
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2787
2807
|
* @returns The updated checkout transaction with quote data
|
|
2788
2808
|
* @not-instrumented
|
|
2809
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2789
2810
|
*/
|
|
2790
2811
|
const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slippage, transactionId }, client = getDefaultClient()) => {
|
|
2791
2812
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2811,10 +2832,13 @@ const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slip
|
|
|
2811
2832
|
* This should be called immediately before triggering the transaction signing.
|
|
2812
2833
|
* It will confirm the quote is still valid, the risk state is cleared, and the transaction is ready to be signed.
|
|
2813
2834
|
*
|
|
2835
|
+
* @deprecated Use {@link prepareFlowSigning} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2836
|
+
*
|
|
2814
2837
|
* @param params PrepareCheckoutTransactionParams - The transaction to prepare.
|
|
2815
2838
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2816
2839
|
* @returns The updated checkout transaction
|
|
2817
2840
|
* @instrumented
|
|
2841
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2818
2842
|
*/
|
|
2819
2843
|
const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalanceForTransferAmount, transactionId }, client = getDefaultClient()) => {
|
|
2820
2844
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2958,10 +2982,13 @@ const __executeSwapTransaction_wrapped = instrumentFunction({
|
|
|
2958
2982
|
* 3. Delegates on-chain signing to the wallet provider's executeSwapTransaction method
|
|
2959
2983
|
* 4. Calls broadcastCheckoutTransaction with the resulting txHash
|
|
2960
2984
|
*
|
|
2985
|
+
* @deprecated Use {@link submitFlowTransaction} instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
2986
|
+
*
|
|
2961
2987
|
* @param params SubmitCheckoutTransactionParams - The transaction ID, wallet account, and optional step callback.
|
|
2962
2988
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2963
2989
|
* @returns The broadcasted checkout transaction
|
|
2964
2990
|
* @instrumented
|
|
2991
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2965
2992
|
*/
|
|
2966
2993
|
const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount, assertBalanceForGasCost, assertBalanceForTransferAmount }, client = getDefaultClient()) => {
|
|
2967
2994
|
const signingPayload = (await __prepareCheckoutTransaction_wrapped({
|
|
@@ -3009,9 +3036,12 @@ const __submitCheckoutTransaction_wrapped = instrumentFunction({
|
|
|
3009
3036
|
* the realtime checkout transaction channel. Will be re-enabled once the
|
|
3010
3037
|
* dashboard-api environment has the Ably wiring in place.
|
|
3011
3038
|
*
|
|
3039
|
+
* @deprecated Use the Flow API instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
3040
|
+
*
|
|
3012
3041
|
* @param params.transactionId - The ID of the checkout transaction to track.
|
|
3013
3042
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3014
3043
|
* @not-instrumented
|
|
3044
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
3015
3045
|
*/
|
|
3016
3046
|
const trackCheckoutTransaction = (_params, client = getDefaultClient()) => {
|
|
3017
3047
|
return Promise.resolve();
|
|
@@ -3028,10 +3058,13 @@ const trackCheckoutTransaction = (_params, client = getDefaultClient()) => {
|
|
|
3028
3058
|
* Returns `false` when the from token already matches a settlement token, so no
|
|
3029
3059
|
* conversion is needed.
|
|
3030
3060
|
*
|
|
3061
|
+
* @deprecated Use the Flow API instead. See https://www.dynamic.xyz/docs/javascript/reference/flow-getting-started
|
|
3062
|
+
*
|
|
3031
3063
|
* @param params - The from token details and the checkout's settlement config.
|
|
3032
3064
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
3033
3065
|
* @returns Whether a token conversion is required
|
|
3034
3066
|
* @not-instrumented
|
|
3067
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
3035
3068
|
*/
|
|
3036
3069
|
const requiresConversion = async ({ transaction }, client = getDefaultClient()) => {
|
|
3037
3070
|
if (!transaction.fromChainId || !transaction.fromChainName || !transaction.fromToken) throw new InvalidParamError("Transaction is missing source information. Make sure that attachCheckoutTransactionSource has been called before calling this function.");
|
|
@@ -4923,7 +4956,9 @@ const __setDefaultMfaDevice_wrapped = instrumentFunction({
|
|
|
4923
4956
|
*/
|
|
4924
4957
|
const sendEmailOTP = async ({ email }, client = getDefaultClient()) => {
|
|
4925
4958
|
const core = getCore(client);
|
|
4926
|
-
const
|
|
4959
|
+
const apiClient = createApiClient({}, client);
|
|
4960
|
+
preconnectWaasIframe(client);
|
|
4961
|
+
const { verificationUUID } = await apiClient.createEmailVerification({
|
|
4927
4962
|
emailVerificationCreateRequest: {
|
|
4928
4963
|
captchaToken: consumeCaptchaToken(client),
|
|
4929
4964
|
email
|
|
@@ -5886,6 +5921,7 @@ const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = getDefaultCl
|
|
|
5886
5921
|
const core = getCore(client);
|
|
5887
5922
|
const apiClient = createApiClient({}, client);
|
|
5888
5923
|
const phoneCountryCode = supportedCountries[isoCountryCode].code;
|
|
5924
|
+
preconnectWaasIframe(client);
|
|
5889
5925
|
const { verificationUUID } = await apiClient.createSmsVerification({
|
|
5890
5926
|
environmentId: core.environmentId,
|
|
5891
5927
|
smsVerificationCreateRequest: {
|
|
@@ -5973,6 +6009,7 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
5973
6009
|
* @redact-params
|
|
5974
6010
|
*/
|
|
5975
6011
|
const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }, client = getDefaultClient()) => {
|
|
6012
|
+
preconnectWaasIframe(client);
|
|
5976
6013
|
let response;
|
|
5977
6014
|
if (client.user) response = await verifyOTPForUserUpdate({
|
|
5978
6015
|
otpVerification,
|
|
@@ -7769,6 +7806,7 @@ const __connectAndVerifyWithWalletProvider_wrapped = instrumentFunction({
|
|
|
7769
7806
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7770
7807
|
* @returns An array of wallet provider data including chain, keys, and metadata.
|
|
7771
7808
|
* @not-instrumented
|
|
7809
|
+
* @hook Exposed as a hook so consumers get the reactive list of available wallet providers, updated when wallet providers change.
|
|
7772
7810
|
*/
|
|
7773
7811
|
const getAvailableWalletProvidersData = (client = getDefaultClient()) => {
|
|
7774
7812
|
return getWalletProviders(client).filter((walletProvider) => hasWalletProviderConnectMethod({ walletProvider })).map((walletProvider) => ({
|