-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
55 lines (50 loc) · 1.07 KB
/
Copy pathtypes.ts
File metadata and controls
55 lines (50 loc) · 1.07 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
export enum PlanFrequency {
DAILY = 'Daily',
WEEKLY = 'Weekly',
MONTHLY = 'Monthly',
YEARLY = 'Yearly'
}
export interface Plan {
id: string;
name: string;
creator: string;
amount: number;
token: string;
frequency: PlanFrequency;
subscribers: number;
description: string;
isActive: boolean;
imageUrl?: string;
}
export interface Subscription {
id: string;
planId: string;
planName: string;
creator: string;
nextPayment: Date;
cyclesCompleted: number;
totalPaid: number;
status: 'Active' | 'Cancelled' | 'Past Due';
}
export interface Transaction {
id: string;
hash: string;
planName: string;
date: Date;
amount: number;
status: 'Success' | 'Failed' | 'Pending';
}
export interface WalletState {
isConnected: boolean;
address: string | null;
balance: number;
connect: (walletType?: 'metamask', options?: { silent?: boolean }) => Promise<void>;
disconnect: () => void;
walletType?: 'metamask';
}
export interface CreatorStats {
totalRevenue: number;
activeSubscribers: number;
activePlans: number;
churnRate: number;
}