@binance/derivatives-trading-options 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/index.js CHANGED
@@ -39,12 +39,11 @@ __export(index_exports, {
39
39
  module.exports = __toCommonJS(index_exports);
40
40
 
41
41
  // src/derivatives-trading-options.ts
42
- var import_os = require("os");
43
42
  var import_common11 = require("@binance/common");
44
43
 
45
44
  // package.json
46
45
  var name = "@binance/derivatives-trading-options";
47
- var version = "4.0.1";
46
+ var version = "4.0.2";
48
47
 
49
48
  // src/rest-api/index.ts
50
49
  var rest_api_exports = {};
@@ -4364,13 +4363,16 @@ var WebsocketStreams = class {
4364
4363
  // src/derivatives-trading-options.ts
4365
4364
  var DerivativesTradingOptions = class {
4366
4365
  constructor(config) {
4366
+ const userAgent = (0, import_common11.buildUserAgent)(name, version);
4367
4367
  if (config?.configurationRestAPI) {
4368
- const configRestAPI = new import_common11.ConfigurationRestAPI(config.configurationRestAPI);
4368
+ const configRestAPI = new import_common11.ConfigurationRestAPI(
4369
+ config.configurationRestAPI
4370
+ );
4369
4371
  configRestAPI.basePath = configRestAPI.basePath || import_common11.DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL;
4370
4372
  configRestAPI.baseOptions = configRestAPI.baseOptions || {};
4371
4373
  configRestAPI.baseOptions.headers = {
4372
4374
  ...configRestAPI.baseOptions.headers || {},
4373
- "User-Agent": `${name}/${version} (Node.js/${process.version}; ${(0, import_os.platform)()}; ${(0, import_os.arch)()})`
4375
+ "User-Agent": userAgent
4374
4376
  };
4375
4377
  this.restAPI = new RestAPI(configRestAPI);
4376
4378
  }
@@ -4379,6 +4381,7 @@ var DerivativesTradingOptions = class {
4379
4381
  config.configurationWebsocketStreams
4380
4382
  );
4381
4383
  configWebsocketStreams.wsURL = configWebsocketStreams.wsURL || import_common11.DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL;
4384
+ configWebsocketStreams.userAgent = userAgent;
4382
4385
  this.websocketStreams = new WebsocketStreams(configWebsocketStreams);
4383
4386
  }
4384
4387
  }