@talken/talkenkit 2.3.10 → 2.3.11

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 (84) hide show
  1. package/dist/__private__/index.d.ts +2 -2
  2. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthFlow.d.ts +83 -0
  3. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.css.d.ts +8 -0
  4. package/dist/components/ConnectOptions/AbcWaasAuth/AbcWaasAuthSections.d.ts +25 -0
  5. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasAuth.d.ts +65 -0
  6. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useAbcWaasSocial.d.ts +58 -0
  7. package/dist/components/ConnectOptions/AbcWaasAuth/hooks/useUserTypeDetection.d.ts +0 -0
  8. package/dist/components/ConnectOptions/AbcWaasAuth/index.d.ts +6 -0
  9. package/dist/components/ConnectOptions/AbcWaasAuth/types.d.ts +29 -0
  10. package/dist/components/ConnectOptions/ConnectDetails.d.ts +1 -1
  11. package/dist/components/ConnectOptions/ConnectOptionsModal.css.d.ts +4 -0
  12. package/dist/components/ConnectOptions/ConnectOptionsModal.d.ts +26 -0
  13. package/dist/components/ConnectOptions/ExternalWallets/EthereumWallet/EthereumWalletList.d.ts +35 -0
  14. package/dist/components/ConnectOptions/ExternalWallets/EthereumWallet/index.d.ts +6 -0
  15. package/dist/components/ConnectOptions/ExternalWallets/Popular/PopularWalletList.d.ts +37 -0
  16. package/dist/components/ConnectOptions/ExternalWallets/Popular/index.d.ts +6 -0
  17. package/dist/components/ConnectOptions/ExternalWallets/SolanaWallet/SolanaWalletList.d.ts +37 -0
  18. package/dist/components/ConnectOptions/ExternalWallets/SolanaWallet/index.d.ts +6 -0
  19. package/dist/components/ConnectOptions/ExternalWallets/WalletList.d.ts +94 -0
  20. package/dist/components/ConnectOptions/ExternalWallets/hooks/useWalletConnection.d.ts +78 -0
  21. package/dist/components/ConnectOptions/ExternalWallets/index.d.ts +12 -0
  22. package/dist/components/ConnectOptions/ExternalWallets/shared/index.d.ts +7 -0
  23. package/dist/components/ConnectOptions/ExternalWallets/shared/types.d.ts +136 -0
  24. package/dist/components/ConnectOptions/ExternalWallets/shared/utils.d.ts +68 -0
  25. package/dist/components/ConnectOptions/PinAuth/PinAuthFlow.d.ts +127 -0
  26. package/dist/components/ConnectOptions/PinAuth/hooks/index.d.ts +10 -0
  27. package/dist/components/ConnectOptions/PinAuth/hooks/usePinCreation.d.ts +92 -0
  28. package/dist/components/ConnectOptions/PinAuth/hooks/usePinVerification.d.ts +114 -0
  29. package/dist/components/ConnectOptions/PinAuth/hooks/useWalletGeneration.d.ts +93 -0
  30. package/dist/components/ConnectOptions/PinAuth/index.d.ts +23 -0
  31. package/dist/index.css +27 -298
  32. package/dist/index.d.ts +0 -4
  33. package/dist/index.js +5525 -6410
  34. package/dist/wallets/walletConnectors/abcWallet/abcBitcoinProvider.js +1 -1
  35. package/dist/wallets/walletConnectors/abcWallet/abcConnector.js +2 -2
  36. package/dist/wallets/walletConnectors/abcWallet/abcSolanaWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/abcWallet/abcWallet.js +3 -3
  38. package/dist/wallets/walletConnectors/abcWallet/api/index.js +4 -4
  39. package/dist/wallets/walletConnectors/abcWallet/index.js +20 -20
  40. package/dist/wallets/walletConnectors/berasigWallet/berasigWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  42. package/dist/wallets/walletConnectors/binanceWallet/binanceWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  44. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/chunk-24SQ562R.js +63 -0
  46. package/dist/wallets/walletConnectors/chunk-3UNSJDAS.js +63 -0
  47. package/dist/wallets/walletConnectors/chunk-6KUCZXJE.js +63 -0
  48. package/dist/wallets/walletConnectors/{chunk-34WMJDUY.js → chunk-75W4VLFA.js} +8 -7
  49. package/dist/wallets/walletConnectors/chunk-ASUECF4H.js +63 -0
  50. package/dist/wallets/walletConnectors/chunk-GLPRLW3S.js +63 -0
  51. package/dist/wallets/walletConnectors/chunk-GOPPX56D.js +63 -0
  52. package/dist/wallets/walletConnectors/chunk-I5V7LWJH.js +63 -0
  53. package/dist/wallets/walletConnectors/chunk-J4HQCVKX.js +63 -0
  54. package/dist/wallets/walletConnectors/chunk-PDWD3ZCR.js +63 -0
  55. package/dist/wallets/walletConnectors/chunk-PHD5KHRQ.js +63 -0
  56. package/dist/wallets/walletConnectors/chunk-PQJWUKUD.js +63 -0
  57. package/dist/wallets/walletConnectors/chunk-PZJYVPGG.js +63 -0
  58. package/dist/wallets/walletConnectors/chunk-Q5B5ICDI.js +63 -0
  59. package/dist/wallets/walletConnectors/chunk-RYXFFAB2.js +63 -0
  60. package/dist/wallets/walletConnectors/chunk-VXUJQQDI.js +63 -0
  61. package/dist/wallets/walletConnectors/chunk-WCPI7IUU.js +63 -0
  62. package/dist/wallets/walletConnectors/chunk-Z3WO2EBZ.js +63 -0
  63. package/dist/wallets/walletConnectors/chunk-ZADNKI5I.js +63 -0
  64. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  65. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  66. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  67. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  68. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  69. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  70. package/dist/wallets/walletConnectors/index.js +84 -84
  71. package/dist/wallets/walletConnectors/iopayWallet/iopayWallet.js +2 -2
  72. package/dist/wallets/walletConnectors/kaiaWallet/kaiaWallet.js +2 -2
  73. package/dist/wallets/walletConnectors/kaikasWallet/kaikasWallet.js +2 -2
  74. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  75. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  76. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  77. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  78. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  79. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  80. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  81. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  82. package/dist/wallets/walletConnectors/zealWallet/zealWallet.js +2 -2
  83. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  84. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { DesktopOptions } from '../components/ConnectOptions/DesktopOptions';
1
+ import { ConnectOptionsModal } from '../components/ConnectOptions/ConnectOptionsModal';
2
2
  import { MobileOptions } from '../components/ConnectOptions/MobileOptions';
3
3
  export declare const __private__: {
4
- DesktopOptions: typeof DesktopOptions;
4
+ ConnectOptionsModal: typeof ConnectOptionsModal;
5
5
  dialogContent: string;
6
6
  dialogContentMobile: string;
7
7
  MobileOptions: typeof MobileOptions;
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ /**
3
+ * Props for AbcWaasAuthFlow component
4
+ */
5
+ export interface AbcWaasAuthFlowProps {
6
+ /**
7
+ * Callback when PIN creation is required
8
+ * Triggered for:
9
+ * - New users after registration
10
+ * - Social login users without existing PIN
11
+ *
12
+ * @param loginData - ABC WaaS login response (access_token, uid, email, etc.)
13
+ */
14
+ onPinCreateRequired: (loginData: any) => void;
15
+ /**
16
+ * Callback when PIN verification is required
17
+ * Triggered for:
18
+ * - Existing users with stored PIN
19
+ * - Email/password login success
20
+ *
21
+ * @param loginData - ABC WaaS login response (access_token, uid, email, etc.)
22
+ */
23
+ onPinVerifyRequired: (loginData: any) => void;
24
+ /**
25
+ * Enable compact mode for mobile UI
26
+ * Simplifies layout and reduces visual complexity
27
+ *
28
+ * @default false
29
+ */
30
+ compact?: boolean;
31
+ /**
32
+ * Close callback for the parent modal
33
+ * Optional - only needed if flow can be closed independently
34
+ */
35
+ onClose?: () => void;
36
+ }
37
+ /**
38
+ * AbcWaasAuthFlow - Authentication Flow Orchestrator
39
+ *
40
+ * Manages the complete ABC WaaS authentication flow:
41
+ * - Email/password authentication
42
+ * - Social login (Google, Apple)
43
+ * - OTP verification
44
+ * - Password setup/confirmation
45
+ * - PIN flow triggering
46
+ *
47
+ * This component orchestrates between useAbcWaasAuth and useAbcWaasSocial hooks,
48
+ * and renders the UI via AbcWaasAuthSections.
49
+ *
50
+ * **Critical Security Features:**
51
+ * - Checks both pin_map AND enc_tokens before PIN verification
52
+ * - Prevents orphaned PIN entries from blocking wallet access
53
+ * - Ensures proper PIN flow routing for all user types
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * <AbcWaasAuthFlow
58
+ * onPinCreateRequired={(loginData) => {
59
+ * setAbcWaasLoginData(loginData);
60
+ * setIsPinCreateModalOpen(true);
61
+ * }}
62
+ * onPinVerifyRequired={(loginData) => {
63
+ * setAbcWaasLoginData(loginData);
64
+ * setIsPinVerifyModalOpen(true);
65
+ * }}
66
+ * compact={false}
67
+ * onClose={handleClose}
68
+ * />
69
+ * ```
70
+ *
71
+ * **Flow Diagram:**
72
+ * ```
73
+ * Email Submit → User Type Detection
74
+ * ├─ New User → OTP → Password Setup → PIN Create
75
+ * ├─ Existing (with password) → Password → PIN Verify
76
+ * └─ Existing (no password/code 619) → OTP → Password Setup → Login → PIN Verify
77
+ *
78
+ * Social Login (Google/Apple) → PIN Check
79
+ * ├─ Has PIN + Encrypted Data → PIN Verify
80
+ * └─ No PIN or No Data → PIN Create
81
+ * ```
82
+ */
83
+ export declare function AbcWaasAuthFlow({ onPinCreateRequired, onPinVerifyRequired, compact, }: AbcWaasAuthFlowProps): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare const container: string;
2
+ export declare const emailFormContainer: string;
3
+ export declare const emailInputStyle: string;
4
+ export declare const submitButtonStyle: string;
5
+ export declare const submitArrow: string;
6
+ export declare const socialButtonsContainer: string;
7
+ export declare const socialButtonStyle: string;
8
+ export declare const socialButtonText: string;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { AbcWaasStep } from './types';
3
+ export interface AbcWaasAuthSectionsProps {
4
+ abcWaasStep: AbcWaasStep;
5
+ abcWaasEmail: string;
6
+ abcWaasPassword: string;
7
+ abcWaasNewPassword: string;
8
+ abcWaasConfirmPassword: string;
9
+ abcWaasOtp: string;
10
+ abcWaasError: string;
11
+ isAbcWaasLoading: boolean;
12
+ compactModeEnabled: boolean;
13
+ handleEmailSubmit: (email: string) => Promise<void>;
14
+ handleSocialLogin: (provider: 'google' | 'apple') => Promise<void>;
15
+ handlePasswordSubmit: (e: React.FormEvent) => Promise<void>;
16
+ handleOtpSubmit: (e: React.FormEvent) => Promise<void>;
17
+ handlePasswordSetupSubmit: (e: React.FormEvent) => Promise<void>;
18
+ handlePasswordConfirmSubmit: (e: React.FormEvent) => Promise<void>;
19
+ handleAbcWaasBack: () => void;
20
+ setAbcWaasPassword: (value: string) => void;
21
+ setAbcWaasOtp: (value: string) => void;
22
+ setAbcWaasNewPassword: (value: string) => void;
23
+ setAbcWaasConfirmPassword: (value: string) => void;
24
+ }
25
+ export declare function AbcWaasAuthSections(props: AbcWaasAuthSectionsProps): React.JSX.Element;
@@ -0,0 +1,65 @@
1
+ import { AbcWaasStep } from '../types';
2
+ /**
3
+ * Hook return interface for ABC WaaS authentication
4
+ */
5
+ export interface UseAbcWaasAuthReturn {
6
+ step: AbcWaasStep;
7
+ email: string;
8
+ password: string;
9
+ newPassword: string;
10
+ confirmPassword: string;
11
+ otp: string;
12
+ isLoading: boolean;
13
+ error: string;
14
+ loginData: any;
15
+ setEmail: (email: string) => void;
16
+ setPassword: (password: string) => void;
17
+ setNewPassword: (password: string) => void;
18
+ setConfirmPassword: (password: string) => void;
19
+ setOtp: (otp: string) => void;
20
+ handleEmailSubmit: (email: string) => Promise<void>;
21
+ handlePasswordSubmit: (e: React.FormEvent) => Promise<void>;
22
+ handleOtpSubmit: (e: React.FormEvent) => Promise<void>;
23
+ handlePasswordSetupSubmit: (e: React.FormEvent) => Promise<void>;
24
+ handlePasswordConfirmSubmit: (e: React.FormEvent) => Promise<void>;
25
+ handleBack: () => void;
26
+ }
27
+ /**
28
+ * Props for useAbcWaasAuth hook
29
+ */
30
+ export interface UseAbcWaasAuthProps {
31
+ /** Callback when authentication succeeds (after password confirmation or login) */
32
+ onAuthSuccess?: (data: any) => void;
33
+ /** Callback when PIN is required (for PIN flow integration) */
34
+ onPinRequired?: (loginData: any) => void;
35
+ }
36
+ /**
37
+ * Custom hook for ABC WaaS authentication logic
38
+ *
39
+ * Manages the complete authentication flow including:
40
+ * - Email validation and user type detection (new vs existing)
41
+ * - Password-based login for existing users
42
+ * - OTP verification for new users
43
+ * - Password setup and confirmation for new users
44
+ * - Error handling and state transitions
45
+ *
46
+ * @example
47
+ * ```tsx
48
+ * const abcAuth = useAbcWaasAuth({
49
+ * onAuthSuccess: (loginData) => {
50
+ * console.log('Auth success', loginData);
51
+ * setIsPinCreateModalOpen(true);
52
+ * }
53
+ * });
54
+ *
55
+ * return (
56
+ * <AbcWaasAuthSections
57
+ * abcWaasStep={abcAuth.step}
58
+ * abcWaasEmail={abcAuth.email}
59
+ * handleEmailSubmit={abcAuth.handleEmailSubmit}
60
+ * {...otherProps}
61
+ * />
62
+ * );
63
+ * ```
64
+ */
65
+ export declare function useAbcWaasAuth(props?: UseAbcWaasAuthProps): UseAbcWaasAuthReturn;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Return type for useAbcWaasSocial hook
3
+ */
4
+ export interface UseAbcWaasSocialReturn {
5
+ /** Loading state for social login operations */
6
+ isLoading: boolean;
7
+ /** Error message from social login operations */
8
+ error: string;
9
+ /** Handle Google OAuth login flow */
10
+ handleGoogleLogin: () => Promise<void>;
11
+ /** Handle Apple OAuth login flow (not implemented) */
12
+ handleAppleLogin: () => Promise<void>;
13
+ }
14
+ /**
15
+ * Props for useAbcWaasSocial hook
16
+ */
17
+ export interface UseAbcWaasSocialProps {
18
+ /**
19
+ * Callback when social login succeeds and PIN is required
20
+ * @param loginData - Response from ABC WaaS social login (access_token, uid, email, etc.)
21
+ * @param email - User's email address from social provider
22
+ * @param hasPinStored - Whether user has existing PIN stored in localStorage
23
+ */
24
+ onPinRequired: (loginData: any, email: string, hasPinStored: boolean) => void;
25
+ /**
26
+ * Callback for setting email after successful login
27
+ * @param email - User's email address from social provider
28
+ */
29
+ onEmailSet?: (email: string) => void;
30
+ }
31
+ /**
32
+ * Custom hook for ABC WaaS social login (Google, Apple)
33
+ *
34
+ * Handles Google OAuth flow via AbcAuthService, manages login state,
35
+ * saves auth data to localStorage, and triggers PIN creation/verification flow.
36
+ *
37
+ * @example
38
+ * ```tsx
39
+ * const socialAuth = useAbcWaasSocial({
40
+ * onPinRequired: (loginData, email, hasPinStored) => {
41
+ * if (hasPinStored) {
42
+ * showPinVerifyModal();
43
+ * } else {
44
+ * showPinCreateModal();
45
+ * }
46
+ * },
47
+ * onEmailSet: (email) => setEmail(email),
48
+ * });
49
+ *
50
+ * <button onClick={socialAuth.handleGoogleLogin}>
51
+ * {socialAuth.isLoading ? 'Signing in...' : 'Sign in with Google'}
52
+ * </button>
53
+ * ```
54
+ *
55
+ * @param props - Hook configuration
56
+ * @returns Social login handlers and state
57
+ */
58
+ export declare function useAbcWaasSocial(props: UseAbcWaasSocialProps): UseAbcWaasSocialReturn;
@@ -0,0 +1,6 @@
1
+ export { AbcWaasAuthSections } from './AbcWaasAuthSections';
2
+ export type { AbcWaasAuthSectionsProps } from './AbcWaasAuthSections';
3
+ export { AbcWaasAuthFlow } from './AbcWaasAuthFlow';
4
+ export type { AbcWaasAuthFlowProps } from './AbcWaasAuthFlow';
5
+ export { AbcWaasStep } from './types';
6
+ export type { AbcWaasAuthState, WalletCreationProgress } from './types';
@@ -0,0 +1,29 @@
1
+ export declare enum AbcWaasStep {
2
+ Main = "MAIN",
3
+ Password = "PASSWORD",
4
+ Otp = "OTP",
5
+ OtpPasswordSetup = "OTP_PASSWORD_SETUP",
6
+ PasswordSetup = "PASSWORD_SETUP",
7
+ PasswordConfirm = "PASSWORD_CONFIRM"
8
+ }
9
+ export interface AbcWaasAuthFlowProps {
10
+ onClose: () => void;
11
+ onSuccess?: () => void;
12
+ }
13
+ export interface AbcWaasAuthState {
14
+ step: AbcWaasStep;
15
+ email: string;
16
+ password: string;
17
+ newPassword: string;
18
+ confirmPassword: string;
19
+ otp: string;
20
+ pin: string;
21
+ userType: 'new' | 'existing';
22
+ isLoading: boolean;
23
+ error: string;
24
+ loginData: any | null;
25
+ }
26
+ export interface WalletCreationProgress {
27
+ label: string;
28
+ status: 'pending' | 'active' | 'completed';
29
+ }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { type WalletConnector } from '../../wallets/useWalletConnectors';
3
- import { WalletStep } from './DesktopOptions';
3
+ import { WalletStep } from './ConnectOptionsModal';
4
4
  export declare function GetDetail({ getWalletDownload, compactModeEnabled, }: {
5
5
  getWalletDownload: (walletId: string) => void;
6
6
  compactModeEnabled: boolean;
@@ -0,0 +1,4 @@
1
+ export declare const QRCodeBackgroundClassName: string;
2
+ export declare const ScrollClassName: string;
3
+ export declare const sidebar: string;
4
+ export declare const sidebarCompactMode: string;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ export declare enum WalletStep {
3
+ None = "NONE",
4
+ LearnCompact = "LEARN_COMPACT",
5
+ Get = "GET",
6
+ Connect = "CONNECT",
7
+ DownloadOptions = "DOWNLOAD_OPTIONS",
8
+ Download = "DOWNLOAD",
9
+ InstructionsMobile = "INSTRUCTIONS_MOBILE",
10
+ InstructionsDesktop = "INSTRUCTIONS_DESKTOP",
11
+ InstructionsExtension = "INSTRUCTIONS_EXTENSION"
12
+ }
13
+ export interface ConnectOptionsModalProps {
14
+ onClose: () => void;
15
+ solanaWallets?: Record<string, any[]>;
16
+ onSolanaWalletClick?: (walletName: string) => void;
17
+ connectingSolanaWallet?: string | null;
18
+ isSolanaConnecting?: boolean;
19
+ /**
20
+ * Enable compact mode for mobile
21
+ * Hides external wallets and simplifies UI
22
+ * @default false
23
+ */
24
+ compact?: boolean;
25
+ }
26
+ export declare function ConnectOptionsModal({ onClose, solanaWallets, onSolanaWalletClick, connectingSolanaWallet, isSolanaConnecting, compact, }: ConnectOptionsModalProps): React.JSX.Element;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * EthereumWalletList Component
3
+ *
4
+ * Displays Ethereum (EVM) wallet list with recent wallet prioritization
5
+ *
6
+ * @module ExternalWallets/EthereumWallet
7
+ */
8
+ import React from 'react';
9
+ import type { EthereumWalletListProps } from '../shared/types';
10
+ /**
11
+ * Ethereum wallet list component
12
+ *
13
+ * Features:
14
+ * - Displays Installed Ethereum wallets (groupName === 'Installed')
15
+ * - Most recent wallet shown first with "Recent" badge
16
+ * - Alphabetical sorting for remaining wallets
17
+ * - Auto-detection via EIP-6963
18
+ *
19
+ * @param props - Component props
20
+ * @returns Rendered Ethereum wallet list
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <EthereumWalletList
25
+ * wallets={installedWallets}
26
+ * recentWalletIds={['metaMask']}
27
+ * selectedWalletId={selectedWallet?.id}
28
+ * onWalletSelect={handleWalletSelect}
29
+ * />
30
+ * ```
31
+ */
32
+ export declare function EthereumWalletList({ wallets, recentWalletIds, selectedWalletId, onWalletSelect, }: EthereumWalletListProps): React.JSX.Element | null;
33
+ export declare namespace EthereumWalletList {
34
+ var displayName: string;
35
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * EthereumWallet module exports
3
+ *
4
+ * @module ExternalWallets/EthereumWallet
5
+ */
6
+ export { EthereumWalletList } from './EthereumWalletList';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * PopularWalletList Component
3
+ *
4
+ * Displays Popular wallet list auto-synced with wagmi.ts configuration
5
+ *
6
+ * @module ExternalWallets/Popular
7
+ */
8
+ import React from 'react';
9
+ import type { PopularWalletListProps } from '../shared/types';
10
+ /**
11
+ * Popular wallet list component
12
+ *
13
+ * Features:
14
+ * - Auto-syncs with wagmi.ts Popular group configuration
15
+ * - Preserves wagmi.ts wallet order
16
+ * - Handles EIP-6963 RDNS fallback (e.g., MetaMask)
17
+ * - No hardcoded wallet arrays (reads from unfilteredWallets)
18
+ * - Zero maintenance required when wagmi.ts changes
19
+ *
20
+ * @param props - Component props
21
+ * @returns Rendered Popular wallet list
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <PopularWalletList
26
+ * wallets={currentWallets}
27
+ * unfilteredWallets={allWallets}
28
+ * recentWalletIds={[]}
29
+ * selectedWalletId={selectedWallet?.id}
30
+ * onWalletSelect={handleWalletSelect}
31
+ * />
32
+ * ```
33
+ */
34
+ export declare function PopularWalletList({ wallets, unfilteredWallets, selectedWalletId, onWalletSelect, }: PopularWalletListProps): React.JSX.Element | null;
35
+ export declare namespace PopularWalletList {
36
+ var displayName: string;
37
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Popular module exports
3
+ *
4
+ * @module ExternalWallets/Popular
5
+ */
6
+ export { PopularWalletList } from './PopularWalletList';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * SolanaWalletList Component
3
+ *
4
+ * Displays Solana wallet list with recent wallet prioritization
5
+ *
6
+ * @module ExternalWallets/SolanaWallet
7
+ */
8
+ import React from 'react';
9
+ import type { SolanaWalletListProps } from '../shared/types';
10
+ /**
11
+ * Solana wallet list component
12
+ *
13
+ * Features:
14
+ * - Displays Solana wallet adapters
15
+ * - Most recent wallet shown first with "Recent" badge
16
+ * - Alphabetical sorting for remaining wallets
17
+ * - Auto-detection via Wallet Standard
18
+ * - Connection state handling
19
+ *
20
+ * @param props - Component props
21
+ * @returns Rendered Solana wallet list
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <SolanaWalletList
26
+ * solanaWallets={solanaAdapters}
27
+ * recentWalletIds={['Phantom']}
28
+ * connectingSolanaWallet={connectingWallet}
29
+ * isSolanaConnecting={false}
30
+ * onSolanaWalletClick={handleSolanaConnect}
31
+ * />
32
+ * ```
33
+ */
34
+ export declare function SolanaWalletList({ solanaWallets, recentWalletIds, connectingSolanaWallet, isSolanaConnecting, onSolanaWalletClick, }: SolanaWalletListProps): React.JSX.Element | null;
35
+ export declare namespace SolanaWalletList {
36
+ var displayName: string;
37
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * SolanaWallet module exports
3
+ *
4
+ * @module ExternalWallets/SolanaWallet
5
+ */
6
+ export { SolanaWalletList } from './SolanaWalletList';
@@ -0,0 +1,94 @@
1
+ /**
2
+ * WalletList Component
3
+ *
4
+ * Displays external Ethereum wallet list with grouping and connection controls
5
+ *
6
+ * @module ExternalWallets/WalletList
7
+ */
8
+ import React from 'react';
9
+ import type { WalletConnector } from '../../../wallets/useWalletConnectors';
10
+ /**
11
+ * Props for WalletList component
12
+ */
13
+ export interface WalletListProps {
14
+ /**
15
+ * Available wallet connectors
16
+ */
17
+ wallets: WalletConnector[];
18
+ /**
19
+ * Recent wallet IDs for prioritization
20
+ */
21
+ recentWalletIds: string[];
22
+ /**
23
+ * Currently selected wallet connector
24
+ */
25
+ selectedWallet?: WalletConnector;
26
+ /**
27
+ * ID of currently selected wallet (for highlighting)
28
+ */
29
+ selectedWalletId?: string;
30
+ /**
31
+ * Callback when user selects a wallet
32
+ */
33
+ onWalletSelect: (wallet: WalletConnector) => void;
34
+ /**
35
+ * QR code URI for WalletConnect-based wallets
36
+ */
37
+ qrCodeUri?: string;
38
+ /**
39
+ * Connection error state
40
+ */
41
+ connectionError: boolean;
42
+ /**
43
+ * Compact mode for mobile
44
+ */
45
+ compact?: boolean;
46
+ /**
47
+ * Additional unfilteredWallets for Popular section matching
48
+ */
49
+ unfilteredWallets?: WalletConnector[];
50
+ /**
51
+ * Show Popular section
52
+ * @default true
53
+ */
54
+ showPopular?: boolean;
55
+ /**
56
+ * Show Ethereum section
57
+ * @default true
58
+ */
59
+ showEthereum?: boolean;
60
+ }
61
+ /**
62
+ * Wallet list component for external Ethereum wallets
63
+ *
64
+ * Features:
65
+ * - Ethereum section (Installed wallets)
66
+ * - Popular section (synced with wagmi.ts configuration)
67
+ * - Recent wallet prioritization (most recent first)
68
+ * - Alphabetical sorting for non-recent wallets
69
+ * - EIP-6963 auto-detection support
70
+ * - RDNS fallback for MetaMask and other wallets
71
+ *
72
+ * @param props - Component props
73
+ * @returns Rendered wallet list
74
+ *
75
+ * @example
76
+ * ```tsx
77
+ * <WalletList
78
+ * wallets={installedWallets}
79
+ * recentWalletIds={['metaMask']}
80
+ * selectedWalletId={selectedWallet?.id}
81
+ * onWalletSelect={handleWalletSelect}
82
+ * qrCodeUri={qrCodeUri}
83
+ * connectionError={false}
84
+ * compact={false}
85
+ * unfilteredWallets={allWallets}
86
+ * showPopular={true}
87
+ * showEthereum={true}
88
+ * />
89
+ * ```
90
+ */
91
+ export declare function WalletList({ wallets, recentWalletIds, selectedWalletId, onWalletSelect, compact, unfilteredWallets, showPopular, showEthereum, }: WalletListProps): React.JSX.Element;
92
+ export declare namespace WalletList {
93
+ var displayName: string;
94
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * useWalletConnection Hook
3
+ *
4
+ * Manages external wallet connection state and logic for Ethereum wallets
5
+ *
6
+ * @module ExternalWallets/hooks/useWalletConnection
7
+ */
8
+ import type { WalletConnector } from '../../../../wallets/useWalletConnectors';
9
+ /**
10
+ * Hook parameters for wallet connection management
11
+ */
12
+ export interface UseWalletConnectionParams {
13
+ /**
14
+ * Callback invoked when wallet successfully connects
15
+ */
16
+ onSuccess?: () => void;
17
+ /**
18
+ * Optional pre-selected wallet connector (from WalletButton API)
19
+ */
20
+ initialWallet?: WalletConnector;
21
+ }
22
+ /**
23
+ * Hook return value with wallet connection state and actions
24
+ */
25
+ export interface UseWalletConnectionReturn {
26
+ /**
27
+ * Currently selected wallet connector
28
+ */
29
+ selectedWallet?: WalletConnector;
30
+ /**
31
+ * QR code URI for WalletConnect-based wallets
32
+ */
33
+ qrCodeUri?: string;
34
+ /**
35
+ * Connection error state
36
+ */
37
+ connectionError: boolean;
38
+ /**
39
+ * Select a wallet (prepares for connection)
40
+ */
41
+ selectWallet: (wallet: WalletConnector) => void;
42
+ /**
43
+ * Connect to selected wallet
44
+ */
45
+ connectWallet: (wallet: WalletConnector) => Promise<void>;
46
+ /**
47
+ * Clear wallet selection and reset state
48
+ */
49
+ clearSelection: () => void;
50
+ }
51
+ /**
52
+ * Hook for managing external Ethereum wallet connection state
53
+ *
54
+ * Handles:
55
+ * - Wallet selection and connection
56
+ * - QR code URI management for WalletConnect
57
+ * - Connection error handling
58
+ * - Recent wallet tracking
59
+ *
60
+ * @param params - Hook configuration parameters
61
+ * @returns Wallet connection state and control functions
62
+ *
63
+ * @example
64
+ * ```tsx
65
+ * const walletConnection = useWalletConnection({
66
+ * connectors,
67
+ * connect,
68
+ * onSuccess: () => onClose(),
69
+ * });
70
+ *
71
+ * // Select wallet
72
+ * walletConnection.selectWallet(metaMaskWallet);
73
+ *
74
+ * // Connect wallet
75
+ * await walletConnection.connectWallet(metaMaskWallet);
76
+ * ```
77
+ */
78
+ export declare function useWalletConnection({ onSuccess, initialWallet, }: UseWalletConnectionParams): UseWalletConnectionReturn;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * External Wallets Module
3
+ *
4
+ * Components and hooks for external wallet connection (Ethereum, Solana, Popular)
5
+ *
6
+ * @module ExternalWallets
7
+ */
8
+ export { EthereumWalletList } from './EthereumWallet';
9
+ export { SolanaWalletList } from './SolanaWallet';
10
+ export { PopularWalletList } from './Popular';
11
+ export { useWalletConnection, type UseWalletConnectionParams, type UseWalletConnectionReturn, } from './hooks/useWalletConnection';
12
+ export type { EthereumWalletListProps, SolanaWalletListProps, PopularWalletListProps, } from './shared/types';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared utilities and types for ExternalWallets module
3
+ *
4
+ * @module ExternalWallets/shared
5
+ */
6
+ export * from './types';
7
+ export * from './utils';