@binance/crypto-loan 6.0.3 → 6.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/crypto-loan.ts
|
|
8
|
-
import {
|
|
9
|
-
|
|
8
|
+
import {
|
|
9
|
+
buildUserAgent,
|
|
10
|
+
ConfigurationRestAPI as ConfigurationRestAPI4,
|
|
11
|
+
CRYPTO_LOAN_REST_API_PROD_URL
|
|
12
|
+
} from "@binance/common";
|
|
10
13
|
|
|
11
14
|
// package.json
|
|
12
15
|
var name = "@binance/crypto-loan";
|
|
13
|
-
var version = "6.0.
|
|
16
|
+
var version = "6.0.4";
|
|
14
17
|
|
|
15
18
|
// src/rest-api/index.ts
|
|
16
19
|
var rest_api_exports = {};
|
|
@@ -1564,13 +1567,16 @@ var RestAPI = class {
|
|
|
1564
1567
|
// src/crypto-loan.ts
|
|
1565
1568
|
var CryptoLoan = class {
|
|
1566
1569
|
constructor(config) {
|
|
1570
|
+
const userAgent = buildUserAgent(name, version);
|
|
1567
1571
|
if (config?.configurationRestAPI) {
|
|
1568
|
-
const configRestAPI = new ConfigurationRestAPI4(
|
|
1572
|
+
const configRestAPI = new ConfigurationRestAPI4(
|
|
1573
|
+
config.configurationRestAPI
|
|
1574
|
+
);
|
|
1569
1575
|
configRestAPI.basePath = configRestAPI.basePath || CRYPTO_LOAN_REST_API_PROD_URL;
|
|
1570
1576
|
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
1571
1577
|
configRestAPI.baseOptions.headers = {
|
|
1572
1578
|
...configRestAPI.baseOptions.headers || {},
|
|
1573
|
-
"User-Agent":
|
|
1579
|
+
"User-Agent": userAgent
|
|
1574
1580
|
};
|
|
1575
1581
|
this.restAPI = new RestAPI(configRestAPI);
|
|
1576
1582
|
}
|