wisdom-sdk
Version:
Core business logic and data access layer for prediction markets
15 lines (13 loc) • 708 B
text/typescript
declare const userStatsStore: {
calculateUserScore(stats: any): number;
getUserStats(userId: string): Promise<{} | null>;
updateStatsForNewPrediction(userId: string, prediction: any): Promise<any>;
updateStatsForResolvedPrediction(userId: string, prediction: any, isCorrect: boolean, earnings: number): Promise<any>;
updateUsername(userId: string, username: string): Promise<any>;
updateLeaderboardEntries(stats: any): Promise<void>;
getTopEarners(limit?: number): Promise<any[]>;
getTopAccurate(limit?: number): Promise<any[]>;
getTopUsers(limit?: number): Promise<any[]>;
getUserStatsForIds(userIds: string[]): Promise<({} | null)[]>;
};
export { userStatsStore };