@dynamic-labs/sdk-react-core 3.0.0-alpha.58 → 3.0.0-alpha.59

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 (31) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +11 -12
  5. package/src/index.cjs +2 -1
  6. package/src/index.d.ts +1 -1
  7. package/src/index.js +1 -1
  8. package/src/lib/context/DynamicContext/hooks/useSelectedWalletConnector/useSelectedWalletConnector.d.ts +1 -1
  9. package/src/lib/context/UserWalletsContext/UserWalletsContext.d.ts +1 -1
  10. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  11. package/src/lib/locale/en/translation.cjs +42 -0
  12. package/src/lib/locale/en/translation.d.ts +42 -0
  13. package/src/lib/locale/en/translation.js +42 -0
  14. package/src/lib/styles/index.shadow.cjs +1 -1
  15. package/src/lib/styles/index.shadow.js +1 -1
  16. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -0
  17. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -0
  18. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
  19. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +2 -2
  20. package/src/lib/views/GlobalWalletInfoView/GlobalWalletInfoView.cjs +34 -0
  21. package/src/lib/views/GlobalWalletInfoView/GlobalWalletInfoView.d.ts +3 -0
  22. package/src/lib/views/GlobalWalletInfoView/GlobalWalletInfoView.js +29 -0
  23. package/src/lib/views/viewToComponentMap.cjs +2 -0
  24. package/src/lib/views/viewToComponentMap.d.ts +1 -0
  25. package/src/lib/views/viewToComponentMap.js +2 -0
  26. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletTypes.d.ts +31 -0
  27. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.cjs +84 -95
  28. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/GlobalWalletView.js +86 -97
  29. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/scanner/GlobalWalletScanner.cjs +54 -0
  30. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/scanner/GlobalWalletScanner.d.ts +7 -0
  31. package/src/lib/widgets/DynamicWidget/views/GlobalWalletView/scanner/GlobalWalletScanner.js +49 -0
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ ## [3.0.0-alpha.59](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.58...v3.0.0-alpha.59) (2024-09-05)
3
+
4
+
5
+ ### Features
6
+
7
+ * global wallet mobile scanner ([#6801](https://github.com/dynamic-labs/DynamicAuth/issues/6801)) ([8d10661](https://github.com/dynamic-labs/DynamicAuth/commit/8d106615105988f4019f7a320961e94fbe35f6dc))
8
+
2
9
  ## [3.0.0-alpha.58](https://github.com/dynamic-labs/DynamicAuth/compare/v3.0.0-alpha.57...v3.0.0-alpha.58) (2024-09-05)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.0.0-alpha.58";
6
+ var version = "3.0.0-alpha.59";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.526",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "3.0.0-alpha.58";
2
+ var version = "3.0.0-alpha.59";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.526",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "3.0.0-alpha.58",
3
+ "version": "3.0.0-alpha.59",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,17 +17,16 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/global-wallet": "3.0.0-alpha.58",
21
- "@dynamic-labs/iconic": "3.0.0-alpha.58",
22
- "@dynamic-labs/logger": "3.0.0-alpha.58",
23
- "@dynamic-labs/message-transport": "3.0.0-alpha.58",
24
- "@dynamic-labs/multi-wallet": "3.0.0-alpha.58",
25
- "@dynamic-labs/rpc-providers": "3.0.0-alpha.58",
26
- "@dynamic-labs/store": "3.0.0-alpha.58",
27
- "@dynamic-labs/types": "3.0.0-alpha.58",
28
- "@dynamic-labs/utils": "3.0.0-alpha.58",
29
- "@dynamic-labs/wallet-book": "3.0.0-alpha.58",
30
- "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.58",
20
+ "@dynamic-labs/iconic": "3.0.0-alpha.59",
21
+ "@dynamic-labs/logger": "3.0.0-alpha.59",
22
+ "@dynamic-labs/message-transport": "3.0.0-alpha.59",
23
+ "@dynamic-labs/multi-wallet": "3.0.0-alpha.59",
24
+ "@dynamic-labs/rpc-providers": "3.0.0-alpha.59",
25
+ "@dynamic-labs/store": "3.0.0-alpha.59",
26
+ "@dynamic-labs/types": "3.0.0-alpha.59",
27
+ "@dynamic-labs/utils": "3.0.0-alpha.59",
28
+ "@dynamic-labs/wallet-book": "3.0.0-alpha.59",
29
+ "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.59",
31
30
  "eventemitter3": "5.0.1"
32
31
  },
33
32
  "devDependencies": {
package/src/index.cjs CHANGED
@@ -157,7 +157,7 @@ var useMfa = require('./lib/utils/hooks/useMfa/useMfa.cjs');
157
157
  var useTokenBalances = require('./lib/utils/hooks/useTokenBalances/useTokenBalances.cjs');
158
158
  var useRefreshUser = require('./lib/utils/hooks/useRefreshUser/useRefreshUser.cjs');
159
159
  var useWalletOptions = require('./lib/utils/hooks/useWalletOptions/useWalletOptions.cjs');
160
- require('@dynamic-labs/types');
160
+ var useTelegramLogin = require('./lib/utils/hooks/useTelegramLogin/useTelegramLogin.cjs');
161
161
  var DynamicConnectButton = require('./lib/components/DynamicConnectButton/DynamicConnectButton.cjs');
162
162
  require('./lib/components/InlineWidget/InlineWidget.cjs');
163
163
  var IsBrowser = require('./lib/components/IsBrowser/IsBrowser.cjs');
@@ -277,5 +277,6 @@ exports.useMfa = useMfa.useMfa;
277
277
  exports.useTokenBalances = useTokenBalances.useTokenBalances;
278
278
  exports.useRefreshUser = useRefreshUser.useRefreshUser;
279
279
  exports.useWalletOptions = useWalletOptions.useWalletOptions;
280
+ exports.useTelegramLogin = useTelegramLogin.useTelegramLogin;
280
281
  exports.DynamicConnectButton = DynamicConnectButton.DynamicConnectButton;
281
282
  exports.IsBrowser = IsBrowser.IsBrowser;
package/src/index.d.ts CHANGED
@@ -108,7 +108,7 @@ export { FilterAndSortWallets, FilterBridgeChainsName, FilterChain, FilterWallet
108
108
  export {
109
109
  /** @deprecated */
110
110
  DynamicWidgetContextProvider, } from './lib/widgets/DynamicWidget/context';
111
- export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useWalletOptions, useSmartWallets, EmbeddedWalletVersion, } from './lib/utils/hooks';
111
+ export { useWalletItemActions, useAuthenticateConnectedUser, useSocialAccounts, useEmbeddedWallet, useEmbeddedWalletAuthenticator, usePasskeyRecovery, useEmbeddedReveal, useIsLoggedIn, useDynamicModals, useMfa, useTokenBalances, useSwitchWallet, useRpcProviders, useRefreshUser, useWalletOptions, useSmartWallets, EmbeddedWalletVersion, useTelegramLogin, } from './lib/utils/hooks';
112
112
  export { useUserUpdateRequest, useWalletConnectorEvent, } from './lib/utils/hooks';
113
113
  export { type VerifyOtp, useOtpVerificationRequest, } from './lib/utils/hooks/authenticationHooks/';
114
114
  export type { UpdateUserFieldsArg } from './lib/utils/hooks/';
package/src/index.js CHANGED
@@ -153,7 +153,7 @@ export { useMfa } from './lib/utils/hooks/useMfa/useMfa.js';
153
153
  export { useTokenBalances } from './lib/utils/hooks/useTokenBalances/useTokenBalances.js';
154
154
  export { useRefreshUser } from './lib/utils/hooks/useRefreshUser/useRefreshUser.js';
155
155
  export { useWalletOptions } from './lib/utils/hooks/useWalletOptions/useWalletOptions.js';
156
- import '@dynamic-labs/types';
156
+ export { useTelegramLogin } from './lib/utils/hooks/useTelegramLogin/useTelegramLogin.js';
157
157
  export { DynamicConnectButton } from './lib/components/DynamicConnectButton/DynamicConnectButton.js';
158
158
  import './lib/components/InlineWidget/InlineWidget.js';
159
159
  export { IsBrowser } from './lib/components/IsBrowser/IsBrowser.js';
@@ -4,7 +4,7 @@ type useSelectedWalletConnectorProps = {
4
4
  walletConnectorOptions: WalletOption[];
5
5
  };
6
6
  export declare const useSelectedWalletConnector: ({ walletConnectorOptions, }: useSelectedWalletConnectorProps) => {
7
- selectedWalletConnector: import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector | null;
7
+ selectedWalletConnector: import("dist/packages/wallet-connector-core/src").WalletConnectorCore.WalletConnector | null;
8
8
  setSelectedWalletConnectorKey: import("react").Dispatch<import("react").SetStateAction<string | null>>;
9
9
  };
10
10
  export {};
@@ -18,4 +18,4 @@ export declare const UserWalletsProvider: FC<PropsWithChildren>;
18
18
  /** Provides access to state and setters of the current user/session wallets array */
19
19
  export declare const useInternalUserWallets: () => UserWalletsContextType;
20
20
  /** Provides access to the current user/session wallets */
21
- export declare const useUserWallets: () => Wallet<import("@dynamic-labs/wallet-connector-core").WalletConnectorCore.WalletConnector>[];
21
+ export declare const useUserWallets: () => Wallet<import("dist/packages/wallet-connector-core/src").WalletConnectorCore.WalletConnector>[];
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { viewToComponentMap } from '../../../views/viewToComponentMap';
3
- export type ViewType = 'access-blocked' | 'select-hardware-wallet' | 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-no-wallet' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'login-with-sms-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'verify-email' | 'verify-sms' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'sandbox-maximum-threshold-reached' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'select-wallet-in-wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'merge-user-accounts-conflicts' | 'merge-user-accounts-with-same-email' | 'mfa-choose-device' | 'mfa-recovery' | 'mfa-secure-device' | 'mfa-secure-device-help' | 'mfa-verification' | 'mfa-display-backup-codes' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-add-email' | 'global-wallet-confirm' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'passkey-new-domain-detected' | 'embedded-reveal-view' | 'embedded-reveal-account-view' | 'embedded-wallet-auth-choice' | 'rename-passkey' | 'wallet-redirect-view' | 'create-password-view' | 'wallet-claim-intro' | 'farcaster-connect-view';
3
+ export type ViewType = 'access-blocked' | 'select-hardware-wallet' | 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-no-wallet' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-wallet-only' | 'login-with-email-verification' | 'login-with-sms-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'verify-email' | 'verify-sms' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'sandbox-maximum-threshold-reached' | 'multi-wallet-wallet-list' | 'wallet-sign' | 'wallet-used' | 'wallet-group' | 'select-wallet-in-wallet-group' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'wallet-locked-view' | 'social-wrong-account' | 'gate-blocked-wallet' | 'bridge-welcome' | 'bridge-summary' | 'bridge-next-wallet-connection' | 'account-exists' | 'merge-user-accounts' | 'merge-user-accounts-conflicts' | 'merge-user-accounts-with-same-email' | 'mfa-choose-device' | 'mfa-recovery' | 'mfa-secure-device' | 'mfa-secure-device-help' | 'mfa-verification' | 'mfa-display-backup-codes' | 'wallet-cannot-be-transferred' | 'passkey-intro' | 'passkey-recovery-add-email' | 'global-wallet-confirm' | 'global-wallet-info' | 'passkey-recovery-start' | 'passkey-recovery-bundle' | 'passkey-recovery-complete' | 'passkey-new-domain-detected' | 'embedded-reveal-view' | 'embedded-reveal-account-view' | 'embedded-wallet-auth-choice' | 'rename-passkey' | 'wallet-redirect-view' | 'create-password-view' | 'wallet-claim-intro' | 'farcaster-connect-view';
4
4
  export type ViewMapConstraint = Record<ViewType, FC<any>>;
5
5
  type ComponentProps<T extends FC<any>> = T extends FC<infer P> ? P : never;
6
6
  export type ViewMap = typeof viewToComponentMap;
@@ -874,7 +874,49 @@ const translation = {
874
874
  title: 'Settings',
875
875
  button_logout: 'Log out',
876
876
  },
877
+ /**
878
+ * @description copy keys for global wallet view
879
+ * @default
880
+ * {
881
+ connect_to_apps: 'Connect to apps',
882
+ scan_qr_code: 'Scan QR Code',
883
+ or: 'OR',
884
+ walletconnect_uri: 'WalletConnect URI',
885
+ the_dapp: 'the dApp',
886
+ this_app: 'this app',
887
+ confirm: {
888
+ title: 'Confirm Connection',
889
+ description: 'Are you sure you want to connect to {{name}}?',
890
+ cancel_button: 'Cancel',
891
+ connect_button: 'Connect',
892
+ },
893
+ banner: {
894
+ warning: 'There was an error connecting to {{name}}.',
895
+ success: 'Successfully connected to {{name}}.',
896
+ already_connected: 'You are already connected to {{name}}.',
897
+ expired:
898
+ 'The link you entered expired, please get a new URI from the app.',
899
+ bad_input:
900
+ 'Invalid URI. Please check below for how to find the valid URI.',
901
+ },
902
+ help: {
903
+ title: 'How do I find the URI code?',
904
+ step: {
905
+ 1: '1. Go to the website you want to connect to',
906
+ 2: '2. Locate the "Connect" or "Login" button',
907
+ 3: '3. Open WalletConnect from the list',
908
+ },
909
+ learn_more: 'Learn more about global wallets',
910
+ },
911
+ },
912
+ */
877
913
  global_wallet: {
914
+ connect_to_apps: 'Connect to apps',
915
+ scan_qr_code: 'Scan QR Code',
916
+ or: 'OR',
917
+ walletconnect_uri: 'WalletConnect URI',
918
+ the_dapp: 'the dApp',
919
+ this_app: 'this app',
878
920
  confirm: {
879
921
  title: 'Confirm Connection',
880
922
  description: 'Are you sure you want to connect to {{name}}?',
@@ -870,7 +870,49 @@ export declare const translation: {
870
870
  title: string;
871
871
  button_logout: string;
872
872
  };
873
+ /**
874
+ * @description copy keys for global wallet view
875
+ * @default
876
+ * {
877
+ connect_to_apps: 'Connect to apps',
878
+ scan_qr_code: 'Scan QR Code',
879
+ or: 'OR',
880
+ walletconnect_uri: 'WalletConnect URI',
881
+ the_dapp: 'the dApp',
882
+ this_app: 'this app',
883
+ confirm: {
884
+ title: 'Confirm Connection',
885
+ description: 'Are you sure you want to connect to {{name}}?',
886
+ cancel_button: 'Cancel',
887
+ connect_button: 'Connect',
888
+ },
889
+ banner: {
890
+ warning: 'There was an error connecting to {{name}}.',
891
+ success: 'Successfully connected to {{name}}.',
892
+ already_connected: 'You are already connected to {{name}}.',
893
+ expired:
894
+ 'The link you entered expired, please get a new URI from the app.',
895
+ bad_input:
896
+ 'Invalid URI. Please check below for how to find the valid URI.',
897
+ },
898
+ help: {
899
+ title: 'How do I find the URI code?',
900
+ step: {
901
+ 1: '1. Go to the website you want to connect to',
902
+ 2: '2. Locate the "Connect" or "Login" button',
903
+ 3: '3. Open WalletConnect from the list',
904
+ },
905
+ learn_more: 'Learn more about global wallets',
906
+ },
907
+ },
908
+ */
873
909
  global_wallet: {
910
+ connect_to_apps: string;
911
+ scan_qr_code: string;
912
+ or: string;
913
+ walletconnect_uri: string;
914
+ the_dapp: string;
915
+ this_app: string;
874
916
  confirm: {
875
917
  title: string;
876
918
  description: string;
@@ -870,7 +870,49 @@ const translation = {
870
870
  title: 'Settings',
871
871
  button_logout: 'Log out',
872
872
  },
873
+ /**
874
+ * @description copy keys for global wallet view
875
+ * @default
876
+ * {
877
+ connect_to_apps: 'Connect to apps',
878
+ scan_qr_code: 'Scan QR Code',
879
+ or: 'OR',
880
+ walletconnect_uri: 'WalletConnect URI',
881
+ the_dapp: 'the dApp',
882
+ this_app: 'this app',
883
+ confirm: {
884
+ title: 'Confirm Connection',
885
+ description: 'Are you sure you want to connect to {{name}}?',
886
+ cancel_button: 'Cancel',
887
+ connect_button: 'Connect',
888
+ },
889
+ banner: {
890
+ warning: 'There was an error connecting to {{name}}.',
891
+ success: 'Successfully connected to {{name}}.',
892
+ already_connected: 'You are already connected to {{name}}.',
893
+ expired:
894
+ 'The link you entered expired, please get a new URI from the app.',
895
+ bad_input:
896
+ 'Invalid URI. Please check below for how to find the valid URI.',
897
+ },
898
+ help: {
899
+ title: 'How do I find the URI code?',
900
+ step: {
901
+ 1: '1. Go to the website you want to connect to',
902
+ 2: '2. Locate the "Connect" or "Login" button',
903
+ 3: '3. Open WalletConnect from the list',
904
+ },
905
+ learn_more: 'Learn more about global wallets',
906
+ },
907
+ },
908
+ */
873
909
  global_wallet: {
910
+ connect_to_apps: 'Connect to apps',
911
+ scan_qr_code: 'Scan QR Code',
912
+ or: 'OR',
913
+ walletconnect_uri: 'WalletConnect URI',
914
+ the_dapp: 'the dApp',
915
+ this_app: 'this app',
874
916
  confirm: {
875
917
  title: 'Confirm Connection',
876
918
  description: 'Are you sure you want to connect to {{name}}?',