@dynamic-labs-sdk/client 1.12.0 → 1.12.2
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-6N66SLG8.esm.js → InvalidParamError-B0nAZ6Ei.esm.js} +36 -6
- package/dist/InvalidParamError-B0nAZ6Ei.esm.js.map +1 -0
- package/dist/{InvalidParamError-Bgg4SDfm.cjs → InvalidParamError-DDdAeFXE.cjs} +42 -6
- package/dist/InvalidParamError-DDdAeFXE.cjs.map +1 -0
- package/dist/{InvalidParamError-CjC1BFSC.native.esm.js → InvalidParamError-DbUJgYDE.native.esm.js} +22 -4
- package/dist/InvalidParamError-DbUJgYDE.native.esm.js.map +1 -0
- package/dist/core.cjs +5 -5
- package/dist/core.esm.js +5 -5
- package/dist/core.native.esm.js +5 -5
- package/dist/errors/WaasOnboardingIncompleteError.d.ts +18 -0
- package/dist/errors/WaasOnboardingIncompleteError.d.ts.map +1 -0
- package/dist/exports/index.d.ts +1 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/{getNetworkProviderFromNetworkId-Afx6InoJ.cjs → getNetworkProviderFromNetworkId-1j3BPA22.cjs} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-Afx6InoJ.cjs.map → getNetworkProviderFromNetworkId-1j3BPA22.cjs.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId-BXBlKNF9.native.esm.js → getNetworkProviderFromNetworkId-CMBk4NzR.native.esm.js} +4 -4
- package/dist/{getNetworkProviderFromNetworkId-BXBlKNF9.native.esm.js.map → getNetworkProviderFromNetworkId-CMBk4NzR.native.esm.js.map} +1 -1
- package/dist/{getNetworkProviderFromNetworkId--egxmnKm.esm.js → getNetworkProviderFromNetworkId-DaMxnWPo.esm.js} +3 -3
- package/dist/{getNetworkProviderFromNetworkId--egxmnKm.esm.js.map → getNetworkProviderFromNetworkId-DaMxnWPo.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-CsawYVfU.esm.js → getSignedSessionId-BRklPjP0.esm.js} +3 -3
- package/dist/{getSignedSessionId-CsawYVfU.esm.js.map → getSignedSessionId-BRklPjP0.esm.js.map} +1 -1
- package/dist/{getSignedSessionId-Kf9jJ8g0.cjs → getSignedSessionId-BU81jCyQ.cjs} +3 -3
- package/dist/{getSignedSessionId-Kf9jJ8g0.cjs.map → getSignedSessionId-BU81jCyQ.cjs.map} +1 -1
- package/dist/{getSignedSessionId-DWb6By0V.native.esm.js → getSignedSessionId-DPj38qtY.native.esm.js} +3 -3
- package/dist/{getSignedSessionId-DWb6By0V.native.esm.js.map → getSignedSessionId-DPj38qtY.native.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-D1U_Vmr3.esm.js → getWaasWalletProviderFromWalletAccount-BhgXIVZM.native.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-ChxW7xBR.native.esm.js.map → getWaasWalletProviderFromWalletAccount-BhgXIVZM.native.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-ChxW7xBR.native.esm.js → getWaasWalletProviderFromWalletAccount-JN5ZC71J.esm.js} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-D1U_Vmr3.esm.js.map → getWaasWalletProviderFromWalletAccount-JN5ZC71J.esm.js.map} +1 -1
- package/dist/{getWaasWalletProviderFromWalletAccount-BZuQj_tI.cjs → getWaasWalletProviderFromWalletAccount-aRoo7mw8.cjs} +3 -3
- package/dist/{getWaasWalletProviderFromWalletAccount-BZuQj_tI.cjs.map → getWaasWalletProviderFromWalletAccount-aRoo7mw8.cjs.map} +1 -1
- package/dist/{getWalletProviderByKey-Bq0kRpuN.native.esm.js → getWalletProviderByKey-BKRul8sp.native.esm.js} +40 -35
- package/dist/getWalletProviderByKey-BKRul8sp.native.esm.js.map +1 -0
- package/dist/{getWalletProviderByKey-OC_h7kSB.esm.js → getWalletProviderByKey-C-HHI7L8.esm.js} +26 -33
- package/dist/getWalletProviderByKey-C-HHI7L8.esm.js.map +1 -0
- package/dist/{getWalletProviderByKey-DRex9vzR.cjs → getWalletProviderByKey-z1nf15R8.cjs} +29 -42
- package/dist/getWalletProviderByKey-z1nf15R8.cjs.map +1 -0
- package/dist/index.cjs +30 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +22 -63
- package/dist/index.esm.js.map +1 -1
- package/dist/index.native.esm.js +21 -63
- package/dist/index.native.esm.js.map +1 -1
- package/dist/{isDynamicWaasEnabled-DDM_LAa0.native.esm.js → isDynamicWaasEnabled-9I4iE0Ko.native.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-DDM_LAa0.native.esm.js.map → isDynamicWaasEnabled-9I4iE0Ko.native.esm.js.map} +1 -1
- package/dist/{isDynamicWaasEnabled-CEVTY3gQ.cjs → isDynamicWaasEnabled-DDbRfcN3.cjs} +3 -3
- package/dist/{isDynamicWaasEnabled-CEVTY3gQ.cjs.map → isDynamicWaasEnabled-DDbRfcN3.cjs.map} +1 -1
- package/dist/{isDynamicWaasEnabled-Di2FwljM.esm.js → isDynamicWaasEnabled-DvC45F05.esm.js} +2 -2
- package/dist/{isDynamicWaasEnabled-Di2FwljM.esm.js.map → isDynamicWaasEnabled-DvC45F05.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-CPhNpJQE.native.esm.js → isMfaRequiredForAction-B8d2MBRx.native.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-CPhNpJQE.native.esm.js.map → isMfaRequiredForAction-B8d2MBRx.native.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-BnAV59o-.esm.js → isMfaRequiredForAction-BAqo9eBq.esm.js} +2 -2
- package/dist/{isMfaRequiredForAction-BnAV59o-.esm.js.map → isMfaRequiredForAction-BAqo9eBq.esm.js.map} +1 -1
- package/dist/{isMfaRequiredForAction-DSo1ysdD.cjs → isMfaRequiredForAction-YGaK8XRO.cjs} +2 -2
- package/dist/{isMfaRequiredForAction-DSo1ysdD.cjs.map → isMfaRequiredForAction-YGaK8XRO.cjs.map} +1 -1
- package/dist/isUserOnboardingComplete-BT_SR4m_.esm.js +121 -0
- package/dist/isUserOnboardingComplete-BT_SR4m_.esm.js.map +1 -0
- package/dist/isUserOnboardingComplete-Bo9grSze.cjs +151 -0
- package/dist/isUserOnboardingComplete-Bo9grSze.cjs.map +1 -0
- package/dist/isUserOnboardingComplete-CVHzzTtG.native.esm.js +121 -0
- package/dist/isUserOnboardingComplete-CVHzzTtG.native.esm.js.map +1 -0
- 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/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts +1 -0
- package/dist/modules/checkout/attachCheckoutTransactionSource/attachCheckoutTransactionSource.d.ts.map +1 -1
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/broadcastCheckoutTransaction/broadcastCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/cancelCheckoutTransaction/cancelCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/createCheckoutTransaction/createCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/getCheckoutTransaction/getCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts +1 -0
- package/dist/modules/checkout/getCheckoutTransactionQuote/getCheckoutTransactionQuote.d.ts.map +1 -1
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/prepareCheckoutTransaction/prepareCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/submitCheckoutTransaction/submitCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts +1 -0
- package/dist/modules/checkout/trackCheckoutTransaction/trackCheckoutTransaction.d.ts.map +1 -1
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts +1 -0
- package/dist/modules/checkout/utils/requiresConversion/requiresConversion.d.ts.map +1 -1
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts +9 -2
- package/dist/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.d.ts.map +1 -1
- package/dist/modules/waas/createWaasClient/createWaasClient.d.ts.map +1 -1
- package/dist/modules/waas/createWaasProvider/createWaasProvider.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/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts +1 -0
- package/dist/modules/wallets/getAvailableWalletProvidersData/getAvailableWalletProvidersData.d.ts.map +1 -1
- package/dist/modules/wallets/getWalletAccounts/getWalletAccountsFromState/getWalletAccountsFromState.d.ts.map +1 -1
- package/dist/{refreshAuth-Ca_JABru.cjs → refreshAuth-C0kN3RBN.cjs} +3 -3
- package/dist/{refreshAuth-Ca_JABru.cjs.map → refreshAuth-C0kN3RBN.cjs.map} +1 -1
- package/dist/{refreshAuth-DwYi8x0J.esm.js → refreshAuth-CfpOd4qg.esm.js} +3 -3
- package/dist/{refreshAuth-DwYi8x0J.esm.js.map → refreshAuth-CfpOd4qg.esm.js.map} +1 -1
- package/dist/{refreshAuth-C5bVvAAl.native.esm.js → refreshAuth-Ck5OyzzC.native.esm.js} +3 -3
- package/dist/{refreshAuth-C5bVvAAl.native.esm.js.map → refreshAuth-Ck5OyzzC.native.esm.js.map} +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas.cjs +6 -6
- package/dist/waas.esm.js +5 -5
- package/dist/waas.native.esm.js +5 -5
- package/dist/waasCore.cjs +17 -12
- package/dist/waasCore.cjs.map +1 -1
- package/dist/waasCore.esm.js +16 -11
- package/dist/waasCore.esm.js.map +1 -1
- package/dist/waasCore.native.esm.js +7 -6
- package/dist/waasCore.native.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/InvalidParamError-6N66SLG8.esm.js.map +0 -1
- package/dist/InvalidParamError-Bgg4SDfm.cjs.map +0 -1
- package/dist/InvalidParamError-CjC1BFSC.native.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-Bq0kRpuN.native.esm.js.map +0 -1
- package/dist/getWalletProviderByKey-DRex9vzR.cjs.map +0 -1
- package/dist/getWalletProviderByKey-OC_h7kSB.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/preconnectWaasIframe-1BSQ7tHo.native.esm.js +0 -31
- package/dist/preconnectWaasIframe-1BSQ7tHo.native.esm.js.map +0 -1
- package/dist/preconnectWaasIframe-Cb9xM6kI.cjs +0 -37
- package/dist/preconnectWaasIframe-Cb9xM6kI.cjs.map +0 -1
- package/dist/preconnectWaasIframe-D2S_A0QT.esm.js +0 -31
- package/dist/preconnectWaasIframe-D2S_A0QT.esm.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-
|
|
2
|
-
const require_InvalidParamError = require('./InvalidParamError-
|
|
3
|
-
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-
|
|
4
|
-
const require_getWalletProviderByKey = require('./getWalletProviderByKey-
|
|
5
|
-
const require_refreshAuth = require('./refreshAuth-
|
|
6
|
-
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-
|
|
7
|
-
const
|
|
1
|
+
const require_isMfaRequiredForAction = require('./isMfaRequiredForAction-YGaK8XRO.cjs');
|
|
2
|
+
const require_InvalidParamError = require('./InvalidParamError-DDdAeFXE.cjs');
|
|
3
|
+
const require_getNetworkProviderFromNetworkId = require('./getNetworkProviderFromNetworkId-1j3BPA22.cjs');
|
|
4
|
+
const require_getWalletProviderByKey = require('./getWalletProviderByKey-z1nf15R8.cjs');
|
|
5
|
+
const require_refreshAuth = require('./refreshAuth-C0kN3RBN.cjs');
|
|
6
|
+
const require_isDynamicWaasEnabled = require('./isDynamicWaasEnabled-DDbRfcN3.cjs');
|
|
7
|
+
const require_isUserOnboardingComplete = require('./isUserOnboardingComplete-Bo9grSze.cjs');
|
|
8
8
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
9
9
|
let _dynamic_labs_sdk_api_core = require("@dynamic-labs/sdk-api-core");
|
|
10
10
|
let zod_mini = require("zod/mini");
|
|
@@ -519,7 +519,7 @@ const initializeClient = async (client = require_InvalidParamError.getDefaultCli
|
|
|
519
519
|
});
|
|
520
520
|
throw error;
|
|
521
521
|
}
|
|
522
|
-
if (client.user) require_getWalletProviderByKey.
|
|
522
|
+
if (client.user) require_getWalletProviderByKey.initializeWaasClientsForEagerRecovery(client);
|
|
523
523
|
};
|
|
524
524
|
const __initializeClient_impl = initializeClient;
|
|
525
525
|
const __initializeClient_wrapped = require_InvalidParamError.instrumentFunction({
|
|
@@ -2063,6 +2063,7 @@ const __signInWithSocialRedirect_wrapped = require_InvalidParamError.instrumentF
|
|
|
2063
2063
|
* removed in a future major version.
|
|
2064
2064
|
*
|
|
2065
2065
|
* @instrumented
|
|
2066
|
+
* @noHook Deprecated alias that is not exposed as a React hook.
|
|
2066
2067
|
*/
|
|
2067
2068
|
const authenticateWithSocial = (params, client = require_InvalidParamError.getDefaultClient()) => __signInWithSocialRedirect_wrapped(params, client);
|
|
2068
2069
|
const __authenticateWithSocial_impl = authenticateWithSocial;
|
|
@@ -2112,7 +2113,7 @@ const processSocialCallback = async ({ url, requestedScopes }, client) => {
|
|
|
2112
2113
|
if (storedSocialRedirectState.state !== dynamicOauthState) throw new InvalidRedirectStorageStateError();
|
|
2113
2114
|
const { provider, codeVerifier } = storedSocialRedirectState;
|
|
2114
2115
|
await core.storage.removeItem(redirectStateStorageKeySchema);
|
|
2115
|
-
|
|
2116
|
+
require_isUserOnboardingComplete.preconnectWaasIframe(client);
|
|
2116
2117
|
let response;
|
|
2117
2118
|
if (client.user) response = await apiClient.oauthVerify({
|
|
2118
2119
|
environmentId: core.environmentId,
|
|
@@ -2220,6 +2221,7 @@ const __completeSocialAuthentication_wrapped = require_InvalidParamError.instrum
|
|
|
2220
2221
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2221
2222
|
* @returns A promise that resolves to true if the URL is an OAuth redirect, false otherwise.
|
|
2222
2223
|
* @not-instrumented
|
|
2224
|
+
* @noHook Low-level redirect-detection primitive that is not exposed as a React hook.
|
|
2223
2225
|
*/
|
|
2224
2226
|
const detectSocialRedirectUrl = async ({ url }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2225
2227
|
const core = require_InvalidParamError.getCore(client);
|
|
@@ -2508,6 +2510,7 @@ const withCheckoutSessionTokenCleanupOn401 = async ({ call, transactionId }, cli
|
|
|
2508
2510
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2509
2511
|
* @returns The updated checkout transaction (with exchangeSource if sourceType is 'exchange')
|
|
2510
2512
|
* @instrumented
|
|
2513
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2511
2514
|
*/
|
|
2512
2515
|
const attachCheckoutTransactionSource = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2513
2516
|
const { transactionId, sourceType = "wallet" } = params;
|
|
@@ -2557,6 +2560,7 @@ const __attachCheckoutTransactionSource_wrapped = require_InvalidParamError.inst
|
|
|
2557
2560
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2558
2561
|
* @returns The updated checkout transaction
|
|
2559
2562
|
* @instrumented
|
|
2563
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2560
2564
|
*/
|
|
2561
2565
|
const broadcastCheckoutTransaction = async ({ transactionId, txHash }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2562
2566
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2594,6 +2598,7 @@ const __broadcastCheckoutTransaction_wrapped = require_InvalidParamError.instrum
|
|
|
2594
2598
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2595
2599
|
* @returns The cancelled checkout transaction
|
|
2596
2600
|
* @instrumented
|
|
2601
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2597
2602
|
*/
|
|
2598
2603
|
const cancelCheckoutTransaction = async ({ transactionId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2599
2604
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2641,6 +2646,7 @@ const getCheckouts = async (client) => {
|
|
|
2641
2646
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2642
2647
|
* @returns The created transaction with session token
|
|
2643
2648
|
* @instrumented
|
|
2649
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2644
2650
|
*/
|
|
2645
2651
|
const createCheckoutTransaction = async (params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2646
2652
|
const core = require_InvalidParamError.getCore(client);
|
|
@@ -2689,6 +2695,7 @@ const __createCheckoutTransaction_wrapped = require_InvalidParamError.instrument
|
|
|
2689
2695
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2690
2696
|
* @returns The checkout transaction
|
|
2691
2697
|
* @not-instrumented
|
|
2698
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2692
2699
|
*/
|
|
2693
2700
|
const getCheckoutTransaction = async ({ transactionId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2694
2701
|
const core = require_InvalidParamError.getCore(client);
|
|
@@ -2709,6 +2716,7 @@ const getCheckoutTransaction = async ({ transactionId }, client = require_Invali
|
|
|
2709
2716
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2710
2717
|
* @returns The updated checkout transaction with quote data
|
|
2711
2718
|
* @not-instrumented
|
|
2719
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2712
2720
|
*/
|
|
2713
2721
|
const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slippage, transactionId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2714
2722
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2740,6 +2748,7 @@ const getCheckoutTransactionQuote = async ({ fromChainId, fromTokenAddress, slip
|
|
|
2740
2748
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2741
2749
|
* @returns The updated checkout transaction
|
|
2742
2750
|
* @instrumented
|
|
2751
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2743
2752
|
*/
|
|
2744
2753
|
const prepareCheckoutTransaction = async ({ assertBalanceForGasCost, assertBalanceForTransferAmount, transactionId }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2745
2754
|
const { apiClient, environmentId, sessionToken } = await createCheckoutApiClient({ transactionId }, client);
|
|
@@ -2889,6 +2898,7 @@ const __executeSwapTransaction_wrapped = require_InvalidParamError.instrumentFun
|
|
|
2889
2898
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2890
2899
|
* @returns The broadcasted checkout transaction
|
|
2891
2900
|
* @instrumented
|
|
2901
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2892
2902
|
*/
|
|
2893
2903
|
const submitCheckoutTransaction = async ({ onStepChange, transactionId, walletAccount, assertBalanceForGasCost, assertBalanceForTransferAmount }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2894
2904
|
const signingPayload = (await __prepareCheckoutTransaction_wrapped({
|
|
@@ -2941,6 +2951,7 @@ const __submitCheckoutTransaction_wrapped = require_InvalidParamError.instrument
|
|
|
2941
2951
|
* @param params.transactionId - The ID of the checkout transaction to track.
|
|
2942
2952
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2943
2953
|
* @not-instrumented
|
|
2954
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2944
2955
|
*/
|
|
2945
2956
|
const trackCheckoutTransaction = (_params, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2946
2957
|
return Promise.resolve();
|
|
@@ -2963,6 +2974,7 @@ const trackCheckoutTransaction = (_params, client = require_InvalidParamError.ge
|
|
|
2963
2974
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
2964
2975
|
* @returns Whether a token conversion is required
|
|
2965
2976
|
* @not-instrumented
|
|
2977
|
+
* @noHook Legacy checkout function not exposed as a React hook; the checkout product is being renamed to flow.
|
|
2966
2978
|
*/
|
|
2967
2979
|
const requiresConversion = async ({ transaction }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
2968
2980
|
if (!transaction.fromChainId || !transaction.fromChainName || !transaction.fromToken) throw new require_InvalidParamError.InvalidParamError("Transaction is missing source information. Make sure that attachCheckoutTransactionSource has been called before calling this function.");
|
|
@@ -3058,20 +3070,6 @@ const getRegisteredDevices = async (client = require_InvalidParamError.getDefaul
|
|
|
3058
3070
|
}
|
|
3059
3071
|
};
|
|
3060
3072
|
|
|
3061
|
-
//#endregion
|
|
3062
|
-
//#region src/modules/deviceRegistration/isDeviceRegistrationRequired/isDeviceRegistrationRequired.ts
|
|
3063
|
-
/**
|
|
3064
|
-
* Checks if device registration is required for the given user.
|
|
3065
|
-
*
|
|
3066
|
-
* This function determines if the user has the deviceRegistration
|
|
3067
|
-
* scope, indicating that device registration is required.
|
|
3068
|
-
*
|
|
3069
|
-
* @param user - The user to check.
|
|
3070
|
-
* @returns True if device registration is required, false otherwise.
|
|
3071
|
-
* @not-instrumented
|
|
3072
|
-
*/
|
|
3073
|
-
const isDeviceRegistrationRequired = (user) => Boolean(user.scope?.includes("device:register"));
|
|
3074
|
-
|
|
3075
3073
|
//#endregion
|
|
3076
3074
|
//#region src/modules/deviceRegistration/revokeAllRegisteredDevices/revokeAllRegisteredDevices.ts
|
|
3077
3075
|
/** @instrumented */
|
|
@@ -4756,24 +4754,6 @@ const getMfaRecoveryCodes = async (client = require_InvalidParamError.getDefault
|
|
|
4756
4754
|
return require_InvalidParamError.createApiClient({}, client).getRecoveryCodes({ environmentId: core.environmentId });
|
|
4757
4755
|
};
|
|
4758
4756
|
|
|
4759
|
-
//#endregion
|
|
4760
|
-
//#region src/modules/mfa/isPendingRecoveryCodesAcknowledgment/isPendingRecoveryCodesAcknowledgment.ts
|
|
4761
|
-
/**
|
|
4762
|
-
* Checks if the user is still pending acknowledgment of their MFA recovery codes.
|
|
4763
|
-
*
|
|
4764
|
-
* This function determines whether the user has been presented with recovery
|
|
4765
|
-
* codes that they have not yet acknowledged as saved or backed up.
|
|
4766
|
-
*
|
|
4767
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
4768
|
-
* @returns True if recovery codes are pending acknowledgment, false otherwise.
|
|
4769
|
-
* @not-instrumented
|
|
4770
|
-
*/
|
|
4771
|
-
const isPendingRecoveryCodesAcknowledgment = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
4772
|
-
const user = client.user;
|
|
4773
|
-
require_InvalidParamError.assertDefined(user, "User not logged in");
|
|
4774
|
-
return user.mfaBackupCodeAcknowledgement === _dynamic_labs_sdk_api_core.MfaBackupCodeAcknowledgement.Pending;
|
|
4775
|
-
};
|
|
4776
|
-
|
|
4777
4757
|
//#endregion
|
|
4778
4758
|
//#region src/modules/mfa/registerTotpMfaDevice/registerTotpMfaDevice.ts
|
|
4779
4759
|
/**
|
|
@@ -4855,7 +4835,7 @@ const __setDefaultMfaDevice_wrapped = require_InvalidParamError.instrumentFuncti
|
|
|
4855
4835
|
const sendEmailOTP = async ({ email }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
4856
4836
|
const core = require_InvalidParamError.getCore(client);
|
|
4857
4837
|
const apiClient = require_InvalidParamError.createApiClient({}, client);
|
|
4858
|
-
|
|
4838
|
+
require_isUserOnboardingComplete.preconnectWaasIframe(client);
|
|
4859
4839
|
const { verificationUUID } = await apiClient.createEmailVerification({
|
|
4860
4840
|
emailVerificationCreateRequest: {
|
|
4861
4841
|
captchaToken: require_getNetworkProviderFromNetworkId.consumeCaptchaToken(client),
|
|
@@ -5819,7 +5799,7 @@ const sendSmsOTP = async ({ isoCountryCode, phoneNumber }, client = require_Inva
|
|
|
5819
5799
|
const core = require_InvalidParamError.getCore(client);
|
|
5820
5800
|
const apiClient = require_InvalidParamError.createApiClient({}, client);
|
|
5821
5801
|
const phoneCountryCode = supportedCountries[isoCountryCode].code;
|
|
5822
|
-
|
|
5802
|
+
require_isUserOnboardingComplete.preconnectWaasIframe(client);
|
|
5823
5803
|
const { verificationUUID } = await apiClient.createSmsVerification({
|
|
5824
5804
|
environmentId: core.environmentId,
|
|
5825
5805
|
smsVerificationCreateRequest: {
|
|
@@ -5907,7 +5887,7 @@ const verifyOTPForUserUpdate = async ({ otpVerification, verificationToken, requ
|
|
|
5907
5887
|
* @redact-params
|
|
5908
5888
|
*/
|
|
5909
5889
|
const verifyOTP = async ({ otpVerification, verificationToken, requestedScopes }, client = require_InvalidParamError.getDefaultClient()) => {
|
|
5910
|
-
|
|
5890
|
+
require_isUserOnboardingComplete.preconnectWaasIframe(client);
|
|
5911
5891
|
let response;
|
|
5912
5892
|
if (client.user) response = await verifyOTPForUserUpdate({
|
|
5913
5893
|
otpVerification,
|
|
@@ -6044,28 +6024,6 @@ const __deleteUser_wrapped = require_InvalidParamError.instrumentFunction({
|
|
|
6044
6024
|
}
|
|
6045
6025
|
});
|
|
6046
6026
|
|
|
6047
|
-
//#endregion
|
|
6048
|
-
//#region src/modules/user/isUserOnboardingComplete/isUserOnboardingComplete.ts
|
|
6049
|
-
/**
|
|
6050
|
-
* Checks if the user has completed all onboarding requirements.
|
|
6051
|
-
*
|
|
6052
|
-
* This function verifies whether a user has fulfilled all necessary requirements
|
|
6053
|
-
* including KYC fields (Know Your Customer information) and MFA setup
|
|
6054
|
-
* (Multi-Factor Authentication including recovery codes acknowledgment).
|
|
6055
|
-
*
|
|
6056
|
-
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
6057
|
-
* @returns True if onboarding is complete (no pending requirements), false if there are pending requirements.
|
|
6058
|
-
* @not-instrumented
|
|
6059
|
-
*/
|
|
6060
|
-
const isUserOnboardingComplete = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
6061
|
-
const user = client.user;
|
|
6062
|
-
require_InvalidParamError.assertDefined(user, "User not logged in");
|
|
6063
|
-
const hasMissingKycFields = Boolean(user.missingFields?.length);
|
|
6064
|
-
const hasPendingMfaAuth = require_getWalletProviderByKey.isUserMissingMfaAuth(client);
|
|
6065
|
-
const hasPendingRecoveryCodes = isPendingRecoveryCodesAcknowledgment(client);
|
|
6066
|
-
return !hasMissingKycFields && !hasPendingMfaAuth && !hasPendingRecoveryCodes;
|
|
6067
|
-
};
|
|
6068
|
-
|
|
6069
6027
|
//#endregion
|
|
6070
6028
|
//#region src/modules/walletBackup/googleDrive/constants.ts
|
|
6071
6029
|
/**
|
|
@@ -7704,6 +7662,7 @@ const __connectAndVerifyWithWalletProvider_wrapped = require_InvalidParamError.i
|
|
|
7704
7662
|
* @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
|
|
7705
7663
|
* @returns An array of wallet provider data including chain, keys, and metadata.
|
|
7706
7664
|
* @not-instrumented
|
|
7665
|
+
* @hook Exposed as a hook so consumers get the reactive list of available wallet providers, updated when wallet providers change.
|
|
7707
7666
|
*/
|
|
7708
7667
|
const getAvailableWalletProvidersData = (client = require_InvalidParamError.getDefaultClient()) => {
|
|
7709
7668
|
return require_getWalletProviderByKey.getWalletProviders(client).filter((walletProvider) => hasWalletProviderConnectMethod({ walletProvider })).map((walletProvider) => ({
|
|
@@ -8457,6 +8416,7 @@ exports.UnrecognizedNetworkError = UnrecognizedNetworkError;
|
|
|
8457
8416
|
exports.UserCancelledSocialPopUpError = UserCancelledSocialPopUpError;
|
|
8458
8417
|
exports.UserNotAuthenticatedError = UserNotAuthenticatedError;
|
|
8459
8418
|
exports.UserRejectedError = UserRejectedError;
|
|
8419
|
+
exports.WaasOnboardingIncompleteError = require_isUserOnboardingComplete.WaasOnboardingIncompleteError;
|
|
8460
8420
|
exports.WalletAccountAlreadyVerifiedError = WalletAccountAlreadyVerifiedError;
|
|
8461
8421
|
exports.WalletAccountNotSelectedError = WalletAccountNotSelectedError;
|
|
8462
8422
|
exports.WalletAlreadyLinkedToAnotherUserError = require_getNetworkProviderFromNetworkId.WalletAlreadyLinkedToAnotherUserError;
|
|
@@ -8553,16 +8513,16 @@ exports.initializeClient = __initializeClient_wrapped;
|
|
|
8553
8513
|
exports.isAnyWalletAccountConnected = isAnyWalletAccountConnected;
|
|
8554
8514
|
exports.isCaptchaRequired = require_getNetworkProviderFromNetworkId.isCaptchaRequired;
|
|
8555
8515
|
exports.isDeeplinkWalletProvider = isDeeplinkWalletProvider;
|
|
8556
|
-
exports.isDeviceRegistrationRequired = isDeviceRegistrationRequired;
|
|
8516
|
+
exports.isDeviceRegistrationRequired = require_isUserOnboardingComplete.isDeviceRegistrationRequired;
|
|
8557
8517
|
exports.isHardwareWalletAccount = isHardwareWalletAccount;
|
|
8558
8518
|
exports.isInsufficientGoogleDriveScopesError = isInsufficientGoogleDriveScopesError;
|
|
8559
8519
|
exports.isMfaRequiredForAction = require_isMfaRequiredForAction.isMfaRequiredForAction;
|
|
8560
8520
|
exports.isMobile = isMobile;
|
|
8561
|
-
exports.isPendingRecoveryCodesAcknowledgment = isPendingRecoveryCodesAcknowledgment;
|
|
8521
|
+
exports.isPendingRecoveryCodesAcknowledgment = require_isUserOnboardingComplete.isPendingRecoveryCodesAcknowledgment;
|
|
8562
8522
|
exports.isProgrammaticNetworkSwitchAvailable = isProgrammaticNetworkSwitchAvailable;
|
|
8563
8523
|
exports.isSignedIn = require_isMfaRequiredForAction.isSignedIn;
|
|
8564
|
-
exports.isUserMissingMfaAuth =
|
|
8565
|
-
exports.isUserOnboardingComplete = isUserOnboardingComplete;
|
|
8524
|
+
exports.isUserMissingMfaAuth = require_InvalidParamError.isUserMissingMfaAuth;
|
|
8525
|
+
exports.isUserOnboardingComplete = require_isUserOnboardingComplete.isUserOnboardingComplete;
|
|
8566
8526
|
exports.isWalletAccountVerified = isWalletAccountVerified;
|
|
8567
8527
|
exports.logout = logout;
|
|
8568
8528
|
exports.matchWalletProvidersToCatalogGroup = matchWalletProvidersToCatalogGroup;
|