-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
68 lines (61 loc) · 1.67 KB
/
Copy pathtypes.ts
File metadata and controls
68 lines (61 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
export type VerificationStatus = 'pending' | 'verified' | 'flagged' | 'rejected';
export type ChallengeCategory = 'Strength' | 'Endurance' | 'Genesis' | 'Sprint' | 'Community';
export type ChallengeStatus = 'draft' | 'active' | 'finalizing' | 'settled';
export type RecurrenceProtocol = 'once' | 'daily' | 'weekly' | 'monthly';
export interface Workout {
id: string;
exercise: string;
reps: number;
sets: number;
duration?: number;
timestamp: number;
photo?: string;
xProofUrl?: string;
powVerified: boolean;
verificationStatus: VerificationStatus;
aiReason?: string;
aiConfidence?: number;
validatorReason?: string;
isImported?: boolean;
participantName?: string;
challengeId?: string;
challengeName?: string;
}
export interface PeerWorkout extends Omit<Workout, 'photo'> {
peerName: string;
location: string;
}
export interface Challenge {
id: string;
title: string;
description: string;
targetDays: number;
currentDays: number;
joined: boolean;
startDate?: number;
creatorNode?: string;
category: ChallengeCategory;
targetTotalReps?: number;
isPublic?: boolean;
// New Settlement Fields
rewardSats?: number;
recurrence: RecurrenceProtocol;
status: ChallengeStatus;
payoutProofUrl?: string;
}
export interface UserStats {
streak: number;
lastWorkoutDate?: string;
totalReps: number;
totalSets: number;
}
export type Page = 'home' | 'network' | 'log' | 'challenges' | 'progress' | 'settings' | 'validator' | 'tutorial';
export interface AppState {
workouts: Workout[];
challenges: Challenge[];
stats: UserStats;
theme: 'light' | 'dark';
aiOracleEnabled: boolean;
userName: string;
lightningAddress: string;
}