import { ApiClient } from '../core/client'; import { UserResponseDto, UserBalanceResponseDto, OffsetPaginatedDto, NetworkAddressAndPriceDto, TokenInfoWithPriceChangeDto, TokenInfo, TokenPriceHistoryParams, TokenPriceHistoryResponse, AccountTokensBalancesResponse, AlchemyNetwork, SupaPointsBalanceResponseDto, DailyLoginResponseDto, SupaPointsHistoryParams, TransactionQueryParams, PaymasterRequestDto, PaymasterResponseDto } from '../core/types'; export declare class ApiService { private client; private userMeCache; private userMeCacheTimestamp; private userMePendingPromise; private supaPointsBalanceCache; private supaPointsBalanceCacheTimestamp; private supaPointsBalancePendingPromise; private privyBalanceCache; private privyBalanceCacheTimestamp; private privyBalancePendingPromise; private readonly USER_CACHE_TTL; constructor(client: ApiClient); /** * Invalidate /supa_points/balance cache */ private invalidateSupaPointsCache; /** * Get current user information * GET /user/me * With 5 minute caching and request deduplication */ getCurrentUser(force?: boolean): Promise; /** * Get all users * GET /user/all */ getAllUsers(): Promise; /** * Get user by Privy user ID * GET /user/{privyUserId} */ getUserByPrivyId(privyUserId: string): Promise; /** * Get current user's smart wallet token balances * GET /user/smart_wallet_balances */ getSmartWalletBalances(force?: boolean): Promise; /** * Get token prices by contract addresses * POST /onchain/tokens_prices_by_addresses */ getTokenPricesByAddresses(addresses: Array<{ network: AlchemyNetwork; contractAddress: string; }>): Promise; /** * Get token prices by symbols * GET /onchain/tokens_prices * @param symbols Array of token symbols (e.g., ['BTC', 'ETH', 'USDT']) */ getTokenPrices(symbols: string[]): Promise>; /** * Get token price history * GET /onchain/token_price_history */ getTokenPriceHistory(params: TokenPriceHistoryParams): Promise; /** * Get 24hr price changes for tokens * POST /onchain/tokens_24hr_changes */ getTokens24hrPriceChanges(tokens: Array<{ network: AlchemyNetwork; contractAddress: string; }>): Promise; /** * Get token info by address(es) * GET /onchain/token_info/{network} * @param network Blockchain network * @param addresses Single address or array of addresses */ getTokenInfo(network: string, addresses: string | string[]): Promise>; /** * Get account token balances * GET /onchain/account_tokens_balances/{network} */ getAccountTokenBalances(network: string, account: string, force?: boolean): Promise; /** * Get user transactions * GET /transactions */ getTransactions(params?: TransactionQueryParams): Promise; /** * Force load user transactions * POST /transactions/transactions_force */ forceLoadTransactions(params?: TransactionQueryParams): Promise; /** * Get SupaPoints balance * GET /supa_points/balance * With 5 minute caching and request deduplication */ getSupaPointsBalance(force?: boolean): Promise; /** * Get SupaPoints history * GET /supa_points/history */ getSupaPointsHistory(params?: SupaPointsHistoryParams): Promise>; /** * Process daily login * POST /supa_points/daily_login */ dailyLogin(): Promise; /** * Check if paymaster can sponsor user operation * POST /paymaster */ checkPaymasterSponsorship(request: PaymasterRequestDto): Promise; /** * Get Privy balance * GET /privy/balance * With 5 minute caching and request deduplication */ getPrivyBalance(force?: boolean): Promise; } export declare function createApiService(client: ApiClient): ApiService; export declare function getApiService(): ApiService;