@binance/mining 4.0.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk.mjs +13 -0
- package/dist/index.d.mts +1718 -2028
- package/dist/index.d.ts +1720 -2030
- package/dist/index.js +794 -1177
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +717 -1171
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,1185 +1,731 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
for (var name2 in all)
|
|
4
|
-
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// src/mining.ts
|
|
8
|
-
import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI3, MINING_REST_API_PROD_URL } from "@binance/common";
|
|
1
|
+
import { t as __export } from "./chunk.mjs";
|
|
2
|
+
import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, MINING_REST_API_PROD_URL as MINING_REST_API_PROD_URL$1, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError, assertParamExists, buildUserAgent, sendRequest } from "@binance/common";
|
|
9
3
|
|
|
10
|
-
|
|
4
|
+
//#region package.json
|
|
11
5
|
var name = "@binance/mining";
|
|
12
|
-
var version = "4.0.
|
|
13
|
-
|
|
14
|
-
// src/rest-api/index.ts
|
|
15
|
-
var rest_api_exports = {};
|
|
16
|
-
__export(rest_api_exports, {
|
|
17
|
-
MiningApi: () => MiningApi,
|
|
18
|
-
RestAPI: () => RestAPI
|
|
19
|
-
});
|
|
6
|
+
var version = "4.0.2";
|
|
20
7
|
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
localVarQueryParameter["userName"] = userName;
|
|
266
|
-
}
|
|
267
|
-
if (pageIndex !== void 0 && pageIndex !== null) {
|
|
268
|
-
localVarQueryParameter["pageIndex"] = pageIndex;
|
|
269
|
-
}
|
|
270
|
-
if (pageSize !== void 0 && pageSize !== null) {
|
|
271
|
-
localVarQueryParameter["pageSize"] = pageSize;
|
|
272
|
-
}
|
|
273
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
274
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
275
|
-
}
|
|
276
|
-
let _timeUnit;
|
|
277
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
278
|
-
return {
|
|
279
|
-
endpoint: "/sapi/v1/mining/hash-transfer/profit/details",
|
|
280
|
-
method: "GET",
|
|
281
|
-
params: localVarQueryParameter,
|
|
282
|
-
timeUnit: _timeUnit
|
|
283
|
-
};
|
|
284
|
-
},
|
|
285
|
-
/**
|
|
286
|
-
* Hashrate Resale List
|
|
287
|
-
*
|
|
288
|
-
* Weight: 5
|
|
289
|
-
*
|
|
290
|
-
* @summary Hashrate Resale List
|
|
291
|
-
* @param {number | bigint} [pageIndex] Page number, empty default first page, starting from 1
|
|
292
|
-
* @param {number | bigint} [pageSize] Min 10,Max 200
|
|
293
|
-
* @param {number | bigint} [recvWindow]
|
|
294
|
-
*
|
|
295
|
-
* @throws {RequiredError}
|
|
296
|
-
*/
|
|
297
|
-
hashrateResaleList: async (pageIndex, pageSize, recvWindow) => {
|
|
298
|
-
const localVarQueryParameter = {};
|
|
299
|
-
if (pageIndex !== void 0 && pageIndex !== null) {
|
|
300
|
-
localVarQueryParameter["pageIndex"] = pageIndex;
|
|
301
|
-
}
|
|
302
|
-
if (pageSize !== void 0 && pageSize !== null) {
|
|
303
|
-
localVarQueryParameter["pageSize"] = pageSize;
|
|
304
|
-
}
|
|
305
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
306
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
307
|
-
}
|
|
308
|
-
let _timeUnit;
|
|
309
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
310
|
-
return {
|
|
311
|
-
endpoint: "/sapi/v1/mining/hash-transfer/config/details/list",
|
|
312
|
-
method: "GET",
|
|
313
|
-
params: localVarQueryParameter,
|
|
314
|
-
timeUnit: _timeUnit
|
|
315
|
-
};
|
|
316
|
-
},
|
|
317
|
-
/**
|
|
318
|
-
* Hashrate Resale Request
|
|
319
|
-
*
|
|
320
|
-
* Weight: 5
|
|
321
|
-
*
|
|
322
|
-
* @summary Hashrate Resale Request(USER_DATA)
|
|
323
|
-
* @param {string} userName Mining account test
|
|
324
|
-
* @param {string} algo Algorithm(sha256) sha256
|
|
325
|
-
* @param {number | bigint} endDate Resale End Time (Millisecond timestamp) 1617659086000
|
|
326
|
-
* @param {number | bigint} startDate Resale Start Time(Millisecond timestamp) 1607659086000
|
|
327
|
-
* @param {string} toPoolUser Mining Account S19pro
|
|
328
|
-
* @param {number | bigint} hashRate Resale hashrate h/s must be transferred (BTC is greater than 500000000000 ETH is greater than 500000) 100000000
|
|
329
|
-
* @param {number | bigint} [recvWindow]
|
|
330
|
-
*
|
|
331
|
-
* @throws {RequiredError}
|
|
332
|
-
*/
|
|
333
|
-
hashrateResaleRequest: async (userName, algo, endDate, startDate, toPoolUser, hashRate, recvWindow) => {
|
|
334
|
-
assertParamExists("hashrateResaleRequest", "userName", userName);
|
|
335
|
-
assertParamExists("hashrateResaleRequest", "algo", algo);
|
|
336
|
-
assertParamExists("hashrateResaleRequest", "endDate", endDate);
|
|
337
|
-
assertParamExists("hashrateResaleRequest", "startDate", startDate);
|
|
338
|
-
assertParamExists("hashrateResaleRequest", "toPoolUser", toPoolUser);
|
|
339
|
-
assertParamExists("hashrateResaleRequest", "hashRate", hashRate);
|
|
340
|
-
const localVarQueryParameter = {};
|
|
341
|
-
if (userName !== void 0 && userName !== null) {
|
|
342
|
-
localVarQueryParameter["userName"] = userName;
|
|
343
|
-
}
|
|
344
|
-
if (algo !== void 0 && algo !== null) {
|
|
345
|
-
localVarQueryParameter["algo"] = algo;
|
|
346
|
-
}
|
|
347
|
-
if (endDate !== void 0 && endDate !== null) {
|
|
348
|
-
localVarQueryParameter["endDate"] = endDate;
|
|
349
|
-
}
|
|
350
|
-
if (startDate !== void 0 && startDate !== null) {
|
|
351
|
-
localVarQueryParameter["startDate"] = startDate;
|
|
352
|
-
}
|
|
353
|
-
if (toPoolUser !== void 0 && toPoolUser !== null) {
|
|
354
|
-
localVarQueryParameter["toPoolUser"] = toPoolUser;
|
|
355
|
-
}
|
|
356
|
-
if (hashRate !== void 0 && hashRate !== null) {
|
|
357
|
-
localVarQueryParameter["hashRate"] = hashRate;
|
|
358
|
-
}
|
|
359
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
360
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
361
|
-
}
|
|
362
|
-
let _timeUnit;
|
|
363
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
364
|
-
return {
|
|
365
|
-
endpoint: "/sapi/v1/mining/hash-transfer/config",
|
|
366
|
-
method: "POST",
|
|
367
|
-
params: localVarQueryParameter,
|
|
368
|
-
timeUnit: _timeUnit
|
|
369
|
-
};
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
* Mining Account Earning
|
|
373
|
-
*
|
|
374
|
-
* Weight: 5
|
|
375
|
-
*
|
|
376
|
-
* @summary Mining Account Earning(USER_DATA)
|
|
377
|
-
* @param {string} algo Algorithm(sha256) sha256
|
|
378
|
-
* @param {number | bigint} [startDate] Millisecond timestamp
|
|
379
|
-
* @param {number | bigint} [endDate] Millisecond timestamp
|
|
380
|
-
* @param {number | bigint} [pageIndex] Page number, empty default first page, starting from 1
|
|
381
|
-
* @param {number | bigint} [pageSize] Min 10,Max 200
|
|
382
|
-
* @param {number | bigint} [recvWindow]
|
|
383
|
-
*
|
|
384
|
-
* @throws {RequiredError}
|
|
385
|
-
*/
|
|
386
|
-
miningAccountEarning: async (algo, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
387
|
-
assertParamExists("miningAccountEarning", "algo", algo);
|
|
388
|
-
const localVarQueryParameter = {};
|
|
389
|
-
if (algo !== void 0 && algo !== null) {
|
|
390
|
-
localVarQueryParameter["algo"] = algo;
|
|
391
|
-
}
|
|
392
|
-
if (startDate !== void 0 && startDate !== null) {
|
|
393
|
-
localVarQueryParameter["startDate"] = startDate;
|
|
394
|
-
}
|
|
395
|
-
if (endDate !== void 0 && endDate !== null) {
|
|
396
|
-
localVarQueryParameter["endDate"] = endDate;
|
|
397
|
-
}
|
|
398
|
-
if (pageIndex !== void 0 && pageIndex !== null) {
|
|
399
|
-
localVarQueryParameter["pageIndex"] = pageIndex;
|
|
400
|
-
}
|
|
401
|
-
if (pageSize !== void 0 && pageSize !== null) {
|
|
402
|
-
localVarQueryParameter["pageSize"] = pageSize;
|
|
403
|
-
}
|
|
404
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
405
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
406
|
-
}
|
|
407
|
-
let _timeUnit;
|
|
408
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
409
|
-
return {
|
|
410
|
-
endpoint: "/sapi/v1/mining/payment/uid",
|
|
411
|
-
method: "GET",
|
|
412
|
-
params: localVarQueryParameter,
|
|
413
|
-
timeUnit: _timeUnit
|
|
414
|
-
};
|
|
415
|
-
},
|
|
416
|
-
/**
|
|
417
|
-
* Request for Detail Miner List
|
|
418
|
-
*
|
|
419
|
-
* Weight: 5
|
|
420
|
-
*
|
|
421
|
-
* @summary Request for Detail Miner List(USER_DATA)
|
|
422
|
-
* @param {string} algo Algorithm(sha256) sha256
|
|
423
|
-
* @param {string} userName Mining account test
|
|
424
|
-
* @param {string} workerName Miner’s name(required) bhdc1.16A10404B
|
|
425
|
-
* @param {number | bigint} [recvWindow]
|
|
426
|
-
*
|
|
427
|
-
* @throws {RequiredError}
|
|
428
|
-
*/
|
|
429
|
-
requestForDetailMinerList: async (algo, userName, workerName, recvWindow) => {
|
|
430
|
-
assertParamExists("requestForDetailMinerList", "algo", algo);
|
|
431
|
-
assertParamExists("requestForDetailMinerList", "userName", userName);
|
|
432
|
-
assertParamExists("requestForDetailMinerList", "workerName", workerName);
|
|
433
|
-
const localVarQueryParameter = {};
|
|
434
|
-
if (algo !== void 0 && algo !== null) {
|
|
435
|
-
localVarQueryParameter["algo"] = algo;
|
|
436
|
-
}
|
|
437
|
-
if (userName !== void 0 && userName !== null) {
|
|
438
|
-
localVarQueryParameter["userName"] = userName;
|
|
439
|
-
}
|
|
440
|
-
if (workerName !== void 0 && workerName !== null) {
|
|
441
|
-
localVarQueryParameter["workerName"] = workerName;
|
|
442
|
-
}
|
|
443
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
444
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
445
|
-
}
|
|
446
|
-
let _timeUnit;
|
|
447
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
448
|
-
return {
|
|
449
|
-
endpoint: "/sapi/v1/mining/worker/detail",
|
|
450
|
-
method: "GET",
|
|
451
|
-
params: localVarQueryParameter,
|
|
452
|
-
timeUnit: _timeUnit
|
|
453
|
-
};
|
|
454
|
-
},
|
|
455
|
-
/**
|
|
456
|
-
* Request for Miner List
|
|
457
|
-
*
|
|
458
|
-
* Weight: 5
|
|
459
|
-
*
|
|
460
|
-
* @summary Request for Miner List(USER_DATA)
|
|
461
|
-
* @param {string} algo Algorithm(sha256) sha256
|
|
462
|
-
* @param {string} userName Mining account test
|
|
463
|
-
* @param {number | bigint} [pageIndex] Page number, empty default first page, starting from 1
|
|
464
|
-
* @param {number | bigint} [sort] sort sequence(default=0)0 positive sequence,1 negative sequence
|
|
465
|
-
* @param {number | bigint} [sortColumn] Sort by( default 1): <br></br>1: miner name, <br></br>2: real-time computing power, <br></br>3: daily average computing power, <br></br>4: real-time rejection rate, <br></br>5: last submission time
|
|
466
|
-
* @param {number | bigint} [workerStatus] miners status(default=0),0 all,1 valid,2 invalid,3 failure
|
|
467
|
-
* @param {number | bigint} [recvWindow]
|
|
468
|
-
*
|
|
469
|
-
* @throws {RequiredError}
|
|
470
|
-
*/
|
|
471
|
-
requestForMinerList: async (algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow) => {
|
|
472
|
-
assertParamExists("requestForMinerList", "algo", algo);
|
|
473
|
-
assertParamExists("requestForMinerList", "userName", userName);
|
|
474
|
-
const localVarQueryParameter = {};
|
|
475
|
-
if (algo !== void 0 && algo !== null) {
|
|
476
|
-
localVarQueryParameter["algo"] = algo;
|
|
477
|
-
}
|
|
478
|
-
if (userName !== void 0 && userName !== null) {
|
|
479
|
-
localVarQueryParameter["userName"] = userName;
|
|
480
|
-
}
|
|
481
|
-
if (pageIndex !== void 0 && pageIndex !== null) {
|
|
482
|
-
localVarQueryParameter["pageIndex"] = pageIndex;
|
|
483
|
-
}
|
|
484
|
-
if (sort !== void 0 && sort !== null) {
|
|
485
|
-
localVarQueryParameter["sort"] = sort;
|
|
486
|
-
}
|
|
487
|
-
if (sortColumn !== void 0 && sortColumn !== null) {
|
|
488
|
-
localVarQueryParameter["sortColumn"] = sortColumn;
|
|
489
|
-
}
|
|
490
|
-
if (workerStatus !== void 0 && workerStatus !== null) {
|
|
491
|
-
localVarQueryParameter["workerStatus"] = workerStatus;
|
|
492
|
-
}
|
|
493
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
494
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
495
|
-
}
|
|
496
|
-
let _timeUnit;
|
|
497
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
498
|
-
return {
|
|
499
|
-
endpoint: "/sapi/v1/mining/worker/list",
|
|
500
|
-
method: "GET",
|
|
501
|
-
params: localVarQueryParameter,
|
|
502
|
-
timeUnit: _timeUnit
|
|
503
|
-
};
|
|
504
|
-
},
|
|
505
|
-
/**
|
|
506
|
-
* Statistic List
|
|
507
|
-
*
|
|
508
|
-
* Weight: 5
|
|
509
|
-
*
|
|
510
|
-
* @summary Statistic List(USER_DATA)
|
|
511
|
-
* @param {string} algo Algorithm(sha256) sha256
|
|
512
|
-
* @param {string} userName Mining account test
|
|
513
|
-
* @param {number | bigint} [recvWindow]
|
|
514
|
-
*
|
|
515
|
-
* @throws {RequiredError}
|
|
516
|
-
*/
|
|
517
|
-
statisticList: async (algo, userName, recvWindow) => {
|
|
518
|
-
assertParamExists("statisticList", "algo", algo);
|
|
519
|
-
assertParamExists("statisticList", "userName", userName);
|
|
520
|
-
const localVarQueryParameter = {};
|
|
521
|
-
if (algo !== void 0 && algo !== null) {
|
|
522
|
-
localVarQueryParameter["algo"] = algo;
|
|
523
|
-
}
|
|
524
|
-
if (userName !== void 0 && userName !== null) {
|
|
525
|
-
localVarQueryParameter["userName"] = userName;
|
|
526
|
-
}
|
|
527
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
528
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
529
|
-
}
|
|
530
|
-
let _timeUnit;
|
|
531
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
532
|
-
return {
|
|
533
|
-
endpoint: "/sapi/v1/mining/statistics/user/status",
|
|
534
|
-
method: "GET",
|
|
535
|
-
params: localVarQueryParameter,
|
|
536
|
-
timeUnit: _timeUnit
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/rest-api/modules/mining-api.ts
|
|
10
|
+
/**
|
|
11
|
+
* Binance Mining REST API
|
|
12
|
+
*
|
|
13
|
+
* OpenAPI Specification for the Binance Mining REST API
|
|
14
|
+
*
|
|
15
|
+
* The version of the OpenAPI document: 1.0.0
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
19
|
+
* https://openapi-generator.tech
|
|
20
|
+
* Do not edit the class manually.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* MiningApi - axios parameter creator
|
|
24
|
+
*/
|
|
25
|
+
const MiningApiAxiosParamCreator = function(configuration) {
|
|
26
|
+
return {
|
|
27
|
+
accountList: async (algo, userName, recvWindow) => {
|
|
28
|
+
assertParamExists("accountList", "algo", algo);
|
|
29
|
+
assertParamExists("accountList", "userName", userName);
|
|
30
|
+
const localVarQueryParameter = {};
|
|
31
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
32
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
33
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
34
|
+
let _timeUnit;
|
|
35
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
36
|
+
return {
|
|
37
|
+
endpoint: "/sapi/v1/mining/statistics/user/list",
|
|
38
|
+
method: "GET",
|
|
39
|
+
params: localVarQueryParameter,
|
|
40
|
+
timeUnit: _timeUnit
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
acquiringAlgorithm: async () => {
|
|
44
|
+
const localVarQueryParameter = {};
|
|
45
|
+
let _timeUnit;
|
|
46
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
47
|
+
return {
|
|
48
|
+
endpoint: "/sapi/v1/mining/pub/algoList",
|
|
49
|
+
method: "GET",
|
|
50
|
+
params: localVarQueryParameter,
|
|
51
|
+
timeUnit: _timeUnit
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
acquiringCoinname: async () => {
|
|
55
|
+
const localVarQueryParameter = {};
|
|
56
|
+
let _timeUnit;
|
|
57
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
58
|
+
return {
|
|
59
|
+
endpoint: "/sapi/v1/mining/pub/coinList",
|
|
60
|
+
method: "GET",
|
|
61
|
+
params: localVarQueryParameter,
|
|
62
|
+
timeUnit: _timeUnit
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
cancelHashrateResaleConfiguration: async (configId, userName, recvWindow) => {
|
|
66
|
+
assertParamExists("cancelHashrateResaleConfiguration", "configId", configId);
|
|
67
|
+
assertParamExists("cancelHashrateResaleConfiguration", "userName", userName);
|
|
68
|
+
const localVarQueryParameter = {};
|
|
69
|
+
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
70
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
71
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
72
|
+
let _timeUnit;
|
|
73
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
74
|
+
return {
|
|
75
|
+
endpoint: "/sapi/v1/mining/hash-transfer/config/cancel",
|
|
76
|
+
method: "POST",
|
|
77
|
+
params: localVarQueryParameter,
|
|
78
|
+
timeUnit: _timeUnit
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
earningsList: async (algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
82
|
+
assertParamExists("earningsList", "algo", algo);
|
|
83
|
+
assertParamExists("earningsList", "userName", userName);
|
|
84
|
+
const localVarQueryParameter = {};
|
|
85
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
86
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
87
|
+
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
88
|
+
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
89
|
+
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
90
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
91
|
+
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
92
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
93
|
+
let _timeUnit;
|
|
94
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
95
|
+
return {
|
|
96
|
+
endpoint: "/sapi/v1/mining/payment/list",
|
|
97
|
+
method: "GET",
|
|
98
|
+
params: localVarQueryParameter,
|
|
99
|
+
timeUnit: _timeUnit
|
|
100
|
+
};
|
|
101
|
+
},
|
|
102
|
+
extraBonusList: async (algo, userName, coin, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
103
|
+
assertParamExists("extraBonusList", "algo", algo);
|
|
104
|
+
assertParamExists("extraBonusList", "userName", userName);
|
|
105
|
+
const localVarQueryParameter = {};
|
|
106
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
107
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
108
|
+
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
109
|
+
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
110
|
+
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
111
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
112
|
+
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
113
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
114
|
+
let _timeUnit;
|
|
115
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
116
|
+
return {
|
|
117
|
+
endpoint: "/sapi/v1/mining/payment/other",
|
|
118
|
+
method: "GET",
|
|
119
|
+
params: localVarQueryParameter,
|
|
120
|
+
timeUnit: _timeUnit
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
hashrateResaleDetail: async (configId, userName, pageIndex, pageSize, recvWindow) => {
|
|
124
|
+
assertParamExists("hashrateResaleDetail", "configId", configId);
|
|
125
|
+
assertParamExists("hashrateResaleDetail", "userName", userName);
|
|
126
|
+
const localVarQueryParameter = {};
|
|
127
|
+
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
128
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
129
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
130
|
+
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
131
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
132
|
+
let _timeUnit;
|
|
133
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
134
|
+
return {
|
|
135
|
+
endpoint: "/sapi/v1/mining/hash-transfer/profit/details",
|
|
136
|
+
method: "GET",
|
|
137
|
+
params: localVarQueryParameter,
|
|
138
|
+
timeUnit: _timeUnit
|
|
139
|
+
};
|
|
140
|
+
},
|
|
141
|
+
hashrateResaleList: async (pageIndex, pageSize, recvWindow) => {
|
|
142
|
+
const localVarQueryParameter = {};
|
|
143
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
144
|
+
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
145
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
146
|
+
let _timeUnit;
|
|
147
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
148
|
+
return {
|
|
149
|
+
endpoint: "/sapi/v1/mining/hash-transfer/config/details/list",
|
|
150
|
+
method: "GET",
|
|
151
|
+
params: localVarQueryParameter,
|
|
152
|
+
timeUnit: _timeUnit
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
hashrateResaleRequest: async (userName, algo, endDate, startDate, toPoolUser, hashRate, recvWindow) => {
|
|
156
|
+
assertParamExists("hashrateResaleRequest", "userName", userName);
|
|
157
|
+
assertParamExists("hashrateResaleRequest", "algo", algo);
|
|
158
|
+
assertParamExists("hashrateResaleRequest", "endDate", endDate);
|
|
159
|
+
assertParamExists("hashrateResaleRequest", "startDate", startDate);
|
|
160
|
+
assertParamExists("hashrateResaleRequest", "toPoolUser", toPoolUser);
|
|
161
|
+
assertParamExists("hashrateResaleRequest", "hashRate", hashRate);
|
|
162
|
+
const localVarQueryParameter = {};
|
|
163
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
164
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
165
|
+
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
166
|
+
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
167
|
+
if (toPoolUser !== void 0 && toPoolUser !== null) localVarQueryParameter["toPoolUser"] = toPoolUser;
|
|
168
|
+
if (hashRate !== void 0 && hashRate !== null) localVarQueryParameter["hashRate"] = hashRate;
|
|
169
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
170
|
+
let _timeUnit;
|
|
171
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
172
|
+
return {
|
|
173
|
+
endpoint: "/sapi/v1/mining/hash-transfer/config",
|
|
174
|
+
method: "POST",
|
|
175
|
+
params: localVarQueryParameter,
|
|
176
|
+
timeUnit: _timeUnit
|
|
177
|
+
};
|
|
178
|
+
},
|
|
179
|
+
miningAccountEarning: async (algo, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
180
|
+
assertParamExists("miningAccountEarning", "algo", algo);
|
|
181
|
+
const localVarQueryParameter = {};
|
|
182
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
183
|
+
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
184
|
+
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
185
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
186
|
+
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
187
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
188
|
+
let _timeUnit;
|
|
189
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
190
|
+
return {
|
|
191
|
+
endpoint: "/sapi/v1/mining/payment/uid",
|
|
192
|
+
method: "GET",
|
|
193
|
+
params: localVarQueryParameter,
|
|
194
|
+
timeUnit: _timeUnit
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
requestForDetailMinerList: async (algo, userName, workerName, recvWindow) => {
|
|
198
|
+
assertParamExists("requestForDetailMinerList", "algo", algo);
|
|
199
|
+
assertParamExists("requestForDetailMinerList", "userName", userName);
|
|
200
|
+
assertParamExists("requestForDetailMinerList", "workerName", workerName);
|
|
201
|
+
const localVarQueryParameter = {};
|
|
202
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
203
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
204
|
+
if (workerName !== void 0 && workerName !== null) localVarQueryParameter["workerName"] = workerName;
|
|
205
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
206
|
+
let _timeUnit;
|
|
207
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
208
|
+
return {
|
|
209
|
+
endpoint: "/sapi/v1/mining/worker/detail",
|
|
210
|
+
method: "GET",
|
|
211
|
+
params: localVarQueryParameter,
|
|
212
|
+
timeUnit: _timeUnit
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
requestForMinerList: async (algo, userName, pageIndex, sort, sortColumn, workerStatus, recvWindow) => {
|
|
216
|
+
assertParamExists("requestForMinerList", "algo", algo);
|
|
217
|
+
assertParamExists("requestForMinerList", "userName", userName);
|
|
218
|
+
const localVarQueryParameter = {};
|
|
219
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
220
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
221
|
+
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
222
|
+
if (sort !== void 0 && sort !== null) localVarQueryParameter["sort"] = sort;
|
|
223
|
+
if (sortColumn !== void 0 && sortColumn !== null) localVarQueryParameter["sortColumn"] = sortColumn;
|
|
224
|
+
if (workerStatus !== void 0 && workerStatus !== null) localVarQueryParameter["workerStatus"] = workerStatus;
|
|
225
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
226
|
+
let _timeUnit;
|
|
227
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
228
|
+
return {
|
|
229
|
+
endpoint: "/sapi/v1/mining/worker/list",
|
|
230
|
+
method: "GET",
|
|
231
|
+
params: localVarQueryParameter,
|
|
232
|
+
timeUnit: _timeUnit
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
statisticList: async (algo, userName, recvWindow) => {
|
|
236
|
+
assertParamExists("statisticList", "algo", algo);
|
|
237
|
+
assertParamExists("statisticList", "userName", userName);
|
|
238
|
+
const localVarQueryParameter = {};
|
|
239
|
+
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
240
|
+
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
241
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
242
|
+
let _timeUnit;
|
|
243
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
244
|
+
return {
|
|
245
|
+
endpoint: "/sapi/v1/mining/statistics/user/status",
|
|
246
|
+
method: "GET",
|
|
247
|
+
params: localVarQueryParameter,
|
|
248
|
+
timeUnit: _timeUnit
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
};
|
|
540
252
|
};
|
|
253
|
+
/**
|
|
254
|
+
* MiningApi - object-oriented interface
|
|
255
|
+
* @class MiningApi
|
|
256
|
+
*/
|
|
541
257
|
var MiningApi = class {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
requestParameters?.pageSize,
|
|
752
|
-
requestParameters?.recvWindow
|
|
753
|
-
);
|
|
754
|
-
return sendRequest(
|
|
755
|
-
this.configuration,
|
|
756
|
-
localVarAxiosArgs.endpoint,
|
|
757
|
-
localVarAxiosArgs.method,
|
|
758
|
-
localVarAxiosArgs.params,
|
|
759
|
-
localVarAxiosArgs?.timeUnit,
|
|
760
|
-
{ isSigned: true }
|
|
761
|
-
);
|
|
762
|
-
}
|
|
763
|
-
/**
|
|
764
|
-
* Hashrate Resale Request
|
|
765
|
-
*
|
|
766
|
-
* Weight: 5
|
|
767
|
-
*
|
|
768
|
-
* @summary Hashrate Resale Request(USER_DATA)
|
|
769
|
-
* @param {HashrateResaleRequestRequest} requestParameters Request parameters.
|
|
770
|
-
* @returns {Promise<RestApiResponse<HashrateResaleRequestResponse>>}
|
|
771
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
772
|
-
* @memberof MiningApi
|
|
773
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request Binance API Documentation}
|
|
774
|
-
*/
|
|
775
|
-
async hashrateResaleRequest(requestParameters) {
|
|
776
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleRequest(
|
|
777
|
-
requestParameters?.userName,
|
|
778
|
-
requestParameters?.algo,
|
|
779
|
-
requestParameters?.endDate,
|
|
780
|
-
requestParameters?.startDate,
|
|
781
|
-
requestParameters?.toPoolUser,
|
|
782
|
-
requestParameters?.hashRate,
|
|
783
|
-
requestParameters?.recvWindow
|
|
784
|
-
);
|
|
785
|
-
return sendRequest(
|
|
786
|
-
this.configuration,
|
|
787
|
-
localVarAxiosArgs.endpoint,
|
|
788
|
-
localVarAxiosArgs.method,
|
|
789
|
-
localVarAxiosArgs.params,
|
|
790
|
-
localVarAxiosArgs?.timeUnit,
|
|
791
|
-
{ isSigned: true }
|
|
792
|
-
);
|
|
793
|
-
}
|
|
794
|
-
/**
|
|
795
|
-
* Mining Account Earning
|
|
796
|
-
*
|
|
797
|
-
* Weight: 5
|
|
798
|
-
*
|
|
799
|
-
* @summary Mining Account Earning(USER_DATA)
|
|
800
|
-
* @param {MiningAccountEarningRequest} requestParameters Request parameters.
|
|
801
|
-
* @returns {Promise<RestApiResponse<MiningAccountEarningResponse>>}
|
|
802
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
803
|
-
* @memberof MiningApi
|
|
804
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning Binance API Documentation}
|
|
805
|
-
*/
|
|
806
|
-
async miningAccountEarning(requestParameters) {
|
|
807
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.miningAccountEarning(
|
|
808
|
-
requestParameters?.algo,
|
|
809
|
-
requestParameters?.startDate,
|
|
810
|
-
requestParameters?.endDate,
|
|
811
|
-
requestParameters?.pageIndex,
|
|
812
|
-
requestParameters?.pageSize,
|
|
813
|
-
requestParameters?.recvWindow
|
|
814
|
-
);
|
|
815
|
-
return sendRequest(
|
|
816
|
-
this.configuration,
|
|
817
|
-
localVarAxiosArgs.endpoint,
|
|
818
|
-
localVarAxiosArgs.method,
|
|
819
|
-
localVarAxiosArgs.params,
|
|
820
|
-
localVarAxiosArgs?.timeUnit,
|
|
821
|
-
{ isSigned: true }
|
|
822
|
-
);
|
|
823
|
-
}
|
|
824
|
-
/**
|
|
825
|
-
* Request for Detail Miner List
|
|
826
|
-
*
|
|
827
|
-
* Weight: 5
|
|
828
|
-
*
|
|
829
|
-
* @summary Request for Detail Miner List(USER_DATA)
|
|
830
|
-
* @param {RequestForDetailMinerListRequest} requestParameters Request parameters.
|
|
831
|
-
* @returns {Promise<RestApiResponse<RequestForDetailMinerListResponse>>}
|
|
832
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
833
|
-
* @memberof MiningApi
|
|
834
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List Binance API Documentation}
|
|
835
|
-
*/
|
|
836
|
-
async requestForDetailMinerList(requestParameters) {
|
|
837
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForDetailMinerList(
|
|
838
|
-
requestParameters?.algo,
|
|
839
|
-
requestParameters?.userName,
|
|
840
|
-
requestParameters?.workerName,
|
|
841
|
-
requestParameters?.recvWindow
|
|
842
|
-
);
|
|
843
|
-
return sendRequest(
|
|
844
|
-
this.configuration,
|
|
845
|
-
localVarAxiosArgs.endpoint,
|
|
846
|
-
localVarAxiosArgs.method,
|
|
847
|
-
localVarAxiosArgs.params,
|
|
848
|
-
localVarAxiosArgs?.timeUnit,
|
|
849
|
-
{ isSigned: true }
|
|
850
|
-
);
|
|
851
|
-
}
|
|
852
|
-
/**
|
|
853
|
-
* Request for Miner List
|
|
854
|
-
*
|
|
855
|
-
* Weight: 5
|
|
856
|
-
*
|
|
857
|
-
* @summary Request for Miner List(USER_DATA)
|
|
858
|
-
* @param {RequestForMinerListRequest} requestParameters Request parameters.
|
|
859
|
-
* @returns {Promise<RestApiResponse<RequestForMinerListResponse>>}
|
|
860
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
861
|
-
* @memberof MiningApi
|
|
862
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List Binance API Documentation}
|
|
863
|
-
*/
|
|
864
|
-
async requestForMinerList(requestParameters) {
|
|
865
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForMinerList(
|
|
866
|
-
requestParameters?.algo,
|
|
867
|
-
requestParameters?.userName,
|
|
868
|
-
requestParameters?.pageIndex,
|
|
869
|
-
requestParameters?.sort,
|
|
870
|
-
requestParameters?.sortColumn,
|
|
871
|
-
requestParameters?.workerStatus,
|
|
872
|
-
requestParameters?.recvWindow
|
|
873
|
-
);
|
|
874
|
-
return sendRequest(
|
|
875
|
-
this.configuration,
|
|
876
|
-
localVarAxiosArgs.endpoint,
|
|
877
|
-
localVarAxiosArgs.method,
|
|
878
|
-
localVarAxiosArgs.params,
|
|
879
|
-
localVarAxiosArgs?.timeUnit,
|
|
880
|
-
{ isSigned: true }
|
|
881
|
-
);
|
|
882
|
-
}
|
|
883
|
-
/**
|
|
884
|
-
* Statistic List
|
|
885
|
-
*
|
|
886
|
-
* Weight: 5
|
|
887
|
-
*
|
|
888
|
-
* @summary Statistic List(USER_DATA)
|
|
889
|
-
* @param {StatisticListRequest} requestParameters Request parameters.
|
|
890
|
-
* @returns {Promise<RestApiResponse<StatisticListResponse>>}
|
|
891
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
892
|
-
* @memberof MiningApi
|
|
893
|
-
* @see {@link https://developers.binance.com/docs/mining/rest-api/Statistic-List Binance API Documentation}
|
|
894
|
-
*/
|
|
895
|
-
async statisticList(requestParameters) {
|
|
896
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.statisticList(
|
|
897
|
-
requestParameters?.algo,
|
|
898
|
-
requestParameters?.userName,
|
|
899
|
-
requestParameters?.recvWindow
|
|
900
|
-
);
|
|
901
|
-
return sendRequest(
|
|
902
|
-
this.configuration,
|
|
903
|
-
localVarAxiosArgs.endpoint,
|
|
904
|
-
localVarAxiosArgs.method,
|
|
905
|
-
localVarAxiosArgs.params,
|
|
906
|
-
localVarAxiosArgs?.timeUnit,
|
|
907
|
-
{ isSigned: true }
|
|
908
|
-
);
|
|
909
|
-
}
|
|
258
|
+
constructor(configuration) {
|
|
259
|
+
this.configuration = configuration;
|
|
260
|
+
this.localVarAxiosParamCreator = MiningApiAxiosParamCreator(configuration);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Query Account List
|
|
264
|
+
*
|
|
265
|
+
* Weight: 5
|
|
266
|
+
*
|
|
267
|
+
* @summary Account List(USER_DATA)
|
|
268
|
+
* @param {AccountListRequest} requestParameters Request parameters.
|
|
269
|
+
* @returns {Promise<RestApiResponse<AccountListResponse>>}
|
|
270
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
271
|
+
* @memberof MiningApi
|
|
272
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Account-List Binance API Documentation}
|
|
273
|
+
*/
|
|
274
|
+
async accountList(requestParameters) {
|
|
275
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
276
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Acquiring Algorithm
|
|
280
|
+
*
|
|
281
|
+
* Weight: 1
|
|
282
|
+
*
|
|
283
|
+
* @summary Acquiring Algorithm(MARKET_DATA)
|
|
284
|
+
* @returns {Promise<RestApiResponse<AcquiringAlgorithmResponse>>}
|
|
285
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
286
|
+
* @memberof MiningApi
|
|
287
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-Algorithm Binance API Documentation}
|
|
288
|
+
*/
|
|
289
|
+
async acquiringAlgorithm() {
|
|
290
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringAlgorithm();
|
|
291
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Acquiring CoinName
|
|
295
|
+
*
|
|
296
|
+
* Weight: 1
|
|
297
|
+
*
|
|
298
|
+
* @summary Acquiring CoinName(MARKET_DATA)
|
|
299
|
+
* @returns {Promise<RestApiResponse<AcquiringCoinnameResponse>>}
|
|
300
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
301
|
+
* @memberof MiningApi
|
|
302
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-CoinName Binance API Documentation}
|
|
303
|
+
*/
|
|
304
|
+
async acquiringCoinname() {
|
|
305
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringCoinname();
|
|
306
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
*
|
|
310
|
+
* Weight: 5
|
|
311
|
+
*
|
|
312
|
+
* @summary Cancel hashrate resale configuration(USER_DATA)
|
|
313
|
+
* @param {CancelHashrateResaleConfigurationRequest} requestParameters Request parameters.
|
|
314
|
+
* @returns {Promise<RestApiResponse<CancelHashrateResaleConfigurationResponse>>}
|
|
315
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
316
|
+
* @memberof MiningApi
|
|
317
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Cancel-hashrate-resale-configuration Binance API Documentation}
|
|
318
|
+
*/
|
|
319
|
+
async cancelHashrateResaleConfiguration(requestParameters) {
|
|
320
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelHashrateResaleConfiguration(requestParameters?.configId, requestParameters?.userName, requestParameters?.recvWindow);
|
|
321
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Query Earnings List
|
|
325
|
+
*
|
|
326
|
+
* Weight: 5
|
|
327
|
+
*
|
|
328
|
+
* @summary Earnings List(USER_DATA)
|
|
329
|
+
* @param {EarningsListRequest} requestParameters Request parameters.
|
|
330
|
+
* @returns {Promise<RestApiResponse<EarningsListResponse>>}
|
|
331
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
332
|
+
* @memberof MiningApi
|
|
333
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Earnings-List Binance API Documentation}
|
|
334
|
+
*/
|
|
335
|
+
async earningsList(requestParameters) {
|
|
336
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.earningsList(requestParameters?.algo, requestParameters?.userName, requestParameters?.coin, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
337
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Extra Bonus List
|
|
341
|
+
*
|
|
342
|
+
* Weight: 5
|
|
343
|
+
*
|
|
344
|
+
* @summary Extra Bonus List(USER_DATA)
|
|
345
|
+
* @param {ExtraBonusListRequest} requestParameters Request parameters.
|
|
346
|
+
* @returns {Promise<RestApiResponse<ExtraBonusListResponse>>}
|
|
347
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
348
|
+
* @memberof MiningApi
|
|
349
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Extra-Bonus-List Binance API Documentation}
|
|
350
|
+
*/
|
|
351
|
+
async extraBonusList(requestParameters) {
|
|
352
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.extraBonusList(requestParameters?.algo, requestParameters?.userName, requestParameters?.coin, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
353
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Hashrate Resale Detail(USER_DATA)
|
|
357
|
+
*
|
|
358
|
+
* Weight: 5
|
|
359
|
+
*
|
|
360
|
+
* @summary Hashrate Resale Detail(USER_DATA)
|
|
361
|
+
* @param {HashrateResaleDetailRequest} requestParameters Request parameters.
|
|
362
|
+
* @returns {Promise<RestApiResponse<HashrateResaleDetailResponse>>}
|
|
363
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
364
|
+
* @memberof MiningApi
|
|
365
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Detail Binance API Documentation}
|
|
366
|
+
*/
|
|
367
|
+
async hashrateResaleDetail(requestParameters) {
|
|
368
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleDetail(requestParameters?.configId, requestParameters?.userName, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
369
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Hashrate Resale List
|
|
373
|
+
*
|
|
374
|
+
* Weight: 5
|
|
375
|
+
*
|
|
376
|
+
* @summary Hashrate Resale List
|
|
377
|
+
* @param {HashrateResaleListRequest} requestParameters Request parameters.
|
|
378
|
+
* @returns {Promise<RestApiResponse<HashrateResaleListResponse>>}
|
|
379
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
380
|
+
* @memberof MiningApi
|
|
381
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-List Binance API Documentation}
|
|
382
|
+
*/
|
|
383
|
+
async hashrateResaleList(requestParameters = {}) {
|
|
384
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleList(requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
385
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Hashrate Resale Request
|
|
389
|
+
*
|
|
390
|
+
* Weight: 5
|
|
391
|
+
*
|
|
392
|
+
* @summary Hashrate Resale Request(USER_DATA)
|
|
393
|
+
* @param {HashrateResaleRequestRequest} requestParameters Request parameters.
|
|
394
|
+
* @returns {Promise<RestApiResponse<HashrateResaleRequestResponse>>}
|
|
395
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
396
|
+
* @memberof MiningApi
|
|
397
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request Binance API Documentation}
|
|
398
|
+
*/
|
|
399
|
+
async hashrateResaleRequest(requestParameters) {
|
|
400
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleRequest(requestParameters?.userName, requestParameters?.algo, requestParameters?.endDate, requestParameters?.startDate, requestParameters?.toPoolUser, requestParameters?.hashRate, requestParameters?.recvWindow);
|
|
401
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Mining Account Earning
|
|
405
|
+
*
|
|
406
|
+
* Weight: 5
|
|
407
|
+
*
|
|
408
|
+
* @summary Mining Account Earning(USER_DATA)
|
|
409
|
+
* @param {MiningAccountEarningRequest} requestParameters Request parameters.
|
|
410
|
+
* @returns {Promise<RestApiResponse<MiningAccountEarningResponse>>}
|
|
411
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
412
|
+
* @memberof MiningApi
|
|
413
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning Binance API Documentation}
|
|
414
|
+
*/
|
|
415
|
+
async miningAccountEarning(requestParameters) {
|
|
416
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.miningAccountEarning(requestParameters?.algo, requestParameters?.startDate, requestParameters?.endDate, requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
417
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Request for Detail Miner List
|
|
421
|
+
*
|
|
422
|
+
* Weight: 5
|
|
423
|
+
*
|
|
424
|
+
* @summary Request for Detail Miner List(USER_DATA)
|
|
425
|
+
* @param {RequestForDetailMinerListRequest} requestParameters Request parameters.
|
|
426
|
+
* @returns {Promise<RestApiResponse<RequestForDetailMinerListResponse>>}
|
|
427
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
428
|
+
* @memberof MiningApi
|
|
429
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List Binance API Documentation}
|
|
430
|
+
*/
|
|
431
|
+
async requestForDetailMinerList(requestParameters) {
|
|
432
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForDetailMinerList(requestParameters?.algo, requestParameters?.userName, requestParameters?.workerName, requestParameters?.recvWindow);
|
|
433
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Request for Miner List
|
|
437
|
+
*
|
|
438
|
+
* Weight: 5
|
|
439
|
+
*
|
|
440
|
+
* @summary Request for Miner List(USER_DATA)
|
|
441
|
+
* @param {RequestForMinerListRequest} requestParameters Request parameters.
|
|
442
|
+
* @returns {Promise<RestApiResponse<RequestForMinerListResponse>>}
|
|
443
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
444
|
+
* @memberof MiningApi
|
|
445
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List Binance API Documentation}
|
|
446
|
+
*/
|
|
447
|
+
async requestForMinerList(requestParameters) {
|
|
448
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForMinerList(requestParameters?.algo, requestParameters?.userName, requestParameters?.pageIndex, requestParameters?.sort, requestParameters?.sortColumn, requestParameters?.workerStatus, requestParameters?.recvWindow);
|
|
449
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Statistic List
|
|
453
|
+
*
|
|
454
|
+
* Weight: 5
|
|
455
|
+
*
|
|
456
|
+
* @summary Statistic List(USER_DATA)
|
|
457
|
+
* @param {StatisticListRequest} requestParameters Request parameters.
|
|
458
|
+
* @returns {Promise<RestApiResponse<StatisticListResponse>>}
|
|
459
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
460
|
+
* @memberof MiningApi
|
|
461
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Statistic-List Binance API Documentation}
|
|
462
|
+
*/
|
|
463
|
+
async statisticList(requestParameters) {
|
|
464
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.statisticList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
465
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
466
|
+
}
|
|
910
467
|
};
|
|
911
468
|
|
|
912
|
-
|
|
913
|
-
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region src/rest-api/rest-api.ts
|
|
471
|
+
/**
|
|
472
|
+
* Binance Mining REST API
|
|
473
|
+
*
|
|
474
|
+
* OpenAPI Specification for the Binance Mining REST API
|
|
475
|
+
*
|
|
476
|
+
* The version of the OpenAPI document: 1.0.0
|
|
477
|
+
*
|
|
478
|
+
*
|
|
479
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
480
|
+
* https://openapi-generator.tech
|
|
481
|
+
* Do not edit the class manually.
|
|
482
|
+
*/
|
|
914
483
|
var RestAPI = class {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
return this.miningApi.statisticList(requestParameters);
|
|
1134
|
-
}
|
|
484
|
+
constructor(configuration) {
|
|
485
|
+
this.configuration = configuration;
|
|
486
|
+
this.miningApi = new MiningApi(configuration);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Generic function to send a request.
|
|
490
|
+
* @param endpoint - The API endpoint to call.
|
|
491
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
492
|
+
* @param params - Query parameters for the request.
|
|
493
|
+
*
|
|
494
|
+
* @returns A promise resolving to the response data object.
|
|
495
|
+
*/
|
|
496
|
+
sendRequest(endpoint, method, params = {}) {
|
|
497
|
+
return sendRequest(this.configuration, endpoint, method, params, void 0);
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Generic function to send a signed request.
|
|
501
|
+
* @param endpoint - The API endpoint to call.
|
|
502
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
503
|
+
* @param params - Query parameters for the request.
|
|
504
|
+
*
|
|
505
|
+
* @returns A promise resolving to the response data object.
|
|
506
|
+
*/
|
|
507
|
+
sendSignedRequest(endpoint, method, params = {}) {
|
|
508
|
+
return sendRequest(this.configuration, endpoint, method, params, void 0, { isSigned: true });
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Query Account List
|
|
512
|
+
*
|
|
513
|
+
* Weight: 5
|
|
514
|
+
*
|
|
515
|
+
* @summary Account List(USER_DATA)
|
|
516
|
+
* @param {AccountListRequest} requestParameters Request parameters.
|
|
517
|
+
*
|
|
518
|
+
* @returns {Promise<RestApiResponse<AccountListResponse>>}
|
|
519
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
520
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Account-List Binance API Documentation}
|
|
521
|
+
*/
|
|
522
|
+
accountList(requestParameters) {
|
|
523
|
+
return this.miningApi.accountList(requestParameters);
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Acquiring Algorithm
|
|
527
|
+
*
|
|
528
|
+
* Weight: 1
|
|
529
|
+
*
|
|
530
|
+
* @summary Acquiring Algorithm(MARKET_DATA)
|
|
531
|
+
*
|
|
532
|
+
* @returns {Promise<RestApiResponse<AcquiringAlgorithmResponse>>}
|
|
533
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
534
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-Algorithm Binance API Documentation}
|
|
535
|
+
*/
|
|
536
|
+
acquiringAlgorithm() {
|
|
537
|
+
return this.miningApi.acquiringAlgorithm();
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Acquiring CoinName
|
|
541
|
+
*
|
|
542
|
+
* Weight: 1
|
|
543
|
+
*
|
|
544
|
+
* @summary Acquiring CoinName(MARKET_DATA)
|
|
545
|
+
*
|
|
546
|
+
* @returns {Promise<RestApiResponse<AcquiringCoinnameResponse>>}
|
|
547
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
548
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-CoinName Binance API Documentation}
|
|
549
|
+
*/
|
|
550
|
+
acquiringCoinname() {
|
|
551
|
+
return this.miningApi.acquiringCoinname();
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
*
|
|
555
|
+
* Weight: 5
|
|
556
|
+
*
|
|
557
|
+
* @summary Cancel hashrate resale configuration(USER_DATA)
|
|
558
|
+
* @param {CancelHashrateResaleConfigurationRequest} requestParameters Request parameters.
|
|
559
|
+
*
|
|
560
|
+
* @returns {Promise<RestApiResponse<CancelHashrateResaleConfigurationResponse>>}
|
|
561
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
562
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Cancel-hashrate-resale-configuration Binance API Documentation}
|
|
563
|
+
*/
|
|
564
|
+
cancelHashrateResaleConfiguration(requestParameters) {
|
|
565
|
+
return this.miningApi.cancelHashrateResaleConfiguration(requestParameters);
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Query Earnings List
|
|
569
|
+
*
|
|
570
|
+
* Weight: 5
|
|
571
|
+
*
|
|
572
|
+
* @summary Earnings List(USER_DATA)
|
|
573
|
+
* @param {EarningsListRequest} requestParameters Request parameters.
|
|
574
|
+
*
|
|
575
|
+
* @returns {Promise<RestApiResponse<EarningsListResponse>>}
|
|
576
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
577
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Earnings-List Binance API Documentation}
|
|
578
|
+
*/
|
|
579
|
+
earningsList(requestParameters) {
|
|
580
|
+
return this.miningApi.earningsList(requestParameters);
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Extra Bonus List
|
|
584
|
+
*
|
|
585
|
+
* Weight: 5
|
|
586
|
+
*
|
|
587
|
+
* @summary Extra Bonus List(USER_DATA)
|
|
588
|
+
* @param {ExtraBonusListRequest} requestParameters Request parameters.
|
|
589
|
+
*
|
|
590
|
+
* @returns {Promise<RestApiResponse<ExtraBonusListResponse>>}
|
|
591
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
592
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Extra-Bonus-List Binance API Documentation}
|
|
593
|
+
*/
|
|
594
|
+
extraBonusList(requestParameters) {
|
|
595
|
+
return this.miningApi.extraBonusList(requestParameters);
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Hashrate Resale Detail(USER_DATA)
|
|
599
|
+
*
|
|
600
|
+
* Weight: 5
|
|
601
|
+
*
|
|
602
|
+
* @summary Hashrate Resale Detail(USER_DATA)
|
|
603
|
+
* @param {HashrateResaleDetailRequest} requestParameters Request parameters.
|
|
604
|
+
*
|
|
605
|
+
* @returns {Promise<RestApiResponse<HashrateResaleDetailResponse>>}
|
|
606
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
607
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Detail Binance API Documentation}
|
|
608
|
+
*/
|
|
609
|
+
hashrateResaleDetail(requestParameters) {
|
|
610
|
+
return this.miningApi.hashrateResaleDetail(requestParameters);
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Hashrate Resale List
|
|
614
|
+
*
|
|
615
|
+
* Weight: 5
|
|
616
|
+
*
|
|
617
|
+
* @summary Hashrate Resale List
|
|
618
|
+
* @param {HashrateResaleListRequest} requestParameters Request parameters.
|
|
619
|
+
*
|
|
620
|
+
* @returns {Promise<RestApiResponse<HashrateResaleListResponse>>}
|
|
621
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
622
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-List Binance API Documentation}
|
|
623
|
+
*/
|
|
624
|
+
hashrateResaleList(requestParameters = {}) {
|
|
625
|
+
return this.miningApi.hashrateResaleList(requestParameters);
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Hashrate Resale Request
|
|
629
|
+
*
|
|
630
|
+
* Weight: 5
|
|
631
|
+
*
|
|
632
|
+
* @summary Hashrate Resale Request(USER_DATA)
|
|
633
|
+
* @param {HashrateResaleRequestRequest} requestParameters Request parameters.
|
|
634
|
+
*
|
|
635
|
+
* @returns {Promise<RestApiResponse<HashrateResaleRequestResponse>>}
|
|
636
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
637
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request Binance API Documentation}
|
|
638
|
+
*/
|
|
639
|
+
hashrateResaleRequest(requestParameters) {
|
|
640
|
+
return this.miningApi.hashrateResaleRequest(requestParameters);
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Mining Account Earning
|
|
644
|
+
*
|
|
645
|
+
* Weight: 5
|
|
646
|
+
*
|
|
647
|
+
* @summary Mining Account Earning(USER_DATA)
|
|
648
|
+
* @param {MiningAccountEarningRequest} requestParameters Request parameters.
|
|
649
|
+
*
|
|
650
|
+
* @returns {Promise<RestApiResponse<MiningAccountEarningResponse>>}
|
|
651
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
652
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning Binance API Documentation}
|
|
653
|
+
*/
|
|
654
|
+
miningAccountEarning(requestParameters) {
|
|
655
|
+
return this.miningApi.miningAccountEarning(requestParameters);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Request for Detail Miner List
|
|
659
|
+
*
|
|
660
|
+
* Weight: 5
|
|
661
|
+
*
|
|
662
|
+
* @summary Request for Detail Miner List(USER_DATA)
|
|
663
|
+
* @param {RequestForDetailMinerListRequest} requestParameters Request parameters.
|
|
664
|
+
*
|
|
665
|
+
* @returns {Promise<RestApiResponse<RequestForDetailMinerListResponse>>}
|
|
666
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
667
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List Binance API Documentation}
|
|
668
|
+
*/
|
|
669
|
+
requestForDetailMinerList(requestParameters) {
|
|
670
|
+
return this.miningApi.requestForDetailMinerList(requestParameters);
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* Request for Miner List
|
|
674
|
+
*
|
|
675
|
+
* Weight: 5
|
|
676
|
+
*
|
|
677
|
+
* @summary Request for Miner List(USER_DATA)
|
|
678
|
+
* @param {RequestForMinerListRequest} requestParameters Request parameters.
|
|
679
|
+
*
|
|
680
|
+
* @returns {Promise<RestApiResponse<RequestForMinerListResponse>>}
|
|
681
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
682
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List Binance API Documentation}
|
|
683
|
+
*/
|
|
684
|
+
requestForMinerList(requestParameters) {
|
|
685
|
+
return this.miningApi.requestForMinerList(requestParameters);
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Statistic List
|
|
689
|
+
*
|
|
690
|
+
* Weight: 5
|
|
691
|
+
*
|
|
692
|
+
* @summary Statistic List(USER_DATA)
|
|
693
|
+
* @param {StatisticListRequest} requestParameters Request parameters.
|
|
694
|
+
*
|
|
695
|
+
* @returns {Promise<RestApiResponse<StatisticListResponse>>}
|
|
696
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
697
|
+
* @see {@link https://developers.binance.com/docs/mining/rest-api/Statistic-List Binance API Documentation}
|
|
698
|
+
*/
|
|
699
|
+
statisticList(requestParameters) {
|
|
700
|
+
return this.miningApi.statisticList(requestParameters);
|
|
701
|
+
}
|
|
1135
702
|
};
|
|
1136
703
|
|
|
1137
|
-
|
|
704
|
+
//#endregion
|
|
705
|
+
//#region src/rest-api/index.ts
|
|
706
|
+
var rest_api_exports = /* @__PURE__ */ __export({
|
|
707
|
+
MiningApi: () => MiningApi,
|
|
708
|
+
RestAPI: () => RestAPI
|
|
709
|
+
});
|
|
710
|
+
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/mining.ts
|
|
1138
713
|
var Mining = class {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
}
|
|
1153
|
-
}
|
|
714
|
+
constructor(config) {
|
|
715
|
+
const userAgent = buildUserAgent(name, version);
|
|
716
|
+
if (config?.configurationRestAPI) {
|
|
717
|
+
const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);
|
|
718
|
+
configRestAPI.basePath = configRestAPI.basePath || MINING_REST_API_PROD_URL$1;
|
|
719
|
+
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
720
|
+
configRestAPI.baseOptions.headers = {
|
|
721
|
+
...configRestAPI.baseOptions.headers || {},
|
|
722
|
+
"User-Agent": userAgent
|
|
723
|
+
};
|
|
724
|
+
this.restAPI = new RestAPI(configRestAPI);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
1154
727
|
};
|
|
1155
728
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
MINING_REST_API_PROD_URL as MINING_REST_API_PROD_URL2,
|
|
1159
|
-
ConnectorClientError,
|
|
1160
|
-
RequiredError,
|
|
1161
|
-
UnauthorizedError,
|
|
1162
|
-
ForbiddenError,
|
|
1163
|
-
TooManyRequestsError,
|
|
1164
|
-
RateLimitBanError,
|
|
1165
|
-
ServerError,
|
|
1166
|
-
NetworkError,
|
|
1167
|
-
NotFoundError,
|
|
1168
|
-
BadRequestError
|
|
1169
|
-
} from "@binance/common";
|
|
1170
|
-
export {
|
|
1171
|
-
BadRequestError,
|
|
1172
|
-
ConnectorClientError,
|
|
1173
|
-
ForbiddenError,
|
|
1174
|
-
MINING_REST_API_PROD_URL2 as MINING_REST_API_PROD_URL,
|
|
1175
|
-
Mining,
|
|
1176
|
-
rest_api_exports as MiningRestAPI,
|
|
1177
|
-
NetworkError,
|
|
1178
|
-
NotFoundError,
|
|
1179
|
-
RateLimitBanError,
|
|
1180
|
-
RequiredError,
|
|
1181
|
-
ServerError,
|
|
1182
|
-
TooManyRequestsError,
|
|
1183
|
-
UnauthorizedError
|
|
1184
|
-
};
|
|
729
|
+
//#endregion
|
|
730
|
+
export { BadRequestError, ConfigurationMining, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, rest_api_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
1185
731
|
//# sourceMappingURL=index.mjs.map
|