@binance/mining 4.0.0 → 4.0.2

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