import type { Transaction, PublicKey } from '@solana/web3.js'; /** * Minimal wallet adapter interface. * Two required methods: publicKey + signTransaction. * signAndSendTransaction is optional — if not provided, the SDK signs then sends via RPC. */ export interface WalletAdapter { /** The connected wallet's public key, or null if not connected */ publicKey: PublicKey | null; /** Whether the wallet is currently connected */ connected: boolean; /** Sign a transaction without sending it */ signTransaction(transaction: Transaction): Promise; /** * Optional: Sign and send in one step. * If provided, the SDK will prefer this over signTransaction + sendRawTransaction. * Returns the transaction signature. */ signAndSendTransaction?(transaction: Transaction): Promise; /** * Optional: Sign an arbitrary message (for authentication). * Returns the signature as a Uint8Array. */ signMessage?(message: Uint8Array): Promise; /** Optional: Connect the wallet */ connect?(): Promise; /** Optional: Disconnect the wallet */ disconnect?(): void | Promise; }