@dynamic-labs/sdk-react-core 4.65.0 → 4.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.cjs +4 -4
  3. package/package.js +4 -4
  4. package/package.json +15 -15
  5. package/src/index.cjs +2 -0
  6. package/src/index.d.ts +2 -2
  7. package/src/index.js +1 -0
  8. package/src/lib/Main.cjs +1 -0
  9. package/src/lib/Main.js +1 -0
  10. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.cjs +18 -0
  11. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.d.ts +1 -0
  12. package/src/lib/client/extension/functions/hasElevatedAccessToken/hasElevatedAccessToken.js +14 -0
  13. package/src/lib/client/extension/functions/hasElevatedAccessToken/index.d.ts +1 -0
  14. package/src/lib/client/extension/index.d.ts +1 -0
  15. package/src/lib/context/DynamicContext/DynamicContext.cjs +20 -19
  16. package/src/lib/context/DynamicContext/DynamicContext.js +20 -19
  17. package/src/lib/context/DynamicContext/types/SettingsOverrides.d.ts +10 -0
  18. package/src/lib/styles/index.shadow.cjs +1 -1
  19. package/src/lib/styles/index.shadow.js +1 -1
  20. package/src/lib/utils/constants/values.cjs +2 -0
  21. package/src/lib/utils/constants/values.js +2 -0
  22. package/src/lib/utils/functions/compareChains/compareChains.cjs +1 -0
  23. package/src/lib/utils/functions/compareChains/compareChains.js +1 -0
  24. package/src/lib/utils/hooks/index.d.ts +2 -1
  25. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +7 -3
  26. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +4 -1
  27. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +7 -3
  28. package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.cjs +7 -2
  29. package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.d.ts +2 -1
  30. package/src/lib/utils/hooks/useNetworkConfigurationsFromProjectSettings/useNetworkConfigurationsFromProjectSettings.js +7 -2
  31. package/src/lib/utils/hooks/useSignEip7702Authorization/index.d.ts +1 -0
  32. package/src/lib/utils/hooks/useSignEip7702Authorization/useSignEip7702Authorization.cjs +162 -0
  33. package/src/lib/utils/hooks/useSignEip7702Authorization/useSignEip7702Authorization.d.ts +78 -0
  34. package/src/lib/utils/hooks/useSignEip7702Authorization/useSignEip7702Authorization.js +158 -0
  35. package/src/lib/utils/hooks/useStepUpAuthentication/index.d.ts +1 -1
  36. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.cjs +102 -23
  37. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.d.ts +35 -15
  38. package/src/lib/utils/hooks/useStepUpAuthentication/useStepUpAuthentication.js +103 -24
  39. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +3 -1
  40. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +3 -1
  41. package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.cjs +3 -2
  42. package/src/lib/utils/hooks/useWalletConnectorNetwork/useWalletConnectorNetwork.js +3 -2
  43. package/src/lib/utils/hooks/useWalletPassword/useWalletPassword.cjs +24 -2
  44. package/src/lib/utils/hooks/useWalletPassword/useWalletPassword.js +24 -2
  45. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.cjs +10 -6
  46. package/src/lib/views/CollectUserDataView/UserDataFields/UserPhoneField/UserPhoneField.js +11 -7
  47. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +1 -1
  48. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +1 -1
  49. package/src/lib/views/ResetPasswordForSettingsView/ResetPasswordForSettingsView.cjs +5 -21
  50. package/src/lib/views/ResetPasswordForSettingsView/ResetPasswordForSettingsView.js +5 -21
  51. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -0
  52. package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -0
  53. package/src/lib/views/SetupPasswordForWalletCreationView/SetupPasswordForWalletCreationView.cjs +9 -1
  54. package/src/lib/views/SetupPasswordForWalletCreationView/SetupPasswordForWalletCreationView.js +9 -1
  55. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +21 -1
  56. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +21 -1
  57. package/src/lib/views/WalletList/data.cjs +1 -0
  58. package/src/lib/views/WalletList/data.d.ts +1 -1
  59. package/src/lib/views/WalletList/data.js +1 -0
  60. package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/ResetPasswordView.cjs +26 -5
  61. package/src/lib/widgets/DynamicWidget/views/ResetPasswordView/ResetPasswordView.js +26 -5
  62. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.cjs +3 -2
  63. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.d.ts +2 -0
  64. package/src/lib/widgets/DynamicWidget/views/SetupPasswordConfirmView/SetupPasswordConfirmView.js +3 -2
  65. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.cjs +2 -2
  66. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.d.ts +2 -0
  67. package/src/lib/widgets/DynamicWidget/views/SetupPasswordKnowledgeCheckView/SetupPasswordKnowledgeCheckView.js +2 -2
  68. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.cjs +30 -22
  69. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.d.ts +2 -1
  70. package/src/lib/widgets/DynamicWidget/views/SetupPasswordView/SetupPasswordView.js +30 -22
package/CHANGELOG.md CHANGED
@@ -1,4 +1,36 @@
1
1
 
2
+ ## [4.67.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.66.0...v4.67.0) (2026-03-09)
3
+
4
+
5
+ ### Features
6
+
7
+ * add MFA methods to useStepUpAuthentication hook ([#10581](https://github.com/dynamic-labs/dynamic-auth/issues/10581)) ([7903290](https://github.com/dynamic-labs/dynamic-auth/commit/79032906d548ba2d4bcdf69cd9e6eb820064e408)), closes [dynamic-labs/dynamic-js-sdk#1061](https://github.com/dynamic-labs/dynamic-js-sdk/issues/1061) [dynamic-labs/dynamic-js-sdk#1062](https://github.com/dynamic-labs/dynamic-js-sdk/issues/1062)
8
+ * **demo:** add Passkey MFA and TOTP MFA step-up auth demos ([#10582](https://github.com/dynamic-labs/dynamic-auth/issues/10582)) ([92b9e28](https://github.com/dynamic-labs/dynamic-auth/commit/92b9e28e62084031a8bca11216aab39198948e82)), closes [#10581](https://github.com/dynamic-labs/dynamic-auth/issues/10581)
9
+ * **demo:** add Step-up Auth section ([#10483](https://github.com/dynamic-labs/dynamic-auth/issues/10483)) ([4bfff9a](https://github.com/dynamic-labs/dynamic-auth/commit/4bfff9a0fe475b4d8dbb6b8c4fccebb6550aa06f))
10
+ * **react-native:** add minifiedToken support to authModule ([#10595](https://github.com/dynamic-labs/dynamic-auth/issues/10595)) ([6b6e067](https://github.com/dynamic-labs/dynamic-auth/commit/6b6e067e62b97f573a31140967f3a07064e9f3fd))
11
+ * **stellar:** add account activation handling for unfunded recipients ([#10578](https://github.com/dynamic-labs/dynamic-auth/issues/10578)) ([ea5ef7b](https://github.com/dynamic-labs/dynamic-auth/commit/ea5ef7bfce7cf984ff091ea7d6321814dc3eea81))
12
+ * update demo CTA buttons - 'Book a call' and 'Get a free account' ([#10589](https://github.com/dynamic-labs/dynamic-auth/issues/10589)) ([e7d967c](https://github.com/dynamic-labs/dynamic-auth/commit/e7d967c59c5ad616348d9a51ea4bd314ec1ddd9f))
13
+ * **waas:** add password support to upgradeToDynamicWaas ([#10606](https://github.com/dynamic-labs/dynamic-auth/issues/10606)) ([d998a3e](https://github.com/dynamic-labs/dynamic-auth/commit/d998a3e955110f419dc40c4aeaddd93834957eb7))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * add overflow-y auto to backup codes view to prevent Complete button cutoff ([#10513](https://github.com/dynamic-labs/dynamic-auth/issues/10513)) ([5dfa94e](https://github.com/dynamic-labs/dynamic-auth/commit/5dfa94eaa232535f2e8c6905370dd8d8546485e3))
19
+ * prevent infinite re-render loop in UserPhoneField due to rapid t… ([#10475](https://github.com/dynamic-labs/dynamic-auth/issues/10475)) ([0d79b07](https://github.com/dynamic-labs/dynamic-auth/commit/0d79b0782606c9fa926ed4697a17381211ad2f4a))
20
+
21
+ ## [4.66.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.65.0...v4.66.0) (2026-03-02)
22
+
23
+
24
+ ### Features
25
+
26
+ * **stellar:** send serialized XDR for transaction signing ([#10548](https://github.com/dynamic-labs/dynamic-auth/issues/10548)) ([3ff6438](https://github.com/dynamic-labs/dynamic-auth/commit/3ff64384e16d5fdb32cd6a3fd144757bf05f4456))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * prevent MFA backup codes screen from being dismissed before acknowledgement ([#10530](https://github.com/dynamic-labs/dynamic-auth/issues/10530)) ([67086f0](https://github.com/dynamic-labs/dynamic-auth/commit/67086f0b4a1302d39853eb2eedcb6f5b8bfca889))
32
+ * **react-native:** add retry when setting items to secure store ([#10576](https://github.com/dynamic-labs/dynamic-auth/issues/10576)) ([22ea162](https://github.com/dynamic-labs/dynamic-auth/commit/22ea162420806a4a67394c99f3691754982a7f1f))
33
+
2
34
  ## [4.65.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.64.0...v4.65.0) (2026-02-27)
3
35
 
4
36
 
package/package.cjs CHANGED
@@ -3,11 +3,11 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.65.0";
6
+ var version = "4.67.0";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.0.875",
9
- "@dynamic-labs-sdk/client": "0.12.1",
10
- "@dynamic-labs-wallet/browser-wallet-client": "0.0.286",
8
+ "@dynamic-labs/sdk-api-core": "0.0.881",
9
+ "@dynamic-labs-sdk/client": "0.14.0",
10
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.289",
11
11
  "@hcaptcha/react-hcaptcha": "1.4.4",
12
12
  "@thumbmarkjs/thumbmarkjs": "0.16.0",
13
13
  "country-list": "2.3.0",
package/package.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use client'
2
- var version = "4.65.0";
2
+ var version = "4.67.0";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.0.875",
5
- "@dynamic-labs-sdk/client": "0.12.1",
6
- "@dynamic-labs-wallet/browser-wallet-client": "0.0.286",
4
+ "@dynamic-labs/sdk-api-core": "0.0.881",
5
+ "@dynamic-labs-sdk/client": "0.14.0",
6
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.289",
7
7
  "@hcaptcha/react-hcaptcha": "1.4.4",
8
8
  "@thumbmarkjs/thumbmarkjs": "0.16.0",
9
9
  "country-list": "2.3.0",
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.65.0",
3
+ "version": "4.67.0",
4
4
  "dependencies": {
5
- "@dynamic-labs/sdk-api-core": "0.0.875",
6
- "@dynamic-labs-sdk/client": "0.12.1",
7
- "@dynamic-labs-wallet/browser-wallet-client": "0.0.286",
5
+ "@dynamic-labs/sdk-api-core": "0.0.881",
6
+ "@dynamic-labs-sdk/client": "0.14.0",
7
+ "@dynamic-labs-wallet/browser-wallet-client": "0.0.289",
8
8
  "@hcaptcha/react-hcaptcha": "1.4.4",
9
9
  "@thumbmarkjs/thumbmarkjs": "0.16.0",
10
10
  "country-list": "2.3.0",
@@ -16,17 +16,17 @@
16
16
  "yup": "0.32.11",
17
17
  "react-international-phone": "4.5.0",
18
18
  "bs58": "5.0.0",
19
- "@dynamic-labs/assert-package-version": "4.65.0",
20
- "@dynamic-labs/iconic": "4.65.0",
21
- "@dynamic-labs/locale": "4.65.0",
22
- "@dynamic-labs/logger": "4.65.0",
23
- "@dynamic-labs/multi-wallet": "4.65.0",
24
- "@dynamic-labs/rpc-providers": "4.65.0",
25
- "@dynamic-labs/store": "4.65.0",
26
- "@dynamic-labs/types": "4.65.0",
27
- "@dynamic-labs/utils": "4.65.0",
28
- "@dynamic-labs/wallet-book": "4.65.0",
29
- "@dynamic-labs/wallet-connector-core": "4.65.0",
19
+ "@dynamic-labs/assert-package-version": "4.67.0",
20
+ "@dynamic-labs/iconic": "4.67.0",
21
+ "@dynamic-labs/locale": "4.67.0",
22
+ "@dynamic-labs/logger": "4.67.0",
23
+ "@dynamic-labs/multi-wallet": "4.67.0",
24
+ "@dynamic-labs/rpc-providers": "4.67.0",
25
+ "@dynamic-labs/store": "4.67.0",
26
+ "@dynamic-labs/types": "4.67.0",
27
+ "@dynamic-labs/utils": "4.67.0",
28
+ "@dynamic-labs/wallet-book": "4.67.0",
29
+ "@dynamic-labs/wallet-connector-core": "4.67.0",
30
30
  "eventemitter3": "5.0.1"
31
31
  },
32
32
  "devDependencies": {
package/src/index.cjs CHANGED
@@ -169,6 +169,7 @@ var useExternalAuth = require('./lib/utils/hooks/useExternalAuth/useExternalAuth
169
169
  var useRefreshUser = require('./lib/utils/hooks/useRefreshUser/useRefreshUser.cjs');
170
170
  var useWalletOptions = require('./lib/utils/hooks/useWalletOptions/useWalletOptions.cjs');
171
171
  var useSyncMfaFlow = require('./lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.cjs');
172
+ var useSignEip7702Authorization = require('./lib/utils/hooks/useSignEip7702Authorization/useSignEip7702Authorization.cjs');
172
173
  var useTelegramLogin = require('./lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs');
173
174
  var useUpgradeEmbeddedWallet = require('./lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.cjs');
174
175
  var useDeleteUserAccount = require('./lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.cjs');
@@ -333,6 +334,7 @@ exports.useExternalAuth = useExternalAuth.useExternalAuth;
333
334
  exports.useRefreshUser = useRefreshUser.useRefreshUser;
334
335
  exports.useWalletOptions = useWalletOptions.useWalletOptions;
335
336
  exports.useSyncMfaFlow = useSyncMfaFlow.useSyncMfaFlow;
337
+ exports.useSignEip7702Authorization = useSignEip7702Authorization.useSignEip7702Authorization;
336
338
  exports.useTelegramLogin = useTelegramLogin.useTelegramLogin;
337
339
  exports.useUpgradeEmbeddedWallet = useUpgradeEmbeddedWallet.useUpgradeEmbeddedWallet;
338
340
  exports.useDeleteUserAccount = useDeleteUserAccount.useDeleteUserAccount;
package/src/index.d.ts CHANGED
@@ -123,8 +123,8 @@ export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallet
123
123
  export {
124
124
  /** @deprecated */
125
125
  DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
126
- export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useMultichainTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useRefreshAuth, useWalletOptions, useSmartWallets, EmbeddedWalletVersion, useTelegramLogin, useUpgradeEmbeddedWallet, useEVMTransactionSimulation, useSVMTransactionSimulation, useDeleteUserAccount, useDynamicWaas, useGetPasskeys, useDeletePasskey, useRegisterPasskey, useAuthenticatePasskeyMFA, useGetUserMfaMethods, usePromptMfaAuth, useUpgradeToDynamicWaasFlow, useGetMfaToken, useGetWalletPassword, useWalletPassword, useIsMfaRequiredForAction, useWalletDelegation, useWalletBackup, useBackupWallets, isWalletBackedUp, CloudBackupProvider, useExchangeAccounts, useStepUpAuthentication, } from './lib/utils/hooks';
127
- export type { StepUpAuthenticationState, UseStepUpAuthenticationParams, UseStepUpAuthenticationReturn, VerifyOtpParams, VerifyWalletParams, } from './lib/utils/hooks';
126
+ export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useMultichainTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useRefreshAuth, useWalletOptions, useSmartWallets, useSignEip7702Authorization, EmbeddedWalletVersion, useTelegramLogin, useUpgradeEmbeddedWallet, useEVMTransactionSimulation, useSVMTransactionSimulation, useDeleteUserAccount, useDynamicWaas, useGetPasskeys, useDeletePasskey, useRegisterPasskey, useAuthenticatePasskeyMFA, useGetUserMfaMethods, usePromptMfaAuth, useUpgradeToDynamicWaasFlow, useGetMfaToken, useGetWalletPassword, useWalletPassword, useIsMfaRequiredForAction, useWalletDelegation, useWalletBackup, useBackupWallets, isWalletBackedUp, CloudBackupProvider, useExchangeAccounts, useStepUpAuthentication, } from './lib/utils/hooks';
127
+ export type { IsStepUpRequiredParams, StepUpAuthenticationState, UseStepUpAuthenticationParams, UseStepUpAuthenticationReturn, VerifyOtpParams, VerifyPasskeyMfaParams, VerifyTotpMfaParams, VerifyWalletParams, } from './lib/utils/hooks';
128
128
  export {
129
129
  /** @deprecated use useOnramp instead */
130
130
  useFunding, } from './lib/utils/hooks/useFunding';
package/src/index.js CHANGED
@@ -165,6 +165,7 @@ export { useExternalAuth } from './lib/utils/hooks/useExternalAuth/useExternalAu
165
165
  export { useRefreshUser } from './lib/utils/hooks/useRefreshUser/useRefreshUser.js';
166
166
  export { useWalletOptions } from './lib/utils/hooks/useWalletOptions/useWalletOptions.js';
167
167
  export { useSyncMfaFlow } from './lib/utils/hooks/useSyncMfaFlow/useSyncMfaFlow.js';
168
+ export { useSignEip7702Authorization } from './lib/utils/hooks/useSignEip7702Authorization/useSignEip7702Authorization.js';
168
169
  export { useTelegramLogin } from './lib/utils/hooks/useTelegramLogin/useTelegramLogin.js';
169
170
  export { useUpgradeEmbeddedWallet } from './lib/utils/hooks/useUpgradeEmbeddedWallet/useUpgradeEmbeddedWallet.js';
170
171
  export { useDeleteUserAccount } from './lib/utils/hooks/useDeleteUserAccount/useDeleteUserAccount.js';
package/src/lib/Main.cjs CHANGED
@@ -116,6 +116,7 @@ const viewsToDisableCloseOnOverlayClick = [
116
116
  'social-redirect-view',
117
117
  'passkey-intro',
118
118
  'setup-password-for-wallet-creation',
119
+ 'mfa-display-backup-codes',
119
120
  ];
120
121
  const Main = () => {
121
122
  const { selectedWalletConnector, linkedWallets, projectSettings, setShowAuthFlow, showAuthFlow, walletConnectorOptions, clearStatesOnBackClick, user, disconnectWallet, connectedWallets, handleLogOut, } = useInternalDynamicContext.useInternalDynamicContext();
package/src/lib/Main.js CHANGED
@@ -112,6 +112,7 @@ const viewsToDisableCloseOnOverlayClick = [
112
112
  'social-redirect-view',
113
113
  'passkey-intro',
114
114
  'setup-password-for-wallet-creation',
115
+ 'mfa-display-backup-codes',
115
116
  ];
116
117
  const Main = () => {
117
118
  const { selectedWalletConnector, linkedWallets, projectSettings, setShowAuthFlow, showAuthFlow, walletConnectorOptions, clearStatesOnBackClick, user, disconnectWallet, connectedWallets, handleLogOut, } = useInternalDynamicContext();
@@ -0,0 +1,18 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var client = require('@dynamic-labs-sdk/client');
7
+ var core = require('@dynamic-labs-sdk/client/core');
8
+
9
+ const EXPIRATION_BUFFER_MS = 5000;
10
+ const hasElevatedAccessToken = (scope) => {
11
+ const { elevatedAccessTokens = [] } = core.getCore(client.getDefaultClient()).state.get();
12
+ // Add a buffer to the expiration date to account for delay between token check and its usage
13
+ const threshold = new Date(Date.now() + EXPIRATION_BUFFER_MS);
14
+ return elevatedAccessTokens.some((token) => token.scopes.includes(scope) &&
15
+ (!token.expiresAt || token.expiresAt > threshold));
16
+ };
17
+
18
+ exports.hasElevatedAccessToken = hasElevatedAccessToken;
@@ -0,0 +1 @@
1
+ export declare const hasElevatedAccessToken: (scope: string) => boolean;
@@ -0,0 +1,14 @@
1
+ 'use client'
2
+ import { getDefaultClient } from '@dynamic-labs-sdk/client';
3
+ import { getCore } from '@dynamic-labs-sdk/client/core';
4
+
5
+ const EXPIRATION_BUFFER_MS = 5000;
6
+ const hasElevatedAccessToken = (scope) => {
7
+ const { elevatedAccessTokens = [] } = getCore(getDefaultClient()).state.get();
8
+ // Add a buffer to the expiration date to account for delay between token check and its usage
9
+ const threshold = new Date(Date.now() + EXPIRATION_BUFFER_MS);
10
+ return elevatedAccessTokens.some((token) => token.scopes.includes(scope) &&
11
+ (!token.expiresAt || token.expiresAt > threshold));
12
+ };
13
+
14
+ export { hasElevatedAccessToken };
@@ -0,0 +1 @@
1
+ export { hasElevatedAccessToken } from './hasElevatedAccessToken';
@@ -14,5 +14,6 @@ export { isCookieEnabled } from './functions/isCookieEnabled';
14
14
  export { getMinAuthToken } from './functions/getMinAuthToken';
15
15
  export { getAuthToken } from './functions/getAuthToken';
16
16
  export { getExpiresAt } from './functions/getExpiresAt';
17
+ export { hasElevatedAccessToken } from './functions/hasElevatedAccessToken';
17
18
  export { useInitStatus } from './initStatus/useInitStatus';
18
19
  export { setUnverifiedWalletAccounts } from './unverifiedWalletAccounts/setUnverifiedWalletAccounts';
@@ -180,7 +180,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
180
180
  const DynamicContext = React.createContext(undefined);
181
181
  /** The context provider itself we only use internally */
182
182
  const InnerDynamicContextProvider = (props) => {
183
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
183
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
184
184
  const { children, theme, settings: settings$1, locale: locale$1, enableInstrumentation = false, } = props;
185
185
  const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, coinbaseWalletPreference, detectNewWalletsForLinking = defaultDynamicSettings.defaultDynamicSettings.detectNewWalletsForLinking, enableConnectOnlyFallback = defaultDynamicSettings.defaultDynamicSettings.enableConnectOnlyFallback, deepLinkPreference: deepLinkPreferenceProp = defaultDynamicSettings.defaultDynamicSettings.deepLinkPreference, bridgeChains, cspNonce, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = defaultDynamicSettings.defaultDynamicSettings.initialAuthenticationMode, debugError = defaultDynamicSettings.defaultDynamicSettings.debugError, displaySiweStatement = defaultDynamicSettings.defaultDynamicSettings.displaySiweStatement, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = defaultDynamicSettings.defaultDynamicSettings.enableVisitTrackingOnConnectOnly, environmentId, walletsFilter, logLevel = defaultDynamicSettings.defaultDynamicSettings.logLevel, mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, siweStatement, shadowDOMEnabled = defaultDynamicSettings.defaultDynamicSettings.shadowDOMEnabled, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = defaultDynamicSettings.defaultDynamicSettings.showLockedWalletView, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, transactionConfirmation: transactionConfirmationSettings, useMetamaskSdk = defaultDynamicSettings.defaultDynamicSettings.useMetamaskSdk, } = settings$1;
186
186
  let { appLogoUrl = defaultDynamicSettings.defaultDynamicSettings.appLogoUrl, appName = defaultDynamicSettings.defaultDynamicSettings.appName, } = settings$1;
@@ -243,15 +243,16 @@ const InnerDynamicContextProvider = (props) => {
243
243
  const projectSettings = useProjectSettings.useProjectSettings();
244
244
  const refetchProjectSettings = useRefetchProjectSettings.useRefetchProjectSettings();
245
245
  const serverNetworkConfigurations = useNetworkConfigurationsFromProjectSettings.useNetworkConfigurationsFromProjectSettings({
246
- aptosNetworksOverrides: (_b = settings$1.overrides) === null || _b === void 0 ? void 0 : _b.aptosNetworks,
247
- bitcoinNetworksOverrides: (_c = settings$1.overrides) === null || _c === void 0 ? void 0 : _c.bitcoinNetworks,
248
- cosmosNetworkOverrides: (_d = settings$1.overrides) === null || _d === void 0 ? void 0 : _d.cosmosNetworks,
249
- evmNetworksOverrides: (_e = settings$1.overrides) === null || _e === void 0 ? void 0 : _e.evmNetworks,
246
+ aleoNetworksOverrides: (_b = settings$1.overrides) === null || _b === void 0 ? void 0 : _b.aleoNetworks,
247
+ aptosNetworksOverrides: (_c = settings$1.overrides) === null || _c === void 0 ? void 0 : _c.aptosNetworks,
248
+ bitcoinNetworksOverrides: (_d = settings$1.overrides) === null || _d === void 0 ? void 0 : _d.bitcoinNetworks,
249
+ cosmosNetworkOverrides: (_e = settings$1.overrides) === null || _e === void 0 ? void 0 : _e.cosmosNetworks,
250
+ evmNetworksOverrides: (_f = settings$1.overrides) === null || _f === void 0 ? void 0 : _f.evmNetworks,
250
251
  projectSettings,
251
- solanaNetworksOverrides: (_f = settings$1.overrides) === null || _f === void 0 ? void 0 : _f.solNetworks,
252
- stellarNetworksOverrides: (_g = settings$1.overrides) === null || _g === void 0 ? void 0 : _g.stellarNetworks,
253
- tonNetworksOverrides: (_h = settings$1.overrides) === null || _h === void 0 ? void 0 : _h.tonNetworks,
254
- tronNetworksOverrides: (_j = settings$1.overrides) === null || _j === void 0 ? void 0 : _j.tronNetworks,
252
+ solanaNetworksOverrides: (_g = settings$1.overrides) === null || _g === void 0 ? void 0 : _g.solNetworks,
253
+ stellarNetworksOverrides: (_h = settings$1.overrides) === null || _h === void 0 ? void 0 : _h.stellarNetworks,
254
+ tonNetworksOverrides: (_j = settings$1.overrides) === null || _j === void 0 ? void 0 : _j.tonNetworks,
255
+ tronNetworksOverrides: (_k = settings$1.overrides) === null || _k === void 0 ? void 0 : _k.tronNetworks,
255
256
  });
256
257
  useSendDynamicProps.useSendDynamicProps({ environmentId, settings: settings$1 });
257
258
  // Console warning for end user safety
@@ -261,16 +262,16 @@ const InnerDynamicContextProvider = (props) => {
261
262
  });
262
263
  const multiWallet = useMultiWallet.useMultiWallet({
263
264
  isBridgeFlow,
264
- multiWalletOverride: (_k = settings$1.overrides) === null || _k === void 0 ? void 0 : _k.multiWallet,
265
- multiWalletSettings: (_l = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _l === void 0 ? void 0 : _l.multiWallet,
265
+ multiWalletOverride: (_l = settings$1.overrides) === null || _l === void 0 ? void 0 : _l.multiWallet,
266
+ multiWalletSettings: (_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _m === void 0 ? void 0 : _m.multiWallet,
266
267
  });
267
268
  const multiAsset = useMultiAsset.useMultiAsset({
268
- multiAssetOverride: (_m = settings$1.overrides) === null || _m === void 0 ? void 0 : _m.multiAsset,
269
- multiAssetSettings: (_o = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _o === void 0 ? void 0 : _o.enableMultiAsset,
269
+ multiAssetOverride: (_o = settings$1.overrides) === null || _o === void 0 ? void 0 : _o.multiAsset,
270
+ multiAssetSettings: (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _p === void 0 ? void 0 : _p.enableMultiAsset,
270
271
  });
271
272
  const showFiat = useShowFiat.useShowFiat({
272
- showFiatOverride: (_p = settings$1.overrides) === null || _p === void 0 ? void 0 : _p.showFiat,
273
- showFiatSettings: (_q = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _q === void 0 ? void 0 : _q.showFiat,
273
+ showFiatOverride: (_q = settings$1.overrides) === null || _q === void 0 ? void 0 : _q.showFiat,
274
+ showFiatSettings: (_r = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _r === void 0 ? void 0 : _r.showFiat,
274
275
  });
275
276
  // Used inside useVerifyOnAwaitingSignature. Is legacy and should be removed asap
276
277
  const [legacyIsVerifying, setLegacyIsVerifying] = React.useState(false);
@@ -345,7 +346,7 @@ const InnerDynamicContextProvider = (props) => {
345
346
  canHaveMultipleWalletsConnected: multiWallet || isBridgeFlow,
346
347
  connectedWallets,
347
348
  primaryWalletId: primaryWalletId$1,
348
- separateSmartWalletAndSigner: (_s = (_r = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _r === void 0 ? void 0 : _r.accountAbstraction) === null || _s === void 0 ? void 0 : _s.separateSmartWalletAndSigner,
349
+ separateSmartWalletAndSigner: (_t = (_s = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _s === void 0 ? void 0 : _s.accountAbstraction) === null || _t === void 0 ? void 0 : _t.separateSmartWalletAndSigner,
349
350
  setMultiWalletWidgetState,
350
351
  user: user || userWithMissingInfo,
351
352
  walletConnectorOptions,
@@ -451,8 +452,8 @@ const InnerDynamicContextProvider = (props) => {
451
452
  const { walletsForChainsMap } = useFetchWalletsForChainsMap.useFetchWalletsForChainsMap(newToWeb3WalletChainMap);
452
453
  const { setCallback } = useCustomerCallbacks.useCustomerCallbacks({
453
454
  callbacks: {
454
- onAuthSuccess: (_t = settings$1.events) === null || _t === void 0 ? void 0 : _t.onAuthSuccess,
455
- onUserProfileUpdate: (_u = settings$1.events) === null || _u === void 0 ? void 0 : _u.onUserProfileUpdate,
455
+ onAuthSuccess: (_u = settings$1.events) === null || _u === void 0 ? void 0 : _u.onAuthSuccess,
456
+ onUserProfileUpdate: (_v = settings$1.events) === null || _v === void 0 ? void 0 : _v.onUserProfileUpdate,
456
457
  },
457
458
  handleLogOut,
458
459
  isAuthenticated,
@@ -742,7 +743,7 @@ const InnerDynamicContextProvider = (props) => {
742
743
  isBridgeFlow,
743
744
  isMultiWalletEnabled: multiWallet,
744
745
  });
745
- return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { cspNonce: cspNonce, customerTheme: parseTheme.parseTheme(theme, ((_v = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _v === void 0 ? void 0 : _v.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsxs(ViewContext.ViewContextProvider, { initialViewType: initialViewType, children: [networkValidationMode === 'always' && jsxRuntime.jsx(UseNetworkValidation.UseNetworkValidation, {}), jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { children: jsxRuntime.jsx(VerificationContext.VerificationProvider, { children: jsxRuntime.jsx(PasskeyContext.PasskeyContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(OnrampContext.OnrampContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsx(UserFieldEditorContext.UserFieldEditorContextProvider, { children: jsxRuntime.jsx(ConnectWithOtpProvider.ConnectWithOtpProvider, { children: jsxRuntime.jsx(PhantomRedirectContext.PhantomRedirectContextProvider, { children: jsxRuntime.jsxs(SocialRedirectContext.SocialRedirectContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(OnrampWidget.OnrampWidget, {}), jsxRuntime.jsx(SyncAuthFlow.SyncAuthFlow, {}), jsxRuntime.jsx(WalletConnectorEvents.WalletConnectorEvents, { connectorProps: connectorProps }), confirmationModal, jsxRuntime.jsx(ErrorBoundaryExclude.ErrorBoundaryExclude, { children: children })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }));
746
+ return (jsxRuntime.jsx(reactI18next.I18nextProvider, { i18n: i18nSDKInstance, children: jsxRuntime.jsx(DynamicContext.Provider, { value: value, children: jsxRuntime.jsx(walletBook.WalletBookContextProvider, { walletBook: walletBook$1, children: jsxRuntime.jsx(ThemeContext.ThemeContextProvider, { cspNonce: cspNonce, customerTheme: parseTheme.parseTheme(theme, ((_w = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _w === void 0 ? void 0 : _w.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsxRuntime.jsx(LoadingContext.LoadingContextProvider, { children: jsxRuntime.jsxs(ViewContext.ViewContextProvider, { initialViewType: initialViewType, children: [networkValidationMode === 'always' && jsxRuntime.jsx(UseNetworkValidation.UseNetworkValidation, {}), jsxRuntime.jsx(CaptchaContext.CaptchaContextProvider, { children: jsxRuntime.jsx(AccountExistsContext.AccountExistsContextProvider, { children: jsxRuntime.jsx(WalletContext.WalletContextProvider, { children: jsxRuntime.jsx(VerificationContext.VerificationProvider, { children: jsxRuntime.jsx(PasskeyContext.PasskeyContextProvider, { children: jsxRuntime.jsx(DynamicWidgetContext.DynamicWidgetContextProvider, { children: jsxRuntime.jsx(DynamicBridgeWidgetContext.DynamicBridgeWidgetContextProvider, { children: jsxRuntime.jsx(OnrampContext.OnrampContextProvider, { children: jsxRuntime.jsx(AccessDeniedContext.AccessDeniedContextProvider, { children: jsxRuntime.jsx(SendBalanceContext.SendBalanceContextProvider, { children: jsxRuntime.jsx(WalletGroupContext.WalletGroupContextProvider, { children: jsxRuntime.jsx(UserFieldEditorContext.UserFieldEditorContextProvider, { children: jsxRuntime.jsx(ConnectWithOtpProvider.ConnectWithOtpProvider, { children: jsxRuntime.jsx(PhantomRedirectContext.PhantomRedirectContextProvider, { children: jsxRuntime.jsxs(SocialRedirectContext.SocialRedirectContextProvider, { children: [jsxRuntime.jsx(app.DynamicAuthFlow, {}), jsxRuntime.jsx(OnrampWidget.OnrampWidget, {}), jsxRuntime.jsx(SyncAuthFlow.SyncAuthFlow, {}), jsxRuntime.jsx(WalletConnectorEvents.WalletConnectorEvents, { connectorProps: connectorProps }), confirmationModal, jsxRuntime.jsx(ErrorBoundaryExclude.ErrorBoundaryExclude, { children: children })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }));
746
747
  };
747
748
  /** The context provider you need to have access too all of Dynamic's hooks */
748
749
  const DynamicContextProvider = (props) => {
@@ -176,7 +176,7 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
176
176
  const DynamicContext = createContext(undefined);
177
177
  /** The context provider itself we only use internally */
178
178
  const InnerDynamicContextProvider = (props) => {
179
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
179
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
180
180
  const { children, theme, settings, locale, enableInstrumentation = false, } = props;
181
181
  const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, defaultPhoneInputIso2, coinbaseWalletPreference, detectNewWalletsForLinking = defaultDynamicSettings.detectNewWalletsForLinking, enableConnectOnlyFallback = defaultDynamicSettings.enableConnectOnlyFallback, deepLinkPreference: deepLinkPreferenceProp = defaultDynamicSettings.deepLinkPreference, bridgeChains, cspNonce, cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = defaultDynamicSettings.initialAuthenticationMode, debugError = defaultDynamicSettings.debugError, displaySiweStatement = defaultDynamicSettings.displaySiweStatement, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = defaultDynamicSettings.enableVisitTrackingOnConnectOnly, environmentId, walletsFilter, logLevel = defaultDynamicSettings.logLevel, mobileExperience, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, siweStatement, shadowDOMEnabled = defaultDynamicSettings.shadowDOMEnabled, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = defaultDynamicSettings.showLockedWalletView, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, handlers, suppressEndUserConsoleWarning, transactionConfirmation: transactionConfirmationSettings, useMetamaskSdk = defaultDynamicSettings.useMetamaskSdk, } = settings;
182
182
  let { appLogoUrl = defaultDynamicSettings.appLogoUrl, appName = defaultDynamicSettings.appName, } = settings;
@@ -239,15 +239,16 @@ const InnerDynamicContextProvider = (props) => {
239
239
  const projectSettings = useProjectSettings();
240
240
  const refetchProjectSettings = useRefetchProjectSettings();
241
241
  const serverNetworkConfigurations = useNetworkConfigurationsFromProjectSettings({
242
- aptosNetworksOverrides: (_b = settings.overrides) === null || _b === void 0 ? void 0 : _b.aptosNetworks,
243
- bitcoinNetworksOverrides: (_c = settings.overrides) === null || _c === void 0 ? void 0 : _c.bitcoinNetworks,
244
- cosmosNetworkOverrides: (_d = settings.overrides) === null || _d === void 0 ? void 0 : _d.cosmosNetworks,
245
- evmNetworksOverrides: (_e = settings.overrides) === null || _e === void 0 ? void 0 : _e.evmNetworks,
242
+ aleoNetworksOverrides: (_b = settings.overrides) === null || _b === void 0 ? void 0 : _b.aleoNetworks,
243
+ aptosNetworksOverrides: (_c = settings.overrides) === null || _c === void 0 ? void 0 : _c.aptosNetworks,
244
+ bitcoinNetworksOverrides: (_d = settings.overrides) === null || _d === void 0 ? void 0 : _d.bitcoinNetworks,
245
+ cosmosNetworkOverrides: (_e = settings.overrides) === null || _e === void 0 ? void 0 : _e.cosmosNetworks,
246
+ evmNetworksOverrides: (_f = settings.overrides) === null || _f === void 0 ? void 0 : _f.evmNetworks,
246
247
  projectSettings,
247
- solanaNetworksOverrides: (_f = settings.overrides) === null || _f === void 0 ? void 0 : _f.solNetworks,
248
- stellarNetworksOverrides: (_g = settings.overrides) === null || _g === void 0 ? void 0 : _g.stellarNetworks,
249
- tonNetworksOverrides: (_h = settings.overrides) === null || _h === void 0 ? void 0 : _h.tonNetworks,
250
- tronNetworksOverrides: (_j = settings.overrides) === null || _j === void 0 ? void 0 : _j.tronNetworks,
248
+ solanaNetworksOverrides: (_g = settings.overrides) === null || _g === void 0 ? void 0 : _g.solNetworks,
249
+ stellarNetworksOverrides: (_h = settings.overrides) === null || _h === void 0 ? void 0 : _h.stellarNetworks,
250
+ tonNetworksOverrides: (_j = settings.overrides) === null || _j === void 0 ? void 0 : _j.tonNetworks,
251
+ tronNetworksOverrides: (_k = settings.overrides) === null || _k === void 0 ? void 0 : _k.tronNetworks,
251
252
  });
252
253
  useSendDynamicProps({ environmentId, settings });
253
254
  // Console warning for end user safety
@@ -257,16 +258,16 @@ const InnerDynamicContextProvider = (props) => {
257
258
  });
258
259
  const multiWallet = useMultiWallet({
259
260
  isBridgeFlow,
260
- multiWalletOverride: (_k = settings.overrides) === null || _k === void 0 ? void 0 : _k.multiWallet,
261
- multiWalletSettings: (_l = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _l === void 0 ? void 0 : _l.multiWallet,
261
+ multiWalletOverride: (_l = settings.overrides) === null || _l === void 0 ? void 0 : _l.multiWallet,
262
+ multiWalletSettings: (_m = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _m === void 0 ? void 0 : _m.multiWallet,
262
263
  });
263
264
  const multiAsset = useMultiAsset({
264
- multiAssetOverride: (_m = settings.overrides) === null || _m === void 0 ? void 0 : _m.multiAsset,
265
- multiAssetSettings: (_o = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _o === void 0 ? void 0 : _o.enableMultiAsset,
265
+ multiAssetOverride: (_o = settings.overrides) === null || _o === void 0 ? void 0 : _o.multiAsset,
266
+ multiAssetSettings: (_p = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _p === void 0 ? void 0 : _p.enableMultiAsset,
266
267
  });
267
268
  const showFiat = useShowFiat({
268
- showFiatOverride: (_p = settings.overrides) === null || _p === void 0 ? void 0 : _p.showFiat,
269
- showFiatSettings: (_q = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _q === void 0 ? void 0 : _q.showFiat,
269
+ showFiatOverride: (_q = settings.overrides) === null || _q === void 0 ? void 0 : _q.showFiat,
270
+ showFiatSettings: (_r = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _r === void 0 ? void 0 : _r.showFiat,
270
271
  });
271
272
  // Used inside useVerifyOnAwaitingSignature. Is legacy and should be removed asap
272
273
  const [legacyIsVerifying, setLegacyIsVerifying] = useState(false);
@@ -341,7 +342,7 @@ const InnerDynamicContextProvider = (props) => {
341
342
  canHaveMultipleWalletsConnected: multiWallet || isBridgeFlow,
342
343
  connectedWallets,
343
344
  primaryWalletId,
344
- separateSmartWalletAndSigner: (_s = (_r = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _r === void 0 ? void 0 : _r.accountAbstraction) === null || _s === void 0 ? void 0 : _s.separateSmartWalletAndSigner,
345
+ separateSmartWalletAndSigner: (_t = (_s = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _s === void 0 ? void 0 : _s.accountAbstraction) === null || _t === void 0 ? void 0 : _t.separateSmartWalletAndSigner,
345
346
  setMultiWalletWidgetState,
346
347
  user: user || userWithMissingInfo,
347
348
  walletConnectorOptions,
@@ -447,8 +448,8 @@ const InnerDynamicContextProvider = (props) => {
447
448
  const { walletsForChainsMap } = useFetchWalletsForChainsMap(newToWeb3WalletChainMap);
448
449
  const { setCallback } = useCustomerCallbacks({
449
450
  callbacks: {
450
- onAuthSuccess: (_t = settings.events) === null || _t === void 0 ? void 0 : _t.onAuthSuccess,
451
- onUserProfileUpdate: (_u = settings.events) === null || _u === void 0 ? void 0 : _u.onUserProfileUpdate,
451
+ onAuthSuccess: (_u = settings.events) === null || _u === void 0 ? void 0 : _u.onAuthSuccess,
452
+ onUserProfileUpdate: (_v = settings.events) === null || _v === void 0 ? void 0 : _v.onUserProfileUpdate,
452
453
  },
453
454
  handleLogOut,
454
455
  isAuthenticated,
@@ -738,7 +739,7 @@ const InnerDynamicContextProvider = (props) => {
738
739
  isBridgeFlow,
739
740
  isMultiWalletEnabled: multiWallet,
740
741
  });
741
- return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { cspNonce: cspNonce, customerTheme: parseTheme(theme, ((_v = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _v === void 0 ? void 0 : _v.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsxs(ViewContextProvider, { initialViewType: initialViewType, children: [networkValidationMode === 'always' && jsx(UseNetworkValidation, {}), jsx(CaptchaContextProvider, { children: jsx(AccountExistsContextProvider, { children: jsx(WalletContextProvider, { children: jsx(VerificationProvider, { children: jsx(PasskeyContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(DynamicBridgeWidgetContextProvider, { children: jsx(OnrampContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsx(SendBalanceContextProvider, { children: jsx(WalletGroupContextProvider, { children: jsx(UserFieldEditorContextProvider, { children: jsx(ConnectWithOtpProvider, { children: jsx(PhantomRedirectContextProvider, { children: jsxs(SocialRedirectContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(OnrampWidget, {}), jsx(SyncAuthFlow, {}), jsx(WalletConnectorEvents, { connectorProps: connectorProps }), confirmationModal, jsx(ErrorBoundaryExclude, { children: children })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }));
742
+ return (jsx(I18nextProvider, { i18n: i18nSDKInstance, children: jsx(DynamicContext.Provider, { value: value, children: jsx(WalletBookContextProvider, { walletBook: walletBook, children: jsx(ThemeContextProvider, { cspNonce: cspNonce, customerTheme: parseTheme(theme, ((_w = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _w === void 0 ? void 0 : _w.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design, children: jsx(LoadingContextProvider, { children: jsxs(ViewContextProvider, { initialViewType: initialViewType, children: [networkValidationMode === 'always' && jsx(UseNetworkValidation, {}), jsx(CaptchaContextProvider, { children: jsx(AccountExistsContextProvider, { children: jsx(WalletContextProvider, { children: jsx(VerificationProvider, { children: jsx(PasskeyContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(DynamicBridgeWidgetContextProvider, { children: jsx(OnrampContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsx(SendBalanceContextProvider, { children: jsx(WalletGroupContextProvider, { children: jsx(UserFieldEditorContextProvider, { children: jsx(ConnectWithOtpProvider, { children: jsx(PhantomRedirectContextProvider, { children: jsxs(SocialRedirectContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(OnrampWidget, {}), jsx(SyncAuthFlow, {}), jsx(WalletConnectorEvents, { connectorProps: connectorProps }), confirmationModal, jsx(ErrorBoundaryExclude, { children: children })] }) }) }) }) }) }) }) }) }) }) }) }) }) }) })] }) }) }) }) }) }));
742
743
  };
743
744
  /** The context provider you need to have access too all of Dynamic's hooks */
744
745
  const DynamicContextProvider = (props) => {
@@ -123,6 +123,16 @@ export type SettingsOverrides = {
123
123
  * the SDK can react to this value changing (for ex, toggling a chain off).
124
124
  */
125
125
  stellarNetworks?: NetworksOverrides;
126
+ /**
127
+ * Allows overriding which aleo networks the SDK has access to.
128
+ * If an array is provided, it is used instead of whatever is obtained from dashboard configs.
129
+ * If a callback is passed, the callback will be called with the values obtained from dashboard, and
130
+ * it must return the network values that will be used.
131
+ *
132
+ * WARNING: this callback must be memoized as it will be used in a dependency array to ensure
133
+ * the SDK can react to this value changing (for ex, toggling a chain off).
134
+ */
135
+ aleoNetworks?: NetworksOverrides;
126
136
  /**
127
137
  * Allows overriding which bitcoin networks the SDK has access to.
128
138
  * If an array is provided, it is used instead of whatever is obtained from dashboard configs.