@binance/simple-earn 5.0.3 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -5,12 +5,15 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/simple-earn.ts
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
buildUserAgent,
|
|
10
|
+
ConfigurationRestAPI as ConfigurationRestAPI5,
|
|
11
|
+
SIMPLE_EARN_REST_API_PROD_URL
|
|
12
|
+
} from "@binance/common";
|
|
10
13
|
|
|
11
14
|
// package.json
|
|
12
15
|
var name = "@binance/simple-earn";
|
|
13
|
-
var version = "5.0.
|
|
16
|
+
var version = "5.0.4";
|
|
14
17
|
|
|
15
18
|
// src/rest-api/index.ts
|
|
16
19
|
var rest_api_exports = {};
|
|
@@ -2254,13 +2257,16 @@ var RestAPI = class {
|
|
|
2254
2257
|
// src/simple-earn.ts
|
|
2255
2258
|
var SimpleEarn = class {
|
|
2256
2259
|
constructor(config) {
|
|
2260
|
+
const userAgent = buildUserAgent(name, version);
|
|
2257
2261
|
if (config?.configurationRestAPI) {
|
|
2258
|
-
const configRestAPI = new ConfigurationRestAPI5(
|
|
2262
|
+
const configRestAPI = new ConfigurationRestAPI5(
|
|
2263
|
+
config.configurationRestAPI
|
|
2264
|
+
);
|
|
2259
2265
|
configRestAPI.basePath = configRestAPI.basePath || SIMPLE_EARN_REST_API_PROD_URL;
|
|
2260
2266
|
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
2261
2267
|
configRestAPI.baseOptions.headers = {
|
|
2262
2268
|
...configRestAPI.baseOptions.headers || {},
|
|
2263
|
-
"User-Agent":
|
|
2269
|
+
"User-Agent": userAgent
|
|
2264
2270
|
};
|
|
2265
2271
|
this.restAPI = new RestAPI(configRestAPI);
|
|
2266
2272
|
}
|