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