import { ReactNode } from 'react'; import { ApiClient } from '../core/client'; import { CantonService } from '../services/cantonService'; import { ApiService } from '../services/apiService'; export interface SupaConfig { privyAppId: string; privyClientId?: string; apiBaseUrl?: string; nodeIdentifier: string; /** Optional app identifier for special app-specific rules (sent as X-Supa-App-Id header) */ supaAppId?: string; appearance?: { theme?: 'light' | 'dark'; accentColor?: string; logo?: string; /** * Which external wallet types to show in Privy's login/link modal. * @default 'ethereum-only' */ walletChainType?: 'ethereum-only' | 'solana-only' | 'ethereum-and-solana'; /** * Order/whitelist of wallet entries shown in the modal. * Default: ['detected_wallets', 'metamask', 'coinbase_wallet', 'rainbow', 'wallet_connect'] */ walletList?: string[]; }; loginMethods?: Array<'email' | 'wallet' | 'google' | 'twitter' | 'discord' | 'github' | 'linkedin' | 'telegram'>; smartWallets?: { enabled?: boolean; paymasterContext?: { mode?: string; calculateGasLimits?: boolean; expiryDuration?: number; sponsorshipInfo?: { webhookData?: Record; smartAccountInfo?: { name?: string; version?: string; }; }; }; }; /** Default chain for smart wallets and transactions */ defaultChain?: any; /** Supported chains for the app */ supportedChains?: any[]; /** * Enable wallet export functionality (uses Solana wallets instead of Stellar) * When false (default): Uses Stellar wallets, export will throw an error * When true: Uses Solana wallets, export is available * @default false */ withExport?: boolean; /** Enable automatic onboarding (create wallet + register Canton on login). Default: true */ autoOnboarding?: boolean; /** * Optional onboarding stages flags. * By default transfer preapproval is NOT auto-executed. */ onboardingStages?: { /** Auto-run transfer preapproval stage (legacy). Default: false */ transferPreapproval?: boolean; }; } export interface ConfirmModalOptions { title?: string; message: string; confirmText?: string; rejectText?: string; description?: string; icon?: ReactNode; } export interface SignTransactionOptions { transaction: string | string[]; title?: string; description?: string; confirmText?: string; rejectText?: string; infoText?: string; } export interface ModalResult { confirmed: boolean; data?: T; } export interface SignMessageModalOptions { message: string; title?: string; description?: string; confirmText?: string; rejectText?: string; } export interface SupaContextValue { apiClient: ApiClient; cantonService: CantonService; apiService: ApiService; config: SupaConfig; theme: 'light' | 'dark'; confirm: (options: ConfirmModalOptions) => Promise; signMessageConfirm: (options: SignMessageModalOptions) => Promise; signTransactionConfirm: (options: SignTransactionOptions) => Promise; setModalLoading: (loading: boolean) => void; closeModal: () => void; } export interface SupaProviderProps { config: SupaConfig; children: ReactNode; } export declare function SupaProvider({ config, children }: SupaProviderProps): import("react/jsx-runtime").JSX.Element | null; export declare function useSupaContext(): SupaContextValue;