import { P as PublicSession } from '../auth-c1d7Eji2.cjs'; export { A as APIResponse, M as MPCNode, N as NetworkStatus, S as Session, W as Web3Chain } from '../auth-c1d7Eji2.cjs'; interface BillingPlan { id: string; name: string; price_cents: number; token_allocation: number; features: string; sort_order?: number; is_active?: boolean; } interface Subscription { plan?: { id: string; name: string; priceCents: number; tokenAllocation: number; }; planId?: string; planName?: string; status: string; tokensUsed?: number; tokensRemaining?: number; usagePercent?: number; periodStart?: number; periodEnd?: number; cancelAtPeriodEnd?: boolean; stripeCustomerId?: string; } interface UsageSummary { ownerId: string; planAllocation: number; planId: string | null; planName: string; inferenceUsed: number; ledgerSpent: number; totalUsed: number; remaining: number; percent: number; exceeded: boolean; breakdown: { subscription: number; prepaidCredit: number; tokenGrants: number; inference: number; skillRegistrations: number; skillRegistrationCount: number; }; } interface PrepaidCheckoutResult { url: string; sessionId?: string; } interface PrepaidVerifyResult { alreadyCredited: boolean; tokensCredited?: number; amountCents?: number; paymentRef?: string; } interface BillingRecord { id: string; recorded_at?: number; date?: string; reason?: string; description?: string; amount: number; direction?: string; source?: string; status?: string; payment_ref?: string; } /** User profile — global (network-wide) or stack-scoped */ interface UserProfile { mid: string; username: string; avatarUrl?: string; bio?: string; /** * Stack-scoped payout address (e.g. Solana wallet for Paper / USDC payouts). * Only meaningful on stack-scoped profiles. The backend stores this as * `payment_address` (snake_case). */ paymentAddress?: string; createdAt?: number; updatedAt?: number; } /** Input for updating a profile */ interface ProfileUpdateInput { username?: string; avatarUrl?: string; bio?: string; /** * Stack-scoped payout address. Pass through `useProfile().updateProfile` * with a stack-scoped scope to set the payment_address on the user's * profile for that stack. */ paymentAddress?: string; } /** Scope for profile operations */ type ProfileScope = 'global' | { stackId: string; }; /** Client-side configuration for UserUtilsProvider */ interface UserUtilsConfig { /** Base URL for API calls (empty string = same origin) */ apiBaseUrl: string; /** StackNet stack identifier */ stackId?: string; /** Direct StackNet URL for client-side API calls (e.g. challenges) */ stacknetUrl?: string; /** Theme preference */ theme?: 'light' | 'dark' | 'system'; } /** Callbacks for auth and billing events */ interface UserUtilsCallbacks { onAuthSuccess?: (session: PublicSession) => void; onAuthError?: (error: Error) => void; onLogout?: () => void; onSubscriptionChange?: (subscription: Subscription) => void; } export { type BillingPlan, type BillingRecord, type PrepaidCheckoutResult, type PrepaidVerifyResult, type ProfileScope, type ProfileUpdateInput, PublicSession, type Subscription, type UsageSummary, type UserProfile, type UserUtilsCallbacks, type UserUtilsConfig };