@dynamic-labs/sdk-react-core 1.1.0-alpha.1 → 1.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +12 -12
  5. package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
  6. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
  7. package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
  8. package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
  9. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
  10. package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
  11. package/src/lib/data/api.cjs +0 -13
  12. package/src/lib/data/api.d.ts +1 -2
  13. package/src/lib/data/api.js +1 -13
  14. package/src/lib/locale/en/translation.cjs +118 -1
  15. package/src/lib/locale/en/translation.d.ts +118 -1
  16. package/src/lib/locale/en/translation.js +118 -1
  17. package/src/lib/shared/consts/index.cjs +1 -0
  18. package/src/lib/shared/consts/index.js +1 -0
  19. package/src/lib/shared/types/index.d.ts +2 -1
  20. package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
  21. package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
  22. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -1
  23. package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
  24. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
  25. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
  26. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
  27. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
  28. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
  29. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -2
  30. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -2
  31. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  32. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  33. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
  34. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
  35. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
  36. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
  37. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
  38. package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
  39. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
  40. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
  41. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
  42. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
  43. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
  44. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
  45. package/src/lib/views/WalletList/data.d.ts +1 -1
  46. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
  47. package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
  48. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
  49. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
  50. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +4 -1
  51. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -1
  52. package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
  53. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
  54. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
  55. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
  56. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
  57. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,26 @@
1
1
 
2
+ ## [1.1.0-alpha.3](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.2...v1.1.0-alpha.3) (2023-12-19)
3
+
4
+
5
+ ### Features
6
+
7
+ * add Flow support in magic wallet connector ([#4158](https://github.com/dynamic-labs/DynamicAuth/issues/4158)) ([fbbaea7](https://github.com/dynamic-labs/DynamicAuth/commit/fbbaea76b36ceb693f6bd4f2404dfa1204e61492))
8
+ * add showDynamicUserProfile to DynamicContext ([#4214](https://github.com/dynamic-labs/DynamicAuth/issues/4214)) ([2aeb8e3](https://github.com/dynamic-labs/DynamicAuth/commit/2aeb8e3c45a3d9f87bd9196ea9b46927e02eb633))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * add shortname to braveevm to allow for lookups by name as well as key ([#4213](https://github.com/dynamic-labs/DynamicAuth/issues/4213)) ([969b089](https://github.com/dynamic-labs/DynamicAuth/commit/969b089be516fb57fcdc941f908c078998eb4ec0))
14
+ * solflare connect ([#4215](https://github.com/dynamic-labs/DynamicAuth/issues/4215)) ([9a4164e](https://github.com/dynamic-labs/DynamicAuth/commit/9a4164e53198f33ef7201cd4e1eff745a09e9701))
15
+ * wagmi attempt to connect to primary wallet first ([#4206](https://github.com/dynamic-labs/DynamicAuth/issues/4206)) ([9e5fc8e](https://github.com/dynamic-labs/DynamicAuth/commit/9e5fc8ef026628935ac32d3bb0c22bda35057e5d))
16
+
17
+ ## [1.1.0-alpha.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.1...v1.1.0-alpha.2) (2023-12-18)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * increase timeout when fetching wallet network ([#4197](https://github.com/dynamic-labs/DynamicAuth/issues/4197)) ([bd43d45](https://github.com/dynamic-labs/DynamicAuth/commit/bd43d452dccf36f68bd012e5737480599b93c3b5))
23
+
2
24
  ## [1.1.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.0...v1.1.0-alpha.1) (2023-12-15)
3
25
 
4
26
  ## [1.1.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.14...v1.1.0-alpha.0) (2023-12-12)
package/package.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.1.0-alpha.1";
5
+ var version = "1.1.0-alpha.3";
6
6
  var dependencies = {
7
- "@dynamic-labs/iconic": "0.1.45",
8
- "@dynamic-labs/sdk-api": "0.0.330",
7
+ "@dynamic-labs/iconic": "0.1.47",
8
+ "@dynamic-labs/sdk-api": "0.0.333",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "country-list": "2.3.0",
11
11
  formik: "2.2.9",
package/package.js CHANGED
@@ -1,7 +1,7 @@
1
- var version = "1.1.0-alpha.1";
1
+ var version = "1.1.0-alpha.3";
2
2
  var dependencies = {
3
- "@dynamic-labs/iconic": "0.1.45",
4
- "@dynamic-labs/sdk-api": "0.0.330",
3
+ "@dynamic-labs/iconic": "0.1.47",
4
+ "@dynamic-labs/sdk-api": "0.0.333",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
6
6
  "country-list": "2.3.0",
7
7
  formik: "2.2.9",
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "1.1.0-alpha.1",
3
+ "version": "1.1.0-alpha.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
7
7
  "directory": "packages/sdk-react-core"
8
8
  },
9
9
  "dependencies": {
10
- "@dynamic-labs/iconic": "0.1.45",
11
- "@dynamic-labs/sdk-api": "0.0.330",
10
+ "@dynamic-labs/iconic": "0.1.47",
11
+ "@dynamic-labs/sdk-api": "0.0.333",
12
12
  "@hcaptcha/react-hcaptcha": "1.4.4",
13
13
  "country-list": "2.3.0",
14
14
  "formik": "2.2.9",
@@ -17,15 +17,15 @@
17
17
  "react-focus-lock": "2.9.2",
18
18
  "react-i18next": "^13.2.0",
19
19
  "yup": "0.32.11",
20
- "@dynamic-labs/ethereum": "1.1.0-alpha.1",
21
- "@dynamic-labs/logger": "1.1.0-alpha.1",
22
- "@dynamic-labs/multi-wallet": "1.1.0-alpha.1",
23
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.1",
24
- "@dynamic-labs/types": "1.1.0-alpha.1",
25
- "@dynamic-labs/utils": "1.1.0-alpha.1",
26
- "@dynamic-labs/viem-utils": "1.1.0-alpha.1",
27
- "@dynamic-labs/wallet-book": "1.1.0-alpha.1",
28
- "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.1",
20
+ "@dynamic-labs/ethereum": "1.1.0-alpha.3",
21
+ "@dynamic-labs/logger": "1.1.0-alpha.3",
22
+ "@dynamic-labs/multi-wallet": "1.1.0-alpha.3",
23
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.3",
24
+ "@dynamic-labs/types": "1.1.0-alpha.3",
25
+ "@dynamic-labs/utils": "1.1.0-alpha.3",
26
+ "@dynamic-labs/viem-utils": "1.1.0-alpha.3",
27
+ "@dynamic-labs/wallet-book": "1.1.0-alpha.3",
28
+ "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.3",
29
29
  "eventemitter3": "5.0.1"
30
30
  },
31
31
  "devDependencies": {
@@ -1,9 +1,10 @@
1
1
  import { ReactNode, ComponentPropsWithoutRef } from 'react';
2
+ import { CopyKey } from '../../..';
2
3
  type Props = ComponentPropsWithoutRef<'button'> & {
3
4
  children: ReactNode;
4
5
  className?: string;
5
6
  onClick?: VoidFunction;
6
7
  textToCopy: string;
7
8
  };
8
- export declare const CopyButton: ({ children, className, textToCopy, onClick, }: Props) => JSX.Element;
9
+ export declare const CopyButton: ({ children, className, textToCopy, onClick, }: Props & CopyKey) => JSX.Element;
9
10
  export {};
@@ -72,7 +72,7 @@ var useMultiWalletWidgetState = require('../../utils/hooks/multiWallet/useMultiW
72
72
  var useMultiWallet = require('../../utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs');
73
73
  var useClearWalletConnectSessions = require('../../utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs');
74
74
  var useConnectWallet = require('../../utils/hooks/useConnectWallet/useConnectWallet.cjs');
75
- var useFetchNetworkConfigurations = require('../../utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs');
75
+ var useProcessNetworkConfigurations = require('../../utils/hooks/useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs');
76
76
  var useFetchWalletsForChainsMap = require('../../utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs');
77
77
  var useHandleUnlinkWallet = require('../../utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs');
78
78
  var usePrimaryWalletId = require('../../utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs');
@@ -178,10 +178,11 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
178
178
  // Set to true when a customer starts any auth verification process and set to false when it ends
179
179
  const [isVerificationInProgress, setIsVerificationInProgress] = useVerificationInProgress.useVerificationInProgress();
180
180
  const walletBook$1 = walletBook.useWalletBookCdn();
181
- const { configurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useFetchNetworkConfigurations.useFetchNetworkConfigurations({
181
+ const { configurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useProcessNetworkConfigurations.useProcessNetworkConfigurations({
182
182
  authToken: getAuthToken.getAuthToken(),
183
183
  environmentId,
184
184
  evmNetworks,
185
+ projectSettings,
185
186
  });
186
187
  const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
187
188
  appLogoUrl = appLogo || appLogoUrl;
@@ -68,7 +68,7 @@ import { useMultiWalletWidgetState } from '../../utils/hooks/multiWallet/useMult
68
68
  import { useMultiWallet } from '../../utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js';
69
69
  import { useClearWalletConnectSessions } from '../../utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js';
70
70
  import { useConnectWallet } from '../../utils/hooks/useConnectWallet/useConnectWallet.js';
71
- import { useFetchNetworkConfigurations } from '../../utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js';
71
+ import { useProcessNetworkConfigurations } from '../../utils/hooks/useProcessNetworkConfigurations/useProcessNetworkConfigurations.js';
72
72
  import { useFetchWalletsForChainsMap } from '../../utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js';
73
73
  import { useHandleUnlinkWallet } from '../../utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js';
74
74
  import { usePrimaryWalletId } from '../../utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js';
@@ -174,10 +174,11 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale, }) =>
174
174
  // Set to true when a customer starts any auth verification process and set to false when it ends
175
175
  const [isVerificationInProgress, setIsVerificationInProgress] = useVerificationInProgress();
176
176
  const walletBook = useWalletBookCdn();
177
- const { configurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useFetchNetworkConfigurations({
177
+ const { configurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useProcessNetworkConfigurations({
178
178
  authToken: getAuthToken(),
179
179
  environmentId,
180
180
  evmNetworks,
181
+ projectSettings,
181
182
  });
182
183
  const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
183
184
  appLogoUrl = appLogo || appLogoUrl;
@@ -11,7 +11,7 @@ const useDynamicContext = () => {
11
11
  if (context === undefined) {
12
12
  throw new Error('useDynamicContext must be used within a DynamicContextProvider');
13
13
  }
14
- const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, } = context;
14
+ const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, } = context;
15
15
  return {
16
16
  accountSwitchState,
17
17
  authMode,
@@ -46,6 +46,7 @@ const useDynamicContext = () => {
46
46
  setShowQrcodeModal,
47
47
  shadowDOMEnabled,
48
48
  showAuthFlow,
49
+ showDynamicUserProfile,
49
50
  showQrcodeModal,
50
51
  user,
51
52
  walletConnector,
@@ -1,3 +1,3 @@
1
1
  import { IDynamicContext } from './types';
2
- export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'isFullyConnected' | 'isVerificationInProgress' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setNetwork' | 'setPrimaryWallet' | 'setShowAuthFlow' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings'>;
2
+ export type UseDynamicContext = Pick<IDynamicContext, 'accountSwitchState' | 'authMode' | 'authToken' | 'awaitingSignatureState' | 'getNameService' | 'handleLogOut' | 'handleUnlinkWallet' | 'isAuthenticated' | 'isFullyConnected' | 'isVerificationInProgress' | 'loadingNetwork' | 'locale' | 'loginWithEmail' | 'multiWalletWidgetState' | 'network' | 'networkConfigurations' | 'primaryWallet' | 'qrcodeUri' | 'rpcProviders' | 'sdkHasLoaded' | 'setLogInWithEmail' | 'setMultiWalletWidgetState' | 'setNetwork' | 'setPrimaryWallet' | 'setShowAuthFlow' | 'setShowDynamicUserProfile' | 'setShowQrcodeModal' | 'shadowDOMEnabled' | 'showAuthFlow' | 'showQrcodeModal' | 'user' | 'walletConnector' | 'walletConnectorOptions' | 'bridgeChains' | 'bridgeChainsToConnect' | 'setShowBridgeWidget' | 'sendWagmiSettings' | 'showDynamicUserProfile'>;
3
3
  export declare const useDynamicContext: () => UseDynamicContext;
@@ -7,7 +7,7 @@ const useDynamicContext = () => {
7
7
  if (context === undefined) {
8
8
  throw new Error('useDynamicContext must be used within a DynamicContextProvider');
9
9
  }
10
- const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, } = context;
10
+ const { accountSwitchState, authMode, authToken, awaitingSignatureState, getNameService, handleLogOut, handleUnlinkWallet, isAuthenticated, isFullyConnected, isVerificationInProgress, loadingNetwork, locale, loginWithEmail, multiWalletWidgetState, network, networkConfigurations, qrcodeUri, rpcProviders, sdkHasLoaded, setLogInWithEmail, setMultiWalletWidgetState, setNetwork, setPrimaryWallet, setShowAuthFlow, setShowDynamicUserProfile, setShowQrcodeModal, shadowDOMEnabled, showAuthFlow, showQrcodeModal, user, walletConnector, walletConnectorOptions, bridgeChains, bridgeChainsToConnect, primaryWallet, setShowBridgeWidget, sendWagmiSettings, showDynamicUserProfile, } = context;
11
11
  return {
12
12
  accountSwitchState,
13
13
  authMode,
@@ -42,6 +42,7 @@ const useDynamicContext = () => {
42
42
  setShowQrcodeModal,
43
43
  shadowDOMEnabled,
44
44
  showAuthFlow,
45
+ showDynamicUserProfile,
45
46
  showQrcodeModal,
46
47
  user,
47
48
  walletConnector,
@@ -295,18 +295,6 @@ const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalle
295
295
  return undefined;
296
296
  }
297
297
  });
298
- const fetchNetworkSettings = (environmentId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
299
- try {
300
- const res = yield sdkApi().getNetworksConfigurationByEnvId({
301
- environmentId,
302
- });
303
- return res;
304
- }
305
- catch (e) {
306
- logger.logger.error(e);
307
- return undefined;
308
- }
309
- });
310
298
  const fetchProjectSettings = (environmentId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
311
299
  try {
312
300
  const res = yield sdkApi().getEnvironmentSettings({
@@ -534,7 +522,6 @@ exports.completePasskeyRecovery = completePasskeyRecovery;
534
522
  exports.createEmailVerification = createEmailVerification;
535
523
  exports.createTurnkeyEvmEmbeddedWallet = createTurnkeyEvmEmbeddedWallet;
536
524
  exports.createVisit = createVisit;
537
- exports.fetchNetworkSettings = fetchNetworkSettings;
538
525
  exports.fetchNonce = fetchNonce;
539
526
  exports.fetchProjectSettings = fetchProjectSettings;
540
527
  exports.getEmailProvider = getEmailProvider;
@@ -1,4 +1,4 @@
1
- import { ProjectSettings, UserFields, NetworkConfigurationResponse, ChainEnum, UpdateSelfResponse, WalletProviderEnum, AuthModeEnum, EmailVerificationCreateResponse, VerifyResponse, OauthRequest, OauthResultRequest, ProviderEnum, OnrampConfiguration, EmailProviderResponse, OauthResultResponse, PasskeyRegistrationCredential } from '@dynamic-labs/sdk-api';
1
+ import { ProjectSettings, UserFields, ChainEnum, UpdateSelfResponse, WalletProviderEnum, AuthModeEnum, EmailVerificationCreateResponse, VerifyResponse, OauthRequest, OauthResultRequest, ProviderEnum, OnrampConfiguration, EmailProviderResponse, OauthResultResponse, PasskeyRegistrationCredential } from '@dynamic-labs/sdk-api';
2
2
  import { AuthModeType, VerifyWallet } from '../shared/types';
3
3
  export declare const fetchNonce: (environmentId: string) => Promise<string | undefined>;
4
4
  export declare const getEmailProvider: ({ email, environmentId, }: {
@@ -49,7 +49,6 @@ export declare const createVisit: ({ authMode, chain, environmentId, walletProvi
49
49
  walletProvider: string;
50
50
  }) => Promise<void | undefined>;
51
51
  export declare const verifyWallet: (environmentId: string, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, }: VerifyWallet) => Promise<string | undefined>;
52
- export declare const fetchNetworkSettings: (environmentId: string) => Promise<NetworkConfigurationResponse[] | undefined>;
53
52
  export declare const fetchProjectSettings: (environmentId: string) => Promise<ProjectSettings | undefined>;
54
53
  export declare const updateUserProfileFields: (jwt: string | undefined, environmentId: string, fields: UserFields) => Promise<UpdateSelfResponse>;
55
54
  export declare const getOauthLoginUrl: (environmentId: string, providerType: ProviderEnum, userJwt: string) => Promise<string | undefined>;
@@ -291,18 +291,6 @@ const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalle
291
291
  return undefined;
292
292
  }
293
293
  });
294
- const fetchNetworkSettings = (environmentId) => __awaiter(void 0, void 0, void 0, function* () {
295
- try {
296
- const res = yield sdkApi().getNetworksConfigurationByEnvId({
297
- environmentId,
298
- });
299
- return res;
300
- }
301
- catch (e) {
302
- logger.error(e);
303
- return undefined;
304
- }
305
- });
306
294
  const fetchProjectSettings = (environmentId) => __awaiter(void 0, void 0, void 0, function* () {
307
295
  try {
308
296
  const res = yield sdkApi().getEnvironmentSettings({
@@ -526,4 +514,4 @@ const getUserPasskeys = ({ userJwt, environmentId, }) => __awaiter(void 0, void
526
514
  }
527
515
  });
528
516
 
529
- export { completePasskeyRecovery, createEmailVerification, createTurnkeyEvmEmbeddedWallet, createVisit, fetchNetworkSettings, fetchNonce, fetchProjectSettings, getEmailProvider, getOAuthResult, getOnrampProviders, getUserPasskeys, initPasskeyRecovery, linkWallet, mapAuthModeTypeToEnum, mapChainToChainEnum, mapProviderToProviderEnum, mergeUserAccounts, retryEmailVerification, revokeSession, sendDynamicProps, signInOAuth, signInWithEmailVerification, transferWallet, unlinkOAuth, unlinkWallet, updateUserProfileFields, verifyEmail, verifyOAuth, verifyWallet };
517
+ export { completePasskeyRecovery, createEmailVerification, createTurnkeyEvmEmbeddedWallet, createVisit, fetchNonce, fetchProjectSettings, getEmailProvider, getOAuthResult, getOnrampProviders, getUserPasskeys, initPasskeyRecovery, linkWallet, mapAuthModeTypeToEnum, mapChainToChainEnum, mapProviderToProviderEnum, mergeUserAccounts, retryEmailVerification, revokeSession, sendDynamicProps, signInOAuth, signInWithEmailVerification, transferWallet, unlinkOAuth, unlinkWallet, updateUserProfileFields, verifyEmail, verifyOAuth, verifyWallet };
@@ -58,6 +58,18 @@ const translation = {
58
58
  title: 'Connect to {{appName}}',
59
59
  },
60
60
  },
61
+ /**
62
+ * @description copy keys for Dynamic Captcha
63
+ * @default
64
+ * {
65
+ verify_user_subtitle: 'We need to quickly verify you’re human before we proceed.',
66
+ verify_user_title: "Let's verify you're human",
67
+ }
68
+ */
69
+ dyn_captcha: {
70
+ verify_user_subtitle: 'We need to quickly verify you’re human before we proceed.',
71
+ verify_user_title: "Let's verify you're human",
72
+ },
61
73
  /**
62
74
  * @description copy keys for chainalysis blocked wallet view
63
75
  * @default
@@ -118,6 +130,8 @@ const translation = {
118
130
  error_message: 'This network is not available, please update.',
119
131
  title: 'Update Network',
120
132
  },
133
+ update_email_tooltip:
134
+ 'This email is tied to your wallet so cannot be updated',
121
135
  }
122
136
  */
123
137
  dyn_collect_user_data: {
@@ -167,6 +181,7 @@ const translation = {
167
181
  error_message: 'This network is not available, please update.',
168
182
  title: 'Update Network',
169
183
  },
184
+ update_email_tooltip: 'This email is tied to your wallet so cannot be updated',
170
185
  },
171
186
  /**
172
187
  * @description copy keys for email verification view after email logging in with magiclink
@@ -270,6 +285,12 @@ const translation = {
270
285
  wallet_list: {
271
286
  button_only: 'Continue with a wallet',
272
287
  },
288
+ wrong_social_account: {
289
+ retry_button: 'Try again',
290
+ retry_title: 'Please connect with: ',
291
+ subtitle: 'You must connect with the same account you originally signed in with.',
292
+ title: 'Whoops. Wrong Account',
293
+ },
273
294
  }
274
295
  */
275
296
  dyn_login: {
@@ -315,6 +336,12 @@ const translation = {
315
336
  wallet_list: {
316
337
  button_only: 'Continue with a wallet',
317
338
  },
339
+ wrong_social_account: {
340
+ retry_button: 'Try again',
341
+ retry_title: 'Please connect with: ',
342
+ subtitle: 'You must connect with the same account you originally signed in with.',
343
+ title: 'Whoops. Wrong Account',
344
+ },
318
345
  },
319
346
  /**
320
347
  * @description copy keys for Dynamic manage passkeys view which are used inside dynamic widget
@@ -356,14 +383,21 @@ const translation = {
356
383
  * {
357
384
  cancel_button: "No, I'll use a different email",
358
385
  confirm_button: 'Yes, link to existing account',
386
+ errors: {
387
+ merge_error: 'Something went wrong, please try again.',
388
+ },
359
389
  existing_account: 'An account already exists that uses',
360
390
  existing_account_trail: 'email.',
361
391
  title: 'Would you like to link this wallet to this existing account?',
392
+ },
362
393
  }
363
394
  */
364
395
  dyn_merge_user_accounts: {
365
396
  cancel_button: "No, I'll use a different email",
366
397
  confirm_button: 'Yes, link to existing account',
398
+ errors: {
399
+ merge_error: 'Something went wrong, please try again.',
400
+ },
367
401
  existing_account: 'An account already exists that uses',
368
402
  existing_account_trail: 'email.',
369
403
  title: 'Would you like to link this wallet to this existing account?',
@@ -557,7 +591,7 @@ const translation = {
557
591
  'To complete this process, ensure you are using the same device/browser.',
558
592
  start_button: 'Send me an email',
559
593
  title: 'Initiate Request',
560
- },`
594
+ },
561
595
  }
562
596
  */
563
597
  dyn_passkey_recovery: {
@@ -581,6 +615,80 @@ const translation = {
581
615
  title: 'Initiate Request',
582
616
  },
583
617
  },
618
+ /**
619
+ * @description copy keys for Dynamic pending wallet connection
620
+ * @default
621
+ * {
622
+ mobile: 'Click connect in your mobile wallet',
623
+ computer: 'Click connect in your wallet popup',
624
+ }
625
+ */
626
+ dyn_pending_connection: {
627
+ mobile: 'Click connect in your mobile wallet',
628
+ computer: 'Click connect in your wallet popup',
629
+ },
630
+ /**
631
+ * @description copy keys for Dynamic pending signature, we have overrides for phantom ledger which does not support message signing.
632
+ * @default
633
+ * {
634
+ click_to_sign: 'Click to Sign',
635
+ note: 'Note: ',
636
+ phantom_ledger_sign: "Click sign in your wallet to confirm you own this wallet (this doesn't cost gas).",
637
+ phantom_ledger_warning: "Ledger with Phantom doesn't support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more.",
638
+ regular_sign_description: 'Click sign-in in your wallet to confirm you own this wallet.',
639
+ }
640
+ */
641
+ dyn_pending_signature: {
642
+ click_to_sign: 'Click to Sign',
643
+ note: 'Note: ',
644
+ phantom_ledger_sign: "Click sign in your wallet to confirm you own this wallet (this doesn't cost gas).",
645
+ phantom_ledger_warning: "Ledger with Phantom doesn't support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more.",
646
+ regular_sign_description: 'Click sign-in in your wallet to confirm you own this wallet.',
647
+ },
648
+ /**
649
+ * @description copy keys for Dynamic QR code Wallet Connection Pop-Up
650
+ * @default
651
+ * {
652
+ copy_button: 'Copy QR URI',
653
+ open_button: 'Open {{wallet}} App',
654
+ scan_title: "Scan this QR code from your mobile wallet or phone's camera to connect.",
655
+ wallet_not_installed: {
656
+ browser_install: 'Install {{browser}} extension',
657
+ install: 'Install {{wallet}} extension to connect',
658
+ refresh: 'Refresh the page once installed',
659
+ select: 'Select from your preferred options below:',
660
+ },
661
+ }
662
+ */
663
+ dyn_qr_code: {
664
+ copy_button: 'Copy QR URI',
665
+ open_button: 'Open {{wallet}} App',
666
+ scan_title: "Scan this QR code from your mobile wallet or phone's camera to connect.",
667
+ wallet_not_installed: {
668
+ browser_install: 'Install {{browser}} extension',
669
+ install: 'Install {{wallet}} extension to connect',
670
+ refresh: 'Refresh the page once installed',
671
+ select: 'Select from your preferred options below:',
672
+ },
673
+ },
674
+ /**
675
+ * @description copy keys for Dynamic wallet locked/disconnected
676
+ * @default
677
+ * {
678
+ connect_continue: 'Connect your wallet to continue',
679
+ title: 'Welcome back',
680
+ subtitle: "We couldn't connect to your wallet. Click connect to retry the connection ",
681
+ connect: 'Connect wallet',
682
+ logout: 'Log out',
683
+ }
684
+ */
685
+ dyn_wallet_locked: {
686
+ connect_continue: 'Connect your wallet to continue',
687
+ title: 'Welcome back',
688
+ subtitle: "We couldn't connect to your wallet. Click connect to retry the connection ",
689
+ connect: 'Connect wallet',
690
+ logout: 'Log out',
691
+ },
584
692
  /**
585
693
  * @description copy keys for passkeys creation flow for existent embedded wallets
586
694
  * @default
@@ -934,12 +1042,21 @@ const translation = {
934
1042
  * @default
935
1043
  * {
936
1044
  sign: {
1045
+ spinner: {
1046
+ cancel: 'Cancel',
1047
+ confirm_transfer:
1048
+ 'Sign the message to confirm transferring this wallet to this account.',
1049
+ },
937
1050
  title: 'Sign to confirm transfer',
938
1051
  },
939
1052
  }
940
1053
  */
941
1054
  dyn_wallet_transfer: {
942
1055
  sign: {
1056
+ spinner: {
1057
+ cancel: 'Cancel',
1058
+ confirm_transfer: 'Sign the message to confirm transferring this wallet to this account.',
1059
+ },
943
1060
  title: 'Sign to confirm transfer',
944
1061
  },
945
1062
  },
@@ -53,6 +53,18 @@ export declare const translation: {
53
53
  title: string;
54
54
  };
55
55
  };
56
+ /**
57
+ * @description copy keys for Dynamic Captcha
58
+ * @default
59
+ * {
60
+ verify_user_subtitle: 'We need to quickly verify you’re human before we proceed.',
61
+ verify_user_title: "Let's verify you're human",
62
+ }
63
+ */
64
+ dyn_captcha: {
65
+ verify_user_subtitle: string;
66
+ verify_user_title: string;
67
+ };
56
68
  /**
57
69
  * @description copy keys for chainalysis blocked wallet view
58
70
  * @default
@@ -113,6 +125,8 @@ export declare const translation: {
113
125
  error_message: 'This network is not available, please update.',
114
126
  title: 'Update Network',
115
127
  },
128
+ update_email_tooltip:
129
+ 'This email is tied to your wallet so cannot be updated',
116
130
  }
117
131
  */
118
132
  dyn_collect_user_data: {
@@ -162,6 +176,7 @@ export declare const translation: {
162
176
  error_message: string;
163
177
  title: string;
164
178
  };
179
+ update_email_tooltip: string;
165
180
  };
166
181
  /**
167
182
  * @description copy keys for email verification view after email logging in with magiclink
@@ -265,6 +280,12 @@ export declare const translation: {
265
280
  wallet_list: {
266
281
  button_only: 'Continue with a wallet',
267
282
  },
283
+ wrong_social_account: {
284
+ retry_button: 'Try again',
285
+ retry_title: 'Please connect with: ',
286
+ subtitle: 'You must connect with the same account you originally signed in with.',
287
+ title: 'Whoops. Wrong Account',
288
+ },
268
289
  }
269
290
  */
270
291
  dyn_login: {
@@ -310,6 +331,12 @@ export declare const translation: {
310
331
  wallet_list: {
311
332
  button_only: string;
312
333
  };
334
+ wrong_social_account: {
335
+ retry_button: string;
336
+ retry_title: string;
337
+ subtitle: string;
338
+ title: string;
339
+ };
313
340
  };
314
341
  /**
315
342
  * @description copy keys for Dynamic manage passkeys view which are used inside dynamic widget
@@ -351,14 +378,21 @@ export declare const translation: {
351
378
  * {
352
379
  cancel_button: "No, I'll use a different email",
353
380
  confirm_button: 'Yes, link to existing account',
381
+ errors: {
382
+ merge_error: 'Something went wrong, please try again.',
383
+ },
354
384
  existing_account: 'An account already exists that uses',
355
385
  existing_account_trail: 'email.',
356
386
  title: 'Would you like to link this wallet to this existing account?',
387
+ },
357
388
  }
358
389
  */
359
390
  dyn_merge_user_accounts: {
360
391
  cancel_button: string;
361
392
  confirm_button: string;
393
+ errors: {
394
+ merge_error: string;
395
+ };
362
396
  existing_account: string;
363
397
  existing_account_trail: string;
364
398
  title: string;
@@ -552,7 +586,7 @@ export declare const translation: {
552
586
  'To complete this process, ensure you are using the same device/browser.',
553
587
  start_button: 'Send me an email',
554
588
  title: 'Initiate Request',
555
- },`
589
+ },
556
590
  }
557
591
  */
558
592
  dyn_passkey_recovery: {
@@ -576,6 +610,80 @@ export declare const translation: {
576
610
  title: string;
577
611
  };
578
612
  };
613
+ /**
614
+ * @description copy keys for Dynamic pending wallet connection
615
+ * @default
616
+ * {
617
+ mobile: 'Click connect in your mobile wallet',
618
+ computer: 'Click connect in your wallet popup',
619
+ }
620
+ */
621
+ dyn_pending_connection: {
622
+ mobile: string;
623
+ computer: string;
624
+ };
625
+ /**
626
+ * @description copy keys for Dynamic pending signature, we have overrides for phantom ledger which does not support message signing.
627
+ * @default
628
+ * {
629
+ click_to_sign: 'Click to Sign',
630
+ note: 'Note: ',
631
+ phantom_ledger_sign: "Click sign in your wallet to confirm you own this wallet (this doesn't cost gas).",
632
+ phantom_ledger_warning: "Ledger with Phantom doesn't support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more.",
633
+ regular_sign_description: 'Click sign-in in your wallet to confirm you own this wallet.',
634
+ }
635
+ */
636
+ dyn_pending_signature: {
637
+ click_to_sign: string;
638
+ note: string;
639
+ phantom_ledger_sign: string;
640
+ phantom_ledger_warning: string;
641
+ regular_sign_description: string;
642
+ };
643
+ /**
644
+ * @description copy keys for Dynamic QR code Wallet Connection Pop-Up
645
+ * @default
646
+ * {
647
+ copy_button: 'Copy QR URI',
648
+ open_button: 'Open {{wallet}} App',
649
+ scan_title: "Scan this QR code from your mobile wallet or phone's camera to connect.",
650
+ wallet_not_installed: {
651
+ browser_install: 'Install {{browser}} extension',
652
+ install: 'Install {{wallet}} extension to connect',
653
+ refresh: 'Refresh the page once installed',
654
+ select: 'Select from your preferred options below:',
655
+ },
656
+ }
657
+ */
658
+ dyn_qr_code: {
659
+ copy_button: string;
660
+ open_button: string;
661
+ scan_title: string;
662
+ wallet_not_installed: {
663
+ browser_install: string;
664
+ install: string;
665
+ refresh: string;
666
+ select: string;
667
+ };
668
+ };
669
+ /**
670
+ * @description copy keys for Dynamic wallet locked/disconnected
671
+ * @default
672
+ * {
673
+ connect_continue: 'Connect your wallet to continue',
674
+ title: 'Welcome back',
675
+ subtitle: "We couldn't connect to your wallet. Click connect to retry the connection ",
676
+ connect: 'Connect wallet',
677
+ logout: 'Log out',
678
+ }
679
+ */
680
+ dyn_wallet_locked: {
681
+ connect_continue: string;
682
+ title: string;
683
+ subtitle: string;
684
+ connect: string;
685
+ logout: string;
686
+ };
579
687
  /**
580
688
  * @description copy keys for passkeys creation flow for existent embedded wallets
581
689
  * @default
@@ -929,12 +1037,21 @@ export declare const translation: {
929
1037
  * @default
930
1038
  * {
931
1039
  sign: {
1040
+ spinner: {
1041
+ cancel: 'Cancel',
1042
+ confirm_transfer:
1043
+ 'Sign the message to confirm transferring this wallet to this account.',
1044
+ },
932
1045
  title: 'Sign to confirm transfer',
933
1046
  },
934
1047
  }
935
1048
  */
936
1049
  dyn_wallet_transfer: {
937
1050
  sign: {
1051
+ spinner: {
1052
+ cancel: string;
1053
+ confirm_transfer: string;
1054
+ };
938
1055
  title: string;
939
1056
  };
940
1057
  };