@binance/mining 4.0.2 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +61 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +62 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/mining";
|
|
6
|
-
var version = "4.0
|
|
6
|
+
var version = "4.1.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/mining-api.ts
|
|
@@ -28,6 +28,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
28
28
|
assertParamExists("accountList", "algo", algo);
|
|
29
29
|
assertParamExists("accountList", "userName", userName);
|
|
30
30
|
const localVarQueryParameter = {};
|
|
31
|
+
const localVarBodyParameter = {};
|
|
31
32
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
32
33
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
33
34
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -36,29 +37,34 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
36
37
|
return {
|
|
37
38
|
endpoint: "/sapi/v1/mining/statistics/user/list",
|
|
38
39
|
method: "GET",
|
|
39
|
-
|
|
40
|
+
queryParams: localVarQueryParameter,
|
|
41
|
+
bodyParams: localVarBodyParameter,
|
|
40
42
|
timeUnit: _timeUnit
|
|
41
43
|
};
|
|
42
44
|
},
|
|
43
45
|
acquiringAlgorithm: async () => {
|
|
44
46
|
const localVarQueryParameter = {};
|
|
47
|
+
const localVarBodyParameter = {};
|
|
45
48
|
let _timeUnit;
|
|
46
49
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
47
50
|
return {
|
|
48
51
|
endpoint: "/sapi/v1/mining/pub/algoList",
|
|
49
52
|
method: "GET",
|
|
50
|
-
|
|
53
|
+
queryParams: localVarQueryParameter,
|
|
54
|
+
bodyParams: localVarBodyParameter,
|
|
51
55
|
timeUnit: _timeUnit
|
|
52
56
|
};
|
|
53
57
|
},
|
|
54
58
|
acquiringCoinname: async () => {
|
|
55
59
|
const localVarQueryParameter = {};
|
|
60
|
+
const localVarBodyParameter = {};
|
|
56
61
|
let _timeUnit;
|
|
57
62
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
58
63
|
return {
|
|
59
64
|
endpoint: "/sapi/v1/mining/pub/coinList",
|
|
60
65
|
method: "GET",
|
|
61
|
-
|
|
66
|
+
queryParams: localVarQueryParameter,
|
|
67
|
+
bodyParams: localVarBodyParameter,
|
|
62
68
|
timeUnit: _timeUnit
|
|
63
69
|
};
|
|
64
70
|
},
|
|
@@ -66,6 +72,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
66
72
|
assertParamExists("cancelHashrateResaleConfiguration", "configId", configId);
|
|
67
73
|
assertParamExists("cancelHashrateResaleConfiguration", "userName", userName);
|
|
68
74
|
const localVarQueryParameter = {};
|
|
75
|
+
const localVarBodyParameter = {};
|
|
69
76
|
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
70
77
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
71
78
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -74,7 +81,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
74
81
|
return {
|
|
75
82
|
endpoint: "/sapi/v1/mining/hash-transfer/config/cancel",
|
|
76
83
|
method: "POST",
|
|
77
|
-
|
|
84
|
+
queryParams: localVarQueryParameter,
|
|
85
|
+
bodyParams: localVarBodyParameter,
|
|
78
86
|
timeUnit: _timeUnit
|
|
79
87
|
};
|
|
80
88
|
},
|
|
@@ -82,6 +90,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
82
90
|
assertParamExists("earningsList", "algo", algo);
|
|
83
91
|
assertParamExists("earningsList", "userName", userName);
|
|
84
92
|
const localVarQueryParameter = {};
|
|
93
|
+
const localVarBodyParameter = {};
|
|
85
94
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
86
95
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
87
96
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
@@ -95,7 +104,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
95
104
|
return {
|
|
96
105
|
endpoint: "/sapi/v1/mining/payment/list",
|
|
97
106
|
method: "GET",
|
|
98
|
-
|
|
107
|
+
queryParams: localVarQueryParameter,
|
|
108
|
+
bodyParams: localVarBodyParameter,
|
|
99
109
|
timeUnit: _timeUnit
|
|
100
110
|
};
|
|
101
111
|
},
|
|
@@ -103,6 +113,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
103
113
|
assertParamExists("extraBonusList", "algo", algo);
|
|
104
114
|
assertParamExists("extraBonusList", "userName", userName);
|
|
105
115
|
const localVarQueryParameter = {};
|
|
116
|
+
const localVarBodyParameter = {};
|
|
106
117
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
107
118
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
108
119
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
@@ -116,7 +127,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
116
127
|
return {
|
|
117
128
|
endpoint: "/sapi/v1/mining/payment/other",
|
|
118
129
|
method: "GET",
|
|
119
|
-
|
|
130
|
+
queryParams: localVarQueryParameter,
|
|
131
|
+
bodyParams: localVarBodyParameter,
|
|
120
132
|
timeUnit: _timeUnit
|
|
121
133
|
};
|
|
122
134
|
},
|
|
@@ -124,6 +136,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
124
136
|
assertParamExists("hashrateResaleDetail", "configId", configId);
|
|
125
137
|
assertParamExists("hashrateResaleDetail", "userName", userName);
|
|
126
138
|
const localVarQueryParameter = {};
|
|
139
|
+
const localVarBodyParameter = {};
|
|
127
140
|
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
128
141
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
129
142
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
@@ -134,12 +147,14 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
134
147
|
return {
|
|
135
148
|
endpoint: "/sapi/v1/mining/hash-transfer/profit/details",
|
|
136
149
|
method: "GET",
|
|
137
|
-
|
|
150
|
+
queryParams: localVarQueryParameter,
|
|
151
|
+
bodyParams: localVarBodyParameter,
|
|
138
152
|
timeUnit: _timeUnit
|
|
139
153
|
};
|
|
140
154
|
},
|
|
141
155
|
hashrateResaleList: async (pageIndex, pageSize, recvWindow) => {
|
|
142
156
|
const localVarQueryParameter = {};
|
|
157
|
+
const localVarBodyParameter = {};
|
|
143
158
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
144
159
|
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
145
160
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -148,7 +163,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
148
163
|
return {
|
|
149
164
|
endpoint: "/sapi/v1/mining/hash-transfer/config/details/list",
|
|
150
165
|
method: "GET",
|
|
151
|
-
|
|
166
|
+
queryParams: localVarQueryParameter,
|
|
167
|
+
bodyParams: localVarBodyParameter,
|
|
152
168
|
timeUnit: _timeUnit
|
|
153
169
|
};
|
|
154
170
|
},
|
|
@@ -160,6 +176,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
160
176
|
assertParamExists("hashrateResaleRequest", "toPoolUser", toPoolUser);
|
|
161
177
|
assertParamExists("hashrateResaleRequest", "hashRate", hashRate);
|
|
162
178
|
const localVarQueryParameter = {};
|
|
179
|
+
const localVarBodyParameter = {};
|
|
163
180
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
164
181
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
165
182
|
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
@@ -172,13 +189,15 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
172
189
|
return {
|
|
173
190
|
endpoint: "/sapi/v1/mining/hash-transfer/config",
|
|
174
191
|
method: "POST",
|
|
175
|
-
|
|
192
|
+
queryParams: localVarQueryParameter,
|
|
193
|
+
bodyParams: localVarBodyParameter,
|
|
176
194
|
timeUnit: _timeUnit
|
|
177
195
|
};
|
|
178
196
|
},
|
|
179
197
|
miningAccountEarning: async (algo, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
180
198
|
assertParamExists("miningAccountEarning", "algo", algo);
|
|
181
199
|
const localVarQueryParameter = {};
|
|
200
|
+
const localVarBodyParameter = {};
|
|
182
201
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
183
202
|
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
184
203
|
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
@@ -190,7 +209,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
190
209
|
return {
|
|
191
210
|
endpoint: "/sapi/v1/mining/payment/uid",
|
|
192
211
|
method: "GET",
|
|
193
|
-
|
|
212
|
+
queryParams: localVarQueryParameter,
|
|
213
|
+
bodyParams: localVarBodyParameter,
|
|
194
214
|
timeUnit: _timeUnit
|
|
195
215
|
};
|
|
196
216
|
},
|
|
@@ -199,6 +219,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
199
219
|
assertParamExists("requestForDetailMinerList", "userName", userName);
|
|
200
220
|
assertParamExists("requestForDetailMinerList", "workerName", workerName);
|
|
201
221
|
const localVarQueryParameter = {};
|
|
222
|
+
const localVarBodyParameter = {};
|
|
202
223
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
203
224
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
204
225
|
if (workerName !== void 0 && workerName !== null) localVarQueryParameter["workerName"] = workerName;
|
|
@@ -208,7 +229,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
208
229
|
return {
|
|
209
230
|
endpoint: "/sapi/v1/mining/worker/detail",
|
|
210
231
|
method: "GET",
|
|
211
|
-
|
|
232
|
+
queryParams: localVarQueryParameter,
|
|
233
|
+
bodyParams: localVarBodyParameter,
|
|
212
234
|
timeUnit: _timeUnit
|
|
213
235
|
};
|
|
214
236
|
},
|
|
@@ -216,6 +238,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
216
238
|
assertParamExists("requestForMinerList", "algo", algo);
|
|
217
239
|
assertParamExists("requestForMinerList", "userName", userName);
|
|
218
240
|
const localVarQueryParameter = {};
|
|
241
|
+
const localVarBodyParameter = {};
|
|
219
242
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
220
243
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
221
244
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
@@ -228,7 +251,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
228
251
|
return {
|
|
229
252
|
endpoint: "/sapi/v1/mining/worker/list",
|
|
230
253
|
method: "GET",
|
|
231
|
-
|
|
254
|
+
queryParams: localVarQueryParameter,
|
|
255
|
+
bodyParams: localVarBodyParameter,
|
|
232
256
|
timeUnit: _timeUnit
|
|
233
257
|
};
|
|
234
258
|
},
|
|
@@ -236,6 +260,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
236
260
|
assertParamExists("statisticList", "algo", algo);
|
|
237
261
|
assertParamExists("statisticList", "userName", userName);
|
|
238
262
|
const localVarQueryParameter = {};
|
|
263
|
+
const localVarBodyParameter = {};
|
|
239
264
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
240
265
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
241
266
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -244,7 +269,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
244
269
|
return {
|
|
245
270
|
endpoint: "/sapi/v1/mining/statistics/user/status",
|
|
246
271
|
method: "GET",
|
|
247
|
-
|
|
272
|
+
queryParams: localVarQueryParameter,
|
|
273
|
+
bodyParams: localVarBodyParameter,
|
|
248
274
|
timeUnit: _timeUnit
|
|
249
275
|
};
|
|
250
276
|
}
|
|
@@ -273,7 +299,7 @@ var MiningApi = class {
|
|
|
273
299
|
*/
|
|
274
300
|
async accountList(requestParameters) {
|
|
275
301
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
276
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
302
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
277
303
|
}
|
|
278
304
|
/**
|
|
279
305
|
* Acquiring Algorithm
|
|
@@ -288,7 +314,7 @@ var MiningApi = class {
|
|
|
288
314
|
*/
|
|
289
315
|
async acquiringAlgorithm() {
|
|
290
316
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringAlgorithm();
|
|
291
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
317
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
292
318
|
}
|
|
293
319
|
/**
|
|
294
320
|
* Acquiring CoinName
|
|
@@ -303,7 +329,7 @@ var MiningApi = class {
|
|
|
303
329
|
*/
|
|
304
330
|
async acquiringCoinname() {
|
|
305
331
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringCoinname();
|
|
306
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
332
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
307
333
|
}
|
|
308
334
|
/**
|
|
309
335
|
*
|
|
@@ -318,7 +344,7 @@ var MiningApi = class {
|
|
|
318
344
|
*/
|
|
319
345
|
async cancelHashrateResaleConfiguration(requestParameters) {
|
|
320
346
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelHashrateResaleConfiguration(requestParameters?.configId, requestParameters?.userName, requestParameters?.recvWindow);
|
|
321
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
347
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
322
348
|
}
|
|
323
349
|
/**
|
|
324
350
|
* Query Earnings List
|
|
@@ -334,7 +360,7 @@ var MiningApi = class {
|
|
|
334
360
|
*/
|
|
335
361
|
async earningsList(requestParameters) {
|
|
336
362
|
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.
|
|
363
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
338
364
|
}
|
|
339
365
|
/**
|
|
340
366
|
* Extra Bonus List
|
|
@@ -350,7 +376,7 @@ var MiningApi = class {
|
|
|
350
376
|
*/
|
|
351
377
|
async extraBonusList(requestParameters) {
|
|
352
378
|
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.
|
|
379
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
354
380
|
}
|
|
355
381
|
/**
|
|
356
382
|
* Hashrate Resale Detail(USER_DATA)
|
|
@@ -366,7 +392,7 @@ var MiningApi = class {
|
|
|
366
392
|
*/
|
|
367
393
|
async hashrateResaleDetail(requestParameters) {
|
|
368
394
|
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.
|
|
395
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
370
396
|
}
|
|
371
397
|
/**
|
|
372
398
|
* Hashrate Resale List
|
|
@@ -382,7 +408,7 @@ var MiningApi = class {
|
|
|
382
408
|
*/
|
|
383
409
|
async hashrateResaleList(requestParameters = {}) {
|
|
384
410
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.hashrateResaleList(requestParameters?.pageIndex, requestParameters?.pageSize, requestParameters?.recvWindow);
|
|
385
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
411
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
386
412
|
}
|
|
387
413
|
/**
|
|
388
414
|
* Hashrate Resale Request
|
|
@@ -398,7 +424,7 @@ var MiningApi = class {
|
|
|
398
424
|
*/
|
|
399
425
|
async hashrateResaleRequest(requestParameters) {
|
|
400
426
|
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.
|
|
427
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
402
428
|
}
|
|
403
429
|
/**
|
|
404
430
|
* Mining Account Earning
|
|
@@ -414,7 +440,7 @@ var MiningApi = class {
|
|
|
414
440
|
*/
|
|
415
441
|
async miningAccountEarning(requestParameters) {
|
|
416
442
|
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.
|
|
443
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
418
444
|
}
|
|
419
445
|
/**
|
|
420
446
|
* Request for Detail Miner List
|
|
@@ -430,7 +456,7 @@ var MiningApi = class {
|
|
|
430
456
|
*/
|
|
431
457
|
async requestForDetailMinerList(requestParameters) {
|
|
432
458
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.requestForDetailMinerList(requestParameters?.algo, requestParameters?.userName, requestParameters?.workerName, requestParameters?.recvWindow);
|
|
433
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
459
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
434
460
|
}
|
|
435
461
|
/**
|
|
436
462
|
* Request for Miner List
|
|
@@ -446,7 +472,7 @@ var MiningApi = class {
|
|
|
446
472
|
*/
|
|
447
473
|
async requestForMinerList(requestParameters) {
|
|
448
474
|
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.
|
|
475
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
450
476
|
}
|
|
451
477
|
/**
|
|
452
478
|
* Statistic List
|
|
@@ -462,7 +488,7 @@ var MiningApi = class {
|
|
|
462
488
|
*/
|
|
463
489
|
async statisticList(requestParameters) {
|
|
464
490
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.statisticList(requestParameters?.algo, requestParameters?.userName, requestParameters?.recvWindow);
|
|
465
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
491
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
466
492
|
}
|
|
467
493
|
};
|
|
468
494
|
|
|
@@ -489,23 +515,25 @@ var RestAPI = class {
|
|
|
489
515
|
* Generic function to send a request.
|
|
490
516
|
* @param endpoint - The API endpoint to call.
|
|
491
517
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
492
|
-
* @param
|
|
518
|
+
* @param queryParams - Query parameters for the request.
|
|
519
|
+
* @param bodyParams - Body parameters for the request.
|
|
493
520
|
*
|
|
494
521
|
* @returns A promise resolving to the response data object.
|
|
495
522
|
*/
|
|
496
|
-
sendRequest(endpoint, method,
|
|
497
|
-
return sendRequest(this.configuration, endpoint, method,
|
|
523
|
+
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
524
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
498
525
|
}
|
|
499
526
|
/**
|
|
500
527
|
* Generic function to send a signed request.
|
|
501
528
|
* @param endpoint - The API endpoint to call.
|
|
502
529
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
503
|
-
* @param
|
|
530
|
+
* @param queryParams - Query parameters for the request.
|
|
531
|
+
* @param bodyParams - Body parameters for the request.
|
|
504
532
|
*
|
|
505
533
|
* @returns A promise resolving to the response data object.
|
|
506
534
|
*/
|
|
507
|
-
sendSignedRequest(endpoint, method,
|
|
508
|
-
return sendRequest(this.configuration, endpoint, method,
|
|
535
|
+
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
536
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
509
537
|
}
|
|
510
538
|
/**
|
|
511
539
|
* Query Account List
|
|
@@ -727,5 +755,5 @@ var Mining = class {
|
|
|
727
755
|
};
|
|
728
756
|
|
|
729
757
|
//#endregion
|
|
730
|
-
export { BadRequestError,
|
|
758
|
+
export { BadRequestError, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, rest_api_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
731
759
|
//# sourceMappingURL=index.mjs.map
|