@binance/mining 1.0.0

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