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