/** * SDK Configuration */ export interface SDKConfig { /** Unique game identifier */ gameId: string; /** Optional: Parent window origin for security (defaults to '*' if not provided) */ parentOrigin?: string; /** Optional: Request timeout in milliseconds (default: 30000) */ timeout?: number; /** Optional: Base URL for API calls (required for non-iframe mode) */ apiBaseURL?: string; /** Optional: Pre-authenticated token (for non-iframe mode) */ authToken?: string; /** Optional: Wallet address (for non-iframe mode) */ walletAddress?: string; } /** * Payment result */ export interface PaymentResult { /** Whether payment was successful */ success: boolean; /** Transaction signature on blockchain */ txSignature: string; /** Amount paid by user */ amount: number; /** Token type used for payment (SOL, USDC, or custom token symbol/mint address) */ token: 'SOL' | 'USDC' | string; /** Timestamp when payment was completed (ISO string) */ timestamp: string; /** Purchase ID from Arcadia database (for tracking/reference) */ purchaseId?: string; /** Platform fee deducted (for transparency) */ platformFee?: number; /** Amount received by developer (after platform fee) */ developerAmount?: number; /** Optional error message if payment failed */ error?: string; } /** * Wallet connection information */ export interface WalletInfo { /** Whether wallet is connected */ connected: boolean; /** Wallet address (public key) or null if not connected */ address: string | null; } /** * Message types for postMessage communication */ export declare enum MessageType { INIT_REQUEST = "INIT_REQUEST", GET_WALLET_ADDRESS = "GET_WALLET_ADDRESS", PAYMENT_REQUEST = "PAYMENT_REQUEST", GAME_READY = "GAME_READY", INIT = "INIT", WALLET_ADDRESS_RESPONSE = "WALLET_ADDRESS_RESPONSE", WALLET_UPDATE = "WALLET_UPDATE", PAYMENT_RESPONSE = "PAYMENT_RESPONSE" } /** * Payment request payload */ export interface PaymentRequest { /** Payment amount */ amount: number; /** Token type: 'SOL', 'USDC', or custom token symbol/mint address */ token: 'SOL' | 'USDC' | string; /** Optional: Explicit mint address for custom tokens (if token is symbol) */ tokenAddress?: string; /** Payment type */ type: 'pay_to_play' | 'in_game_purchase'; /** Game ID */ gameId: string; /** Optional: Item ID for in-game purchases */ itemId?: string; /** Optional: Transaction signature (required for non-iframe mode) */ txSignature?: string; } /** * Payment response payload */ export interface PaymentResponse { /** Whether payment was successful */ success: boolean; /** Transaction signature if successful */ txSignature?: string; /** Amount paid by user */ amount?: number; /** Token type used for payment (SOL, USDC, or custom token symbol/mint address) */ token?: 'SOL' | 'USDC' | string; /** Timestamp when payment was completed (ISO string) */ timestamp?: string; /** Purchase ID from Arcadia database (for tracking/reference) */ purchaseId?: string; /** Platform fee deducted (for transparency) */ platformFee?: number; /** Amount received by developer (after platform fee) */ developerAmount?: number; /** Error message if failed */ error?: string; } /** * Message envelope for postMessage */ export interface Message { /** Message type */ type: MessageType | string; /** Unique message ID for request/response matching */ id?: number; /** Message payload */ payload?: any; } /** * Initialization data from parent */ export interface InitData { /** Game ID */ gameId: string; /** User ID */ userId: string; /** Wallet information */ wallet: WalletInfo; } /** * Wallet address response */ export interface WalletAddressResponse { /** Wallet address or null */ walletAddress: string | null; /** Whether wallet is connected */ connected: boolean; } //# sourceMappingURL=types.d.ts.map