-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
196 lines (182 loc) · 5 KB
/
index.d.ts
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
declare module 'node-sparkpool' {
export interface CurrencyStats {
poolHashrate?: string
income?: number
meanIncome24h?: number
incomeHashrate?: string
blocks?: number
miners?: number
workers?: number
networkHashrate?: string
networkHashrateDiff?: number
difficulty?: string
difficultyDiff?: number
hashrate?: string
hashrateDiff?: number
usd?: number
usdDiff?: number
cny?: number
cnyDiff?: number
usdMarketValue?: number
cnyMarketValue?: number
rank?: number
}
export interface currencyStatsHistory {
difficulty: string
hashrate: string
income: number
incomeHashrate: string
usd: number
cny: number
time: string
}
export interface PoolStats {
pool: string
currency: string
income: number
meanIncome24h: number
incomeHashrate: string
blocks: number
hashrate: string
miners: number
workers: number
usd: number
usdDiff: number
cny: number
cnyDiff: string
networkHashrate: string
diff: number
message?: string
}
export interface MinerSharesHistory {
time: string
hashrate: string
meanHashrate: string
localHashrate: string
validShares: number
staleShares: number
invalidShares: number
}
export interface MinerStats {
hashrate: string
meanHashrate24h: string
localHashrate: string
meanLocalHashrate24h: string
validShares24h: number
staleShares24h: number
invalidShares24h: number
onlineWorkerCount: number
offlineWorkerCount: number
}
export interface WorkerCountHistory {
time: string
count: number
}
export interface WorkerList {
worker: string
hashrate: string
meanHashrate24h: string
localHashrate: string
meanLocalHashrate24h: string
meanHashrateDiff: string // Math.abs(meanLocalHashrate24h-meanHashrate24h)/meanLocalHashrate24h
validShares: number
staleShares: number
invalidShares: number
validShares24h: number
staleShares24h: number
invalidShares24h: number
staleRate: number
invalidRate: number
online: boolean
lastReportTime: string
pager?: {
pageSize?: number
currentPage?: number
orderBy?: string
direction?: string
totalPage?: number
totalCount?: number
}
}
export interface WorkerSharesHistory {
time: string
hashrate: string
meanHashrate: string
localHashrate: string
validShares: number
staleShares: number
invalidShares: number
}
export interface WorkerStats {
hashrate: string
meanHashrate24h: string
localHashrate: string
meanLocalHashrate24h: string
validShares24h: number
staleShares24h: number
invalidShares24h: number
}
export interface BillList {
time: string
amount: number
transactionId: string
exchangeInfo: string
status: string // INIT, PENDING, ACCEPT, SUBMITED_TO_USER, FINALIZED, SUCCESS
uniqNo: string
pager: {
pageNum: number
pageSize: number
totalCount: number
}
}
export interface BillStats {
balance: number
initBalance: number
penddingBalance: number
lastPaid: number
lastPayTime: string
totalPaid: number
pay1day: number
pay1week: number
paid30days: number
}
export interface PayoutHistory {
time: string
amount: number
meanAmount: number
}
export interface SparkPool {
minerSharesHistory (options: { currency: string, miner: string, zoom?: string }): Promise<MinerSharesHistory[]>,
minerStats (options: { currency: string, miner: string }): Promise<MinerStats>,
workerCountHistory (options: { currency: string, miner: string, zoom?: string }): Promise<WorkerCountHistory[]>,
workerList (options: {
currency: string,
miner: string,
pageSize: number,
currentPage: number,
orderBy?: string,
direction?: string,
only?: string,
showDisabled?: number,
invalidRateSymbol?: string,
invalidRate?: number,
staleRateSymbol?: string,
staleRate?: number,
meanHashrateDiffSymbol?: string,
meanHashrateDiff?: number,
worker?: string
}): Promise<WorkerList[]>,
workerSharesHistory (options: { currency: string, miner: string, worker: string, zoom?: string }): Promise<WorkerSharesHistory[]>,
workerStats (options: { currency: string, miner: string, worker: string }): Promise<WorkerStats>,
billList (options: { currency: string, miner: string, pageNum?: number, pageSize?: number }): Promise<BillList[]>,
billStats (options: { currency: string, miner: string }): Promise<BillStats>,
payoutHistory (options: { currency: string, miner: string }): Promise<PayoutHistory[]>,
currencyStats (options: { currency: string }): Promise<CurrencyStats>,
currencyStatsHistory (options: { currency: string, zoom: string }): Promise<currencyStatsHistory[]>,
poolStats (): Promise<PoolStats[]>,
}
export default function (options?: {
endpoint?: string
timeout?: number
}): SparkPool
}