@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.d.mts
CHANGED
|
@@ -1995,20 +1995,22 @@ declare class RestAPI {
|
|
|
1995
1995
|
* Generic function to send a request.
|
|
1996
1996
|
* @param endpoint - The API endpoint to call.
|
|
1997
1997
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1998
|
-
* @param
|
|
1998
|
+
* @param queryParams - Query parameters for the request.
|
|
1999
|
+
* @param bodyParams - Body parameters for the request.
|
|
1999
2000
|
*
|
|
2000
2001
|
* @returns A promise resolving to the response data object.
|
|
2001
2002
|
*/
|
|
2002
|
-
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
2003
|
+
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
2003
2004
|
/**
|
|
2004
2005
|
* Generic function to send a signed request.
|
|
2005
2006
|
* @param endpoint - The API endpoint to call.
|
|
2006
2007
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2007
|
-
* @param
|
|
2008
|
+
* @param queryParams - Query parameters for the request.
|
|
2009
|
+
* @param bodyParams - Body parameters for the request.
|
|
2008
2010
|
*
|
|
2009
2011
|
* @returns A promise resolving to the response data object.
|
|
2010
2012
|
*/
|
|
2011
|
-
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
2013
|
+
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
2012
2014
|
/**
|
|
2013
2015
|
* Query Account List
|
|
2014
2016
|
*
|
|
@@ -2189,5 +2191,5 @@ declare class Mining {
|
|
|
2189
2191
|
constructor(config: ConfigurationMining);
|
|
2190
2192
|
}
|
|
2191
2193
|
//#endregion
|
|
2192
|
-
export { BadRequestError, ConfigurationMining, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, index_d_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
2194
|
+
export { BadRequestError, type ConfigurationMining, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, index_d_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
2193
2195
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1995,20 +1995,22 @@ declare class RestAPI {
|
|
|
1995
1995
|
* Generic function to send a request.
|
|
1996
1996
|
* @param endpoint - The API endpoint to call.
|
|
1997
1997
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
1998
|
-
* @param
|
|
1998
|
+
* @param queryParams - Query parameters for the request.
|
|
1999
|
+
* @param bodyParams - Body parameters for the request.
|
|
1999
2000
|
*
|
|
2000
2001
|
* @returns A promise resolving to the response data object.
|
|
2001
2002
|
*/
|
|
2002
|
-
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
2003
|
+
sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
2003
2004
|
/**
|
|
2004
2005
|
* Generic function to send a signed request.
|
|
2005
2006
|
* @param endpoint - The API endpoint to call.
|
|
2006
2007
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
2007
|
-
* @param
|
|
2008
|
+
* @param queryParams - Query parameters for the request.
|
|
2009
|
+
* @param bodyParams - Body parameters for the request.
|
|
2008
2010
|
*
|
|
2009
2011
|
* @returns A promise resolving to the response data object.
|
|
2010
2012
|
*/
|
|
2011
|
-
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
|
|
2013
|
+
sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', queryParams?: Record<string, unknown>, bodyParams?: Record<string, unknown>): Promise<RestApiResponse<T>>;
|
|
2012
2014
|
/**
|
|
2013
2015
|
* Query Account List
|
|
2014
2016
|
*
|
|
@@ -2189,5 +2191,5 @@ declare class Mining {
|
|
|
2189
2191
|
constructor(config: ConfigurationMining);
|
|
2190
2192
|
}
|
|
2191
2193
|
//#endregion
|
|
2192
|
-
export { BadRequestError, ConfigurationMining, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, index_d_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
2194
|
+
export { BadRequestError, type ConfigurationMining, ConnectorClientError, ForbiddenError, MINING_REST_API_PROD_URL, Mining, index_d_exports as MiningRestAPI, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
2193
2195
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/mining";
|
|
17
|
-
var version = "4.0
|
|
17
|
+
var version = "4.1.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/mining-api.ts
|
|
@@ -39,6 +39,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
39
39
|
(0, __binance_common.assertParamExists)("accountList", "algo", algo);
|
|
40
40
|
(0, __binance_common.assertParamExists)("accountList", "userName", userName);
|
|
41
41
|
const localVarQueryParameter = {};
|
|
42
|
+
const localVarBodyParameter = {};
|
|
42
43
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
43
44
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
44
45
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -47,29 +48,34 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
47
48
|
return {
|
|
48
49
|
endpoint: "/sapi/v1/mining/statistics/user/list",
|
|
49
50
|
method: "GET",
|
|
50
|
-
|
|
51
|
+
queryParams: localVarQueryParameter,
|
|
52
|
+
bodyParams: localVarBodyParameter,
|
|
51
53
|
timeUnit: _timeUnit
|
|
52
54
|
};
|
|
53
55
|
},
|
|
54
56
|
acquiringAlgorithm: async () => {
|
|
55
57
|
const localVarQueryParameter = {};
|
|
58
|
+
const localVarBodyParameter = {};
|
|
56
59
|
let _timeUnit;
|
|
57
60
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
58
61
|
return {
|
|
59
62
|
endpoint: "/sapi/v1/mining/pub/algoList",
|
|
60
63
|
method: "GET",
|
|
61
|
-
|
|
64
|
+
queryParams: localVarQueryParameter,
|
|
65
|
+
bodyParams: localVarBodyParameter,
|
|
62
66
|
timeUnit: _timeUnit
|
|
63
67
|
};
|
|
64
68
|
},
|
|
65
69
|
acquiringCoinname: async () => {
|
|
66
70
|
const localVarQueryParameter = {};
|
|
71
|
+
const localVarBodyParameter = {};
|
|
67
72
|
let _timeUnit;
|
|
68
73
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
69
74
|
return {
|
|
70
75
|
endpoint: "/sapi/v1/mining/pub/coinList",
|
|
71
76
|
method: "GET",
|
|
72
|
-
|
|
77
|
+
queryParams: localVarQueryParameter,
|
|
78
|
+
bodyParams: localVarBodyParameter,
|
|
73
79
|
timeUnit: _timeUnit
|
|
74
80
|
};
|
|
75
81
|
},
|
|
@@ -77,6 +83,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
77
83
|
(0, __binance_common.assertParamExists)("cancelHashrateResaleConfiguration", "configId", configId);
|
|
78
84
|
(0, __binance_common.assertParamExists)("cancelHashrateResaleConfiguration", "userName", userName);
|
|
79
85
|
const localVarQueryParameter = {};
|
|
86
|
+
const localVarBodyParameter = {};
|
|
80
87
|
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
81
88
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
82
89
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -85,7 +92,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
85
92
|
return {
|
|
86
93
|
endpoint: "/sapi/v1/mining/hash-transfer/config/cancel",
|
|
87
94
|
method: "POST",
|
|
88
|
-
|
|
95
|
+
queryParams: localVarQueryParameter,
|
|
96
|
+
bodyParams: localVarBodyParameter,
|
|
89
97
|
timeUnit: _timeUnit
|
|
90
98
|
};
|
|
91
99
|
},
|
|
@@ -93,6 +101,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
93
101
|
(0, __binance_common.assertParamExists)("earningsList", "algo", algo);
|
|
94
102
|
(0, __binance_common.assertParamExists)("earningsList", "userName", userName);
|
|
95
103
|
const localVarQueryParameter = {};
|
|
104
|
+
const localVarBodyParameter = {};
|
|
96
105
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
97
106
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
98
107
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
@@ -106,7 +115,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
106
115
|
return {
|
|
107
116
|
endpoint: "/sapi/v1/mining/payment/list",
|
|
108
117
|
method: "GET",
|
|
109
|
-
|
|
118
|
+
queryParams: localVarQueryParameter,
|
|
119
|
+
bodyParams: localVarBodyParameter,
|
|
110
120
|
timeUnit: _timeUnit
|
|
111
121
|
};
|
|
112
122
|
},
|
|
@@ -114,6 +124,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
114
124
|
(0, __binance_common.assertParamExists)("extraBonusList", "algo", algo);
|
|
115
125
|
(0, __binance_common.assertParamExists)("extraBonusList", "userName", userName);
|
|
116
126
|
const localVarQueryParameter = {};
|
|
127
|
+
const localVarBodyParameter = {};
|
|
117
128
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
118
129
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
119
130
|
if (coin !== void 0 && coin !== null) localVarQueryParameter["coin"] = coin;
|
|
@@ -127,7 +138,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
127
138
|
return {
|
|
128
139
|
endpoint: "/sapi/v1/mining/payment/other",
|
|
129
140
|
method: "GET",
|
|
130
|
-
|
|
141
|
+
queryParams: localVarQueryParameter,
|
|
142
|
+
bodyParams: localVarBodyParameter,
|
|
131
143
|
timeUnit: _timeUnit
|
|
132
144
|
};
|
|
133
145
|
},
|
|
@@ -135,6 +147,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
135
147
|
(0, __binance_common.assertParamExists)("hashrateResaleDetail", "configId", configId);
|
|
136
148
|
(0, __binance_common.assertParamExists)("hashrateResaleDetail", "userName", userName);
|
|
137
149
|
const localVarQueryParameter = {};
|
|
150
|
+
const localVarBodyParameter = {};
|
|
138
151
|
if (configId !== void 0 && configId !== null) localVarQueryParameter["configId"] = configId;
|
|
139
152
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
140
153
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
@@ -145,12 +158,14 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
145
158
|
return {
|
|
146
159
|
endpoint: "/sapi/v1/mining/hash-transfer/profit/details",
|
|
147
160
|
method: "GET",
|
|
148
|
-
|
|
161
|
+
queryParams: localVarQueryParameter,
|
|
162
|
+
bodyParams: localVarBodyParameter,
|
|
149
163
|
timeUnit: _timeUnit
|
|
150
164
|
};
|
|
151
165
|
},
|
|
152
166
|
hashrateResaleList: async (pageIndex, pageSize, recvWindow) => {
|
|
153
167
|
const localVarQueryParameter = {};
|
|
168
|
+
const localVarBodyParameter = {};
|
|
154
169
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
155
170
|
if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
|
|
156
171
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -159,7 +174,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
159
174
|
return {
|
|
160
175
|
endpoint: "/sapi/v1/mining/hash-transfer/config/details/list",
|
|
161
176
|
method: "GET",
|
|
162
|
-
|
|
177
|
+
queryParams: localVarQueryParameter,
|
|
178
|
+
bodyParams: localVarBodyParameter,
|
|
163
179
|
timeUnit: _timeUnit
|
|
164
180
|
};
|
|
165
181
|
},
|
|
@@ -171,6 +187,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
171
187
|
(0, __binance_common.assertParamExists)("hashrateResaleRequest", "toPoolUser", toPoolUser);
|
|
172
188
|
(0, __binance_common.assertParamExists)("hashrateResaleRequest", "hashRate", hashRate);
|
|
173
189
|
const localVarQueryParameter = {};
|
|
190
|
+
const localVarBodyParameter = {};
|
|
174
191
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
175
192
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
176
193
|
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
@@ -183,13 +200,15 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
183
200
|
return {
|
|
184
201
|
endpoint: "/sapi/v1/mining/hash-transfer/config",
|
|
185
202
|
method: "POST",
|
|
186
|
-
|
|
203
|
+
queryParams: localVarQueryParameter,
|
|
204
|
+
bodyParams: localVarBodyParameter,
|
|
187
205
|
timeUnit: _timeUnit
|
|
188
206
|
};
|
|
189
207
|
},
|
|
190
208
|
miningAccountEarning: async (algo, startDate, endDate, pageIndex, pageSize, recvWindow) => {
|
|
191
209
|
(0, __binance_common.assertParamExists)("miningAccountEarning", "algo", algo);
|
|
192
210
|
const localVarQueryParameter = {};
|
|
211
|
+
const localVarBodyParameter = {};
|
|
193
212
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
194
213
|
if (startDate !== void 0 && startDate !== null) localVarQueryParameter["startDate"] = startDate;
|
|
195
214
|
if (endDate !== void 0 && endDate !== null) localVarQueryParameter["endDate"] = endDate;
|
|
@@ -201,7 +220,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
201
220
|
return {
|
|
202
221
|
endpoint: "/sapi/v1/mining/payment/uid",
|
|
203
222
|
method: "GET",
|
|
204
|
-
|
|
223
|
+
queryParams: localVarQueryParameter,
|
|
224
|
+
bodyParams: localVarBodyParameter,
|
|
205
225
|
timeUnit: _timeUnit
|
|
206
226
|
};
|
|
207
227
|
},
|
|
@@ -210,6 +230,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
210
230
|
(0, __binance_common.assertParamExists)("requestForDetailMinerList", "userName", userName);
|
|
211
231
|
(0, __binance_common.assertParamExists)("requestForDetailMinerList", "workerName", workerName);
|
|
212
232
|
const localVarQueryParameter = {};
|
|
233
|
+
const localVarBodyParameter = {};
|
|
213
234
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
214
235
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
215
236
|
if (workerName !== void 0 && workerName !== null) localVarQueryParameter["workerName"] = workerName;
|
|
@@ -219,7 +240,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
219
240
|
return {
|
|
220
241
|
endpoint: "/sapi/v1/mining/worker/detail",
|
|
221
242
|
method: "GET",
|
|
222
|
-
|
|
243
|
+
queryParams: localVarQueryParameter,
|
|
244
|
+
bodyParams: localVarBodyParameter,
|
|
223
245
|
timeUnit: _timeUnit
|
|
224
246
|
};
|
|
225
247
|
},
|
|
@@ -227,6 +249,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
227
249
|
(0, __binance_common.assertParamExists)("requestForMinerList", "algo", algo);
|
|
228
250
|
(0, __binance_common.assertParamExists)("requestForMinerList", "userName", userName);
|
|
229
251
|
const localVarQueryParameter = {};
|
|
252
|
+
const localVarBodyParameter = {};
|
|
230
253
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
231
254
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
232
255
|
if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
|
|
@@ -239,7 +262,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
239
262
|
return {
|
|
240
263
|
endpoint: "/sapi/v1/mining/worker/list",
|
|
241
264
|
method: "GET",
|
|
242
|
-
|
|
265
|
+
queryParams: localVarQueryParameter,
|
|
266
|
+
bodyParams: localVarBodyParameter,
|
|
243
267
|
timeUnit: _timeUnit
|
|
244
268
|
};
|
|
245
269
|
},
|
|
@@ -247,6 +271,7 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
247
271
|
(0, __binance_common.assertParamExists)("statisticList", "algo", algo);
|
|
248
272
|
(0, __binance_common.assertParamExists)("statisticList", "userName", userName);
|
|
249
273
|
const localVarQueryParameter = {};
|
|
274
|
+
const localVarBodyParameter = {};
|
|
250
275
|
if (algo !== void 0 && algo !== null) localVarQueryParameter["algo"] = algo;
|
|
251
276
|
if (userName !== void 0 && userName !== null) localVarQueryParameter["userName"] = userName;
|
|
252
277
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
@@ -255,7 +280,8 @@ const MiningApiAxiosParamCreator = function(configuration) {
|
|
|
255
280
|
return {
|
|
256
281
|
endpoint: "/sapi/v1/mining/statistics/user/status",
|
|
257
282
|
method: "GET",
|
|
258
|
-
|
|
283
|
+
queryParams: localVarQueryParameter,
|
|
284
|
+
bodyParams: localVarBodyParameter,
|
|
259
285
|
timeUnit: _timeUnit
|
|
260
286
|
};
|
|
261
287
|
}
|
|
@@ -284,7 +310,7 @@ var MiningApi = class {
|
|
|
284
310
|
*/
|
|
285
311
|
async accountList(requestParameters) {
|
|
286
312
|
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.
|
|
313
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
288
314
|
}
|
|
289
315
|
/**
|
|
290
316
|
* Acquiring Algorithm
|
|
@@ -299,7 +325,7 @@ var MiningApi = class {
|
|
|
299
325
|
*/
|
|
300
326
|
async acquiringAlgorithm() {
|
|
301
327
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringAlgorithm();
|
|
302
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
328
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
303
329
|
}
|
|
304
330
|
/**
|
|
305
331
|
* Acquiring CoinName
|
|
@@ -314,7 +340,7 @@ var MiningApi = class {
|
|
|
314
340
|
*/
|
|
315
341
|
async acquiringCoinname() {
|
|
316
342
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.acquiringCoinname();
|
|
317
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.
|
|
343
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
318
344
|
}
|
|
319
345
|
/**
|
|
320
346
|
*
|
|
@@ -329,7 +355,7 @@ var MiningApi = class {
|
|
|
329
355
|
*/
|
|
330
356
|
async cancelHashrateResaleConfiguration(requestParameters) {
|
|
331
357
|
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.
|
|
358
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
333
359
|
}
|
|
334
360
|
/**
|
|
335
361
|
* Query Earnings List
|
|
@@ -345,7 +371,7 @@ var MiningApi = class {
|
|
|
345
371
|
*/
|
|
346
372
|
async earningsList(requestParameters) {
|
|
347
373
|
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.
|
|
374
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
349
375
|
}
|
|
350
376
|
/**
|
|
351
377
|
* Extra Bonus List
|
|
@@ -361,7 +387,7 @@ var MiningApi = class {
|
|
|
361
387
|
*/
|
|
362
388
|
async extraBonusList(requestParameters) {
|
|
363
389
|
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.
|
|
390
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
365
391
|
}
|
|
366
392
|
/**
|
|
367
393
|
* Hashrate Resale Detail(USER_DATA)
|
|
@@ -377,7 +403,7 @@ var MiningApi = class {
|
|
|
377
403
|
*/
|
|
378
404
|
async hashrateResaleDetail(requestParameters) {
|
|
379
405
|
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.
|
|
406
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
381
407
|
}
|
|
382
408
|
/**
|
|
383
409
|
* Hashrate Resale List
|
|
@@ -393,7 +419,7 @@ var MiningApi = class {
|
|
|
393
419
|
*/
|
|
394
420
|
async hashrateResaleList(requestParameters = {}) {
|
|
395
421
|
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.
|
|
422
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
397
423
|
}
|
|
398
424
|
/**
|
|
399
425
|
* Hashrate Resale Request
|
|
@@ -409,7 +435,7 @@ var MiningApi = class {
|
|
|
409
435
|
*/
|
|
410
436
|
async hashrateResaleRequest(requestParameters) {
|
|
411
437
|
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.
|
|
438
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
413
439
|
}
|
|
414
440
|
/**
|
|
415
441
|
* Mining Account Earning
|
|
@@ -425,7 +451,7 @@ var MiningApi = class {
|
|
|
425
451
|
*/
|
|
426
452
|
async miningAccountEarning(requestParameters) {
|
|
427
453
|
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.
|
|
454
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
429
455
|
}
|
|
430
456
|
/**
|
|
431
457
|
* Request for Detail Miner List
|
|
@@ -441,7 +467,7 @@ var MiningApi = class {
|
|
|
441
467
|
*/
|
|
442
468
|
async requestForDetailMinerList(requestParameters) {
|
|
443
469
|
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.
|
|
470
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
445
471
|
}
|
|
446
472
|
/**
|
|
447
473
|
* Request for Miner List
|
|
@@ -457,7 +483,7 @@ var MiningApi = class {
|
|
|
457
483
|
*/
|
|
458
484
|
async requestForMinerList(requestParameters) {
|
|
459
485
|
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.
|
|
486
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
461
487
|
}
|
|
462
488
|
/**
|
|
463
489
|
* Statistic List
|
|
@@ -473,7 +499,7 @@ var MiningApi = class {
|
|
|
473
499
|
*/
|
|
474
500
|
async statisticList(requestParameters) {
|
|
475
501
|
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.
|
|
502
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
477
503
|
}
|
|
478
504
|
};
|
|
479
505
|
|
|
@@ -500,23 +526,25 @@ var RestAPI = class {
|
|
|
500
526
|
* Generic function to send a request.
|
|
501
527
|
* @param endpoint - The API endpoint to call.
|
|
502
528
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
503
|
-
* @param
|
|
529
|
+
* @param queryParams - Query parameters for the request.
|
|
530
|
+
* @param bodyParams - Body parameters for the request.
|
|
504
531
|
*
|
|
505
532
|
* @returns A promise resolving to the response data object.
|
|
506
533
|
*/
|
|
507
|
-
sendRequest(endpoint, method,
|
|
508
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
534
|
+
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
535
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
509
536
|
}
|
|
510
537
|
/**
|
|
511
538
|
* Generic function to send a signed request.
|
|
512
539
|
* @param endpoint - The API endpoint to call.
|
|
513
540
|
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
514
|
-
* @param
|
|
541
|
+
* @param queryParams - Query parameters for the request.
|
|
542
|
+
* @param bodyParams - Body parameters for the request.
|
|
515
543
|
*
|
|
516
544
|
* @returns A promise resolving to the response data object.
|
|
517
545
|
*/
|
|
518
|
-
sendSignedRequest(endpoint, method,
|
|
519
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method,
|
|
546
|
+
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
547
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
520
548
|
}
|
|
521
549
|
/**
|
|
522
550
|
* Query Account List
|
|
@@ -744,12 +772,6 @@ Object.defineProperty(exports, 'BadRequestError', {
|
|
|
744
772
|
return __binance_common.BadRequestError;
|
|
745
773
|
}
|
|
746
774
|
});
|
|
747
|
-
Object.defineProperty(exports, 'ConfigurationMining', {
|
|
748
|
-
enumerable: true,
|
|
749
|
-
get: function () {
|
|
750
|
-
return ConfigurationMining;
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
775
|
Object.defineProperty(exports, 'ConnectorClientError', {
|
|
754
776
|
enumerable: true,
|
|
755
777
|
get: function () {
|