import { ChainId } from '@dcl/schemas/dist/dapps/chain-id'; import { BaseClient, BaseClientConfig } from '../../lib'; import { CreditsNameRouteResponse, CreditsResponse, SeasonResponse } from './types'; export declare class CreditsClient extends BaseClient { readonly url: string; constructor(url: string, config?: BaseClientConfig); /** * Fetches the credits for a user * @param address - The user's address * @returns The credits for the user */ fetchCredits(address: string): Promise; /** * Fetches the current season data * @returns The season data */ fetchSeason(): Promise; /** * Fetches the credits name route for claiming a NAME using credits * @param name - The NAME to claim * @param chainId - The chain ID for the transaction * @returns The route data for the credits transaction */ fetchCreditsNameRoute(name: string, chainId: ChainId): Promise; /** * Creates an SSE connection with reconnection logic * @param address - The user's address * @param onMessage - Callback function for received messages * @param onError - Callback function for errors * @returns Object with close method to manually disconnect */ createSSEConnection(address: string, onMessage: (data: CreditsResponse) => void, onError: (error: Event) => void): { close: () => void; }; }