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