@magic-ext/magic-widget 0.1.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 (38) hide show
  1. package/LICENSE +177 -0
  2. package/dist/cjs/index.js +15399 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/MagicWidget.d.ts +2 -0
  5. package/dist/cjs/types/components/EmailInput.d.ts +2 -0
  6. package/dist/cjs/types/components/Pending.d.ts +11 -0
  7. package/dist/cjs/types/components/ProviderButton.d.ts +9 -0
  8. package/dist/cjs/types/components/SocialProviders.d.ts +10 -0
  9. package/dist/cjs/types/components/WidgetHeader.d.ts +7 -0
  10. package/dist/cjs/types/constants.d.ts +3 -0
  11. package/dist/cjs/types/context/EmailLoginContext.d.ts +33 -0
  12. package/dist/cjs/types/context/index.d.ts +1 -0
  13. package/dist/cjs/types/extension.d.ts +180 -0
  14. package/dist/cjs/types/hooks/useOAuthLogin.d.ts +9 -0
  15. package/dist/cjs/types/hooks/useSiweLogin.d.ts +8 -0
  16. package/dist/cjs/types/hooks/useWalletConnect.d.ts +12 -0
  17. package/dist/cjs/types/index.d.ts +2 -0
  18. package/dist/cjs/types/lib/provider-config.d.ts +2 -0
  19. package/dist/cjs/types/lib/validators.d.ts +10 -0
  20. package/dist/cjs/types/reducer.d.ts +61 -0
  21. package/dist/cjs/types/types/client-config.d.ts +19 -0
  22. package/dist/cjs/types/types.d.ts +44 -0
  23. package/dist/cjs/types/views/AdditionalProvidersView.d.ts +7 -0
  24. package/dist/cjs/types/views/DeviceVerificationView.d.ts +8 -0
  25. package/dist/cjs/types/views/EmailOTPView.d.ts +8 -0
  26. package/dist/cjs/types/views/LoginSuccessView.d.ts +7 -0
  27. package/dist/cjs/types/views/LoginView.d.ts +7 -0
  28. package/dist/cjs/types/views/LostRecoveryCode.d.ts +2 -0
  29. package/dist/cjs/types/views/MfaView.d.ts +8 -0
  30. package/dist/cjs/types/views/OAuthPendingView.d.ts +9 -0
  31. package/dist/cjs/types/views/RecoveryCode.d.ts +8 -0
  32. package/dist/cjs/types/views/WalletPendingView.d.ts +9 -0
  33. package/dist/cjs/types/wagmi/config.d.ts +6 -0
  34. package/dist/cjs/types/wagmi/connectors.d.ts +9 -0
  35. package/dist/es/index.mjs +15376 -0
  36. package/dist/es/index.mjs.map +1 -0
  37. package/dist/styles.css +1 -0
  38. package/package.json +75 -0
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function MagicWidget(): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EmailInput: () => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface PendingProps {
3
+ onPressBack: () => void;
4
+ title: string;
5
+ description: string;
6
+ Icon: React.ElementType;
7
+ isPending: boolean;
8
+ errorMessage: string | null;
9
+ }
10
+ export declare const Pending: ({ onPressBack, title, description, Icon, isPending, errorMessage }: PendingProps) => React.JSX.Element;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import React, { ElementType } from 'react';
2
+ interface ProviderButtonProps {
3
+ label?: string;
4
+ Icon: ElementType;
5
+ onPress: () => void;
6
+ hideLabel?: boolean;
7
+ }
8
+ export declare const ProviderButton: ({ label, Icon, onPress, hideLabel }: ProviderButtonProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { OAuthProvider } from '../types';
3
+ import { WidgetAction } from 'src/reducer';
4
+ interface SocialProvidersProps {
5
+ providers: OAuthProvider[];
6
+ onPress: (provider: OAuthProvider) => void;
7
+ dispatch: React.Dispatch<WidgetAction>;
8
+ }
9
+ export declare const SocialProviders: ({ providers, onPress, dispatch }: SocialProvidersProps) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type WidgetHeaderProps = {
3
+ showHeaderText?: boolean;
4
+ onPressBack?: () => void;
5
+ };
6
+ export default function WidgetHeader({ showHeaderText, onPressBack }: WidgetHeaderProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import { OAuthProvider, ProviderMetadata, ThirdPartyWallets } from './types';
2
+ export declare const WALLET_METADATA: Record<ThirdPartyWallets, ProviderMetadata>;
3
+ export declare const OAUTH_METADATA: Record<OAuthProvider, ProviderMetadata>;
@@ -0,0 +1,33 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { WidgetAction } from '../reducer';
3
+ interface EmailLoginContextValue {
4
+ /** Start the email OTP login flow */
5
+ startEmailLogin: (email: string) => void;
6
+ /** Submit the OTP code for verification */
7
+ submitOTP: (otp: string) => void;
8
+ /** Submit the TOTP code for MFA verification */
9
+ submitMFA: (totp: string) => void;
10
+ /** Lost device */
11
+ lostDevice: () => void;
12
+ /** Submit recovery code for verification */
13
+ submitRecoveryCode: (recoveryCode: string) => void;
14
+ /** Cancel the current login flow */
15
+ cancelLogin: () => void;
16
+ /** Retry device verification */
17
+ retryDeviceVerification: () => void;
18
+ /** Resend the email OTP */
19
+ resendEmailOTP: () => void;
20
+ /** Current email being used for login */
21
+ email: string | null;
22
+ }
23
+ interface EmailLoginProviderProps {
24
+ children: ReactNode;
25
+ dispatch: React.Dispatch<WidgetAction>;
26
+ }
27
+ export declare function EmailLoginProvider({ children, dispatch }: EmailLoginProviderProps): React.JSX.Element;
28
+ /**
29
+ * Hook to access the email login context
30
+ * @throws Error if used outside of EmailLoginProvider
31
+ */
32
+ export declare function useEmailLogin(): EmailLoginContextValue;
33
+ export {};
@@ -0,0 +1 @@
1
+ export { EmailLoginProvider, useEmailLogin } from './EmailLoginContext';
@@ -0,0 +1,180 @@
1
+ import { Extension, SDKBase } from '@magic-sdk/provider';
2
+ import { JsonRpcRequestPayload } from '@magic-sdk/types';
3
+ import { ClientConfig } from './types/client-config';
4
+ export declare const MAGIC_WIDGET_PROVIDER = "magic-widget";
5
+ export type OAuthProvider = 'google' | 'facebook' | 'apple' | 'github' | 'bitbucket' | 'gitlab' | 'linkedin' | 'twitter' | 'discord' | 'twitch' | 'microsoft';
6
+ export interface OpenIDConnectUserInfo {
7
+ name?: string;
8
+ familyName?: string;
9
+ givenName?: string;
10
+ middleName?: string;
11
+ nickname?: string;
12
+ preferredUsername?: string;
13
+ profile?: string;
14
+ picture?: string;
15
+ website?: string;
16
+ email?: string;
17
+ emailVerified?: boolean;
18
+ gender?: string;
19
+ birthdate?: string;
20
+ zoneinfo?: string;
21
+ locale?: string;
22
+ phoneNumber?: string;
23
+ phoneNumberVerified?: boolean;
24
+ sub?: string;
25
+ sources?: Record<string, unknown>;
26
+ [key: string]: unknown;
27
+ }
28
+ export interface MagicUserMetadata {
29
+ issuer: string | null;
30
+ publicAddress: string | null;
31
+ email: string | null;
32
+ phoneNumber?: string | null;
33
+ isMfaEnabled?: boolean;
34
+ recoveryFactors?: Array<{
35
+ type: string;
36
+ value: string;
37
+ }>;
38
+ }
39
+ export interface OAuthRedirectResult {
40
+ oauth: {
41
+ provider: OAuthProvider;
42
+ scope: string[];
43
+ userHandle: string;
44
+ userInfo: OpenIDConnectUserInfo;
45
+ };
46
+ magic: {
47
+ idToken: string;
48
+ userMetadata: MagicUserMetadata;
49
+ };
50
+ }
51
+ export interface OAuthRedirectError {
52
+ provider: OAuthProvider;
53
+ error: string;
54
+ error_description?: string;
55
+ error_uri?: string;
56
+ }
57
+ export interface SiweGenerateNonceParams {
58
+ address?: string;
59
+ }
60
+ export interface SiweGenerateMessageParams {
61
+ address: string;
62
+ chainId?: number;
63
+ statement?: string;
64
+ }
65
+ export interface SiweLoginParams {
66
+ message: string;
67
+ signature: string;
68
+ }
69
+ /**
70
+ * Get the initialized MagicWidgetExtension instance.
71
+ * Used internally by React components to access SIWE methods.
72
+ * @throws Error if extension hasn't been initialized yet
73
+ */
74
+ export declare function getExtensionInstance(): MagicWidgetExtension;
75
+ export declare class MagicWidgetExtension extends Extension.Internal<'magicWidget'> {
76
+ name: "magicWidget";
77
+ config: {};
78
+ private clientConfig;
79
+ private configPromise;
80
+ private eventsListenerAdded;
81
+ private reconnectPromise;
82
+ constructor();
83
+ /**
84
+ * Called by Magic SDK when the extension is initialized.
85
+ * We override to store a reference for internal React component access.
86
+ */
87
+ init(sdk: SDKBase): void;
88
+ private restoreWalletConnection;
89
+ /**
90
+ * Set up the connected state after successful SIWE login.
91
+ * This enables RPC request routing through the 3rd party wallet.
92
+ */
93
+ setConnectedState(address: string, chainId?: number): void;
94
+ /**
95
+ * Clear the connected state (called on logout/disconnect).
96
+ */
97
+ clearConnectedState(): void;
98
+ /**
99
+ * Get the current wallet provider from wagmi.
100
+ * Returns null if not connected.
101
+ */
102
+ getWalletProvider(): Promise<any | null>;
103
+ /**
104
+ * Execute an RPC request through the connected 3rd party wallet.
105
+ * This is called by ThirdPartyWalletsModule for magic-widget provider.
106
+ */
107
+ walletRequest<T = unknown>(payload: Partial<JsonRpcRequestPayload>): Promise<T>;
108
+ /**
109
+ * Set up event listeners for account and chain changes.
110
+ */
111
+ private setupEip1193EventListeners;
112
+ /**
113
+ * Handle wallet disconnect - clear SDK state AND invalidate Magic iframe session.
114
+ * Called when user disconnects wallet via wallet extension UI.
115
+ */
116
+ private handleWalletDisconnect;
117
+ private postWalletUpdate;
118
+ /**
119
+ * Generate a nonce for SIWE message construction.
120
+ * This calls the Magic backend to get a unique nonce.
121
+ */
122
+ generateNonce(params?: SiweGenerateNonceParams): Promise<string>;
123
+ /**
124
+ * Generate a complete SIWE message.
125
+ * Fetches a nonce from the backend and constructs the message client-side.
126
+ */
127
+ generateMessage(params: SiweGenerateMessageParams): Promise<string>;
128
+ /**
129
+ * Login with SIWE message and signature.
130
+ * Sends the signed message to Magic backend for verification and returns a DID token.
131
+ */
132
+ login(params: SiweLoginParams): Promise<string>;
133
+ /**
134
+ * Login with OAuth popup.
135
+ * Opens a popup for the specified OAuth provider and returns the result.
136
+ */
137
+ loginWithPopup(provider: OAuthProvider): Promise<OAuthRedirectResult>;
138
+ /**
139
+ * Fetch client configuration via RPC (proxied through embedded-wallet iframe).
140
+ * This avoids CORS issues by having the iframe make the request.
141
+ */
142
+ fetchConfig(): Promise<ClientConfig>;
143
+ /**
144
+ * Get the cached client configuration (synchronous).
145
+ * Returns null if config hasn't been fetched yet.
146
+ */
147
+ getConfig(): ClientConfig | null;
148
+ /**
149
+ * Login with Email OTP
150
+ */
151
+ loginWithEmailOTP(email: string): import("@magic-sdk/provider").PromiEvent<string | null, {
152
+ "email-otp-sent": () => void;
153
+ "login-throttled": () => void;
154
+ "invalid-email-otp": () => void;
155
+ "invalid-mfa-otp": () => void;
156
+ "expired-email-otp": () => void;
157
+ "mfa-sent-handle": () => void;
158
+ "recovery-code-sent-handle": () => void;
159
+ "invalid-recovery-code": () => void;
160
+ "recovery-code-success": () => void;
161
+ "Auth/id-token-created": (idToken: string) => void;
162
+ "Wallet/wallet-info-fetched": () => void;
163
+ "verify-email-otp": (otp: string) => void;
164
+ "verify-mfa-code": (mfa: string) => void;
165
+ "lost-device": () => void;
166
+ "verify-recovery-code": (recoveryCode: string) => void;
167
+ cancel: () => void;
168
+ } & {
169
+ "device-needs-approval": () => void;
170
+ "device-verification-email-sent": () => void;
171
+ "device-verification-link-expired": () => void;
172
+ "device-approved": () => void;
173
+ "device-retry": () => void;
174
+ } & {
175
+ done: (result: string | null) => void;
176
+ error: (reason: any) => void;
177
+ settled: () => void;
178
+ "closed-by-user": () => void;
179
+ }>;
180
+ }
@@ -0,0 +1,9 @@
1
+ import { OAuthProvider, OAuthRedirectResult } from '../extension';
2
+ export interface UseOAuthLoginResult {
3
+ performOAuthLogin: (provider: OAuthProvider) => Promise<OAuthRedirectResult>;
4
+ isLoading: boolean;
5
+ error: Error | null;
6
+ isSuccess: boolean;
7
+ result: OAuthRedirectResult | null;
8
+ }
9
+ export declare function useOAuthLogin(): UseOAuthLoginResult;
@@ -0,0 +1,8 @@
1
+ export interface UseSiweLoginResult {
2
+ performSiweLogin: (address: string, chainId?: number) => Promise<string>;
3
+ isLoading: boolean;
4
+ error: Error | null;
5
+ isSuccess: boolean;
6
+ publicAddress: string | null;
7
+ }
8
+ export declare function useSiweLogin(): UseSiweLoginResult;
@@ -0,0 +1,12 @@
1
+ import { ThirdPartyWallets } from '../types';
2
+ export interface UseWalletConnectResult {
3
+ connectWallet: () => Promise<void>;
4
+ isPending: boolean;
5
+ error: Error | null;
6
+ address: `0x${string}` | undefined;
7
+ isConnected: boolean;
8
+ /** Whether the currently connected wallet matches the selected provider */
9
+ isConnectedToSelectedProvider: boolean;
10
+ disconnect: () => void;
11
+ }
12
+ export declare function useWalletConnect(provider: ThirdPartyWallets): UseWalletConnectResult;
@@ -0,0 +1,2 @@
1
+ export * from './MagicWidget';
2
+ export * from './extension';
@@ -0,0 +1,2 @@
1
+ import { LoginProvider, ProviderConfig } from '../types';
2
+ export declare function getProviderConfig(provider: LoginProvider): ProviderConfig;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Function to check if an email belongs to a sanctioned domain
3
+ * @param {string} email - The email address to be checked
4
+ * @returns {boolean} - Returns true if the email is allowed, false otherwise
5
+ */
6
+ export declare function isSanctionedEmail(email: string): boolean;
7
+ /**
8
+ * Returns `true` if the given `source` is an email address, `false` otherwise.
9
+ */
10
+ export declare function isValidEmail(source?: string | null): boolean;
@@ -0,0 +1,61 @@
1
+ import { LoginProvider, OAuthProvider, ThirdPartyWallets } from './types';
2
+ export type View = 'login' | 'otp' | 'additional_providers' | 'wallet_pending' | 'oauth_pending' | 'email_otp_pending' | 'device_verification' | 'mfa_pending' | 'recovery_code' | 'lost_recovery_code' | 'login_success';
3
+ export type EmailLoginStatus = 'idle' | 'sending' | 'otp_sent' | 'verifying_otp' | 'invalid_otp' | 'expired_otp' | 'device_needs_approval' | 'device_verification_sent' | 'device_verification_expired' | 'device_approved' | 'mfa_required' | 'recovery_code' | 'success' | 'mfa_verifying' | 'mfa_invalid' | 'recovery_code_verifying' | 'lost_recovery_code' | 'error';
4
+ export interface WidgetState {
5
+ view: View;
6
+ email?: string;
7
+ selectedProvider?: LoginProvider;
8
+ error?: string;
9
+ emailLoginStatus?: EmailLoginStatus;
10
+ }
11
+ export type WidgetAction = {
12
+ type: 'GO_TO_LOGIN';
13
+ } | {
14
+ type: 'EMAIL_OTP_START';
15
+ email: string;
16
+ } | {
17
+ type: 'EMAIL_OTP_SENT';
18
+ } | {
19
+ type: 'EMAIL_OTP_INVALID';
20
+ } | {
21
+ type: 'EMAIL_OTP_EXPIRED';
22
+ } | {
23
+ type: 'EMAIL_OTP_VERIFYING';
24
+ } | {
25
+ type: 'DEVICE_NEEDS_APPROVAL';
26
+ } | {
27
+ type: 'DEVICE_VERIFICATION_SENT';
28
+ } | {
29
+ type: 'DEVICE_VERIFICATION_EXPIRED';
30
+ } | {
31
+ type: 'DEVICE_APPROVED';
32
+ } | {
33
+ type: 'MFA_REQUIRED';
34
+ } | {
35
+ type: 'MFA_VERIFYING';
36
+ } | {
37
+ type: 'MFA_INVALID';
38
+ } | {
39
+ type: 'LOST_DEVICE';
40
+ } | {
41
+ type: 'RECOVERY_CODE_VERIFYING';
42
+ } | {
43
+ type: 'LOST_RECOVERY_CODE';
44
+ } | {
45
+ type: 'LOGIN_SUCCESS';
46
+ } | {
47
+ type: 'RESET_EMAIL_ERROR';
48
+ } | {
49
+ type: 'LOGIN_ERROR';
50
+ error: string;
51
+ } | {
52
+ type: 'SELECT_PROVIDER';
53
+ provider: OAuthProvider;
54
+ } | {
55
+ type: 'GO_TO_ADDITIONAL_PROVIDERS';
56
+ } | {
57
+ type: 'SELECT_WALLET';
58
+ provider: ThirdPartyWallets;
59
+ };
60
+ export declare const initialState: WidgetState;
61
+ export declare function widgetReducer(state: WidgetState, action: WidgetAction): WidgetState;
@@ -0,0 +1,19 @@
1
+ export interface ClientTheme {
2
+ appName: string;
3
+ assetUri: string;
4
+ textColor: `#${string}`;
5
+ buttonColor: `#${string}` | undefined;
6
+ buttonRadius: string | undefined;
7
+ containerRadius: string | undefined;
8
+ backgroundColor: `#${string}` | undefined;
9
+ themeColor: 'auto' | 'dark' | 'light';
10
+ }
11
+ export interface ClientConfig {
12
+ clientId: string;
13
+ theme: ClientTheme;
14
+ authProviders: {
15
+ primary: string[];
16
+ secondary: string[];
17
+ social: string[];
18
+ };
19
+ }
@@ -0,0 +1,44 @@
1
+ import { ComponentType } from 'react';
2
+ export declare enum ThirdPartyWallets {
3
+ METAMASK = "metamask",
4
+ WALLETCONNECT = "walletconnect",
5
+ COINBASE = "coinbase",
6
+ PHANTOM = "phantom",
7
+ RABBY = "rabby"
8
+ }
9
+ export interface ProviderMetadata {
10
+ displayName: string;
11
+ Icon: ComponentType<{
12
+ width?: number;
13
+ height?: number;
14
+ className?: string;
15
+ }>;
16
+ }
17
+ export declare enum RpcErrorMessage {
18
+ MalformedEmail = "Invalid params: Please provide a valid email address.",
19
+ SanEmail = "We are unable to create an account with that email."
20
+ }
21
+ export declare enum OAuthProvider {
22
+ GOOGLE = "google",
23
+ APPLE = "apple",
24
+ FACEBOOK = "facebook",
25
+ GITHUB = "github",
26
+ TWITTER = "twitter",
27
+ LINKEDIN = "linkedin",
28
+ MICROSOFT = "microsoft",
29
+ TWITCH = "twitch",
30
+ BITBUCKET = "bitbucket",
31
+ DISCORD = "discord",
32
+ GITLAB = "gitlab",
33
+ TELEGRAM = "telegram"
34
+ }
35
+ export type LoginProvider = OAuthProvider | ThirdPartyWallets;
36
+ export interface ProviderConfig {
37
+ title: string;
38
+ description: string;
39
+ Icon: ComponentType<{
40
+ width?: number;
41
+ height?: number;
42
+ className?: string;
43
+ }>;
44
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { WidgetAction } from 'src/reducer';
3
+ interface AdditionalProvidersViewProps {
4
+ dispatch: React.Dispatch<WidgetAction>;
5
+ }
6
+ export default function AdditionalProvidersView({ dispatch }: AdditionalProvidersViewProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { WidgetAction, WidgetState } from '../reducer';
3
+ interface DeviceVerificationViewProps {
4
+ state: WidgetState;
5
+ dispatch: React.Dispatch<WidgetAction>;
6
+ }
7
+ export declare const DeviceVerificationView: ({ state, dispatch }: DeviceVerificationViewProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { WidgetAction, WidgetState } from '../reducer';
3
+ interface EmailOTPViewProps {
4
+ state: WidgetState;
5
+ dispatch: React.Dispatch<WidgetAction>;
6
+ }
7
+ export declare const EmailOTPView: ({ state, dispatch }: EmailOTPViewProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { WidgetState } from '../reducer';
3
+ interface LoginSuccessViewProps {
4
+ state: WidgetState;
5
+ }
6
+ export declare const LoginSuccessView: ({ state }: LoginSuccessViewProps) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { WidgetAction } from '../reducer';
3
+ interface LoginViewProps {
4
+ dispatch: React.Dispatch<WidgetAction>;
5
+ }
6
+ export declare const LoginView: ({ dispatch }: LoginViewProps) => React.JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const LostRecoveryCode: () => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { WidgetAction, WidgetState } from 'src/reducer';
3
+ interface MFAViewProps {
4
+ state: WidgetState;
5
+ dispatch: React.Dispatch<WidgetAction>;
6
+ }
7
+ export declare const MFAView: ({ state, dispatch }: MFAViewProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WidgetAction } from '../reducer';
3
+ import { OAuthProvider } from '../types';
4
+ interface OAuthPendingViewProps {
5
+ provider: OAuthProvider;
6
+ dispatch: React.Dispatch<WidgetAction>;
7
+ }
8
+ export declare const OAuthPendingView: ({ provider, dispatch }: OAuthPendingViewProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { WidgetAction, WidgetState } from 'src/reducer';
3
+ interface RecoveryCodeViewProps {
4
+ state: WidgetState;
5
+ dispatch: React.Dispatch<WidgetAction>;
6
+ }
7
+ export declare const RecoveryCodeView: ({ state, dispatch }: RecoveryCodeViewProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WidgetAction } from '../reducer';
3
+ import { ThirdPartyWallets } from '../types';
4
+ interface WalletPendingViewProps {
5
+ provider: ThirdPartyWallets;
6
+ dispatch: React.Dispatch<WidgetAction>;
7
+ }
8
+ export declare const WalletPendingView: ({ provider, dispatch }: WalletPendingViewProps) => React.JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import { WagmiAdapter } from '@reown/appkit-adapter-wagmi';
2
+ import type { AppKitNetwork } from '@reown/appkit/networks';
3
+ export declare const projectId = "141e0e0e531b47a47d662bca4eb70fae";
4
+ export declare const networks: [AppKitNetwork, ...AppKitNetwork[]];
5
+ export declare const wagmiAdapter: WagmiAdapter;
6
+ export declare const wagmiConfig: import("wagmi").Config;
@@ -0,0 +1,9 @@
1
+ import { ThirdPartyWallets } from '../types';
2
+ /**
3
+ * Map ThirdPartyWallets enum to wagmi connector IDs
4
+ */
5
+ export declare const CONNECTOR_IDS: Record<ThirdPartyWallets, string>;
6
+ /**
7
+ * Alternative names to match connectors by name if ID doesn't match
8
+ */
9
+ export declare const CONNECTOR_NAME_PATTERNS: Record<ThirdPartyWallets, string>;