import { ReactNode } from "react"; import { WalletKit } from "walletkit-js"; export type RequestStatus = 'idle' | 'loading' | 'success' | 'error'; export type OAuthProvider = 'google' | 'apple'; export type Transaction = { to: string; value: string; data?: string; }; export type User = { email?: string; hasPasskeyCredentials?: boolean; siweWalletAddress?: string; }; export type ExternalConnector = { id: string; name: string; logo: (props: { className: string; }) => ReactNode; onClick: () => void; }; type FailureReason = 'user_cancelled' | 'external_connector' | 'unknown'; export type EIP1193ProviderRequest = { method: "eth_sendTransaction"; params: [Transaction]; } | { method: "personal_sign"; params: [string, string]; } | { method: "wk_batchSignAndSend"; params: [Transaction[]]; }; export type DidConnectEvent = { success: true; address: string; } | { success: false; reason: FailureReason; }; export type DidSignMessageEvent = { success: true; signedMessage: string; } | { success: false; reason: FailureReason; }; export type DidSendTransactionEvent = { success: true; transactionHash: string; } | { success: false; reason: FailureReason; }; export type WalletKitClientOpts = { projectId: string; environment: string; walletType: WalletKit.WalletType; }; export type OpenConnectModalEvent = { promptForPasskeyIfNeeded: boolean; }; export type OpenSendTransactionModalEvent = { transactions: Transaction[]; }; export type OpenSignMessageModalEvent = { message: string; }; export type EthereumProviderRequestArgs = { method: 'eth_accounts'; } | { method: 'personal_sign'; params: [string, string]; } | { method: 'eth_sendTransaction'; params: [Transaction]; }; export {};