@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.mjs CHANGED
@@ -5,8 +5,8 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/derivatives-trading-options.ts
8
- import { platform, arch } from "os";
9
8
  import {
9
+ buildUserAgent,
10
10
  ConfigurationRestAPI as ConfigurationRestAPI8,
11
11
  ConfigurationWebsocketStreams as ConfigurationWebsocketStreams2,
12
12
  DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL,
@@ -15,7 +15,7 @@ import {
15
15
 
16
16
  // package.json
17
17
  var name = "@binance/derivatives-trading-options";
18
- var version = "4.0.1";
18
+ var version = "4.0.2";
19
19
 
20
20
  // src/rest-api/index.ts
21
21
  var rest_api_exports = {};
@@ -4356,13 +4356,16 @@ var WebsocketStreams = class {
4356
4356
  // src/derivatives-trading-options.ts
4357
4357
  var DerivativesTradingOptions = class {
4358
4358
  constructor(config) {
4359
+ const userAgent = buildUserAgent(name, version);
4359
4360
  if (config?.configurationRestAPI) {
4360
- const configRestAPI = new ConfigurationRestAPI8(config.configurationRestAPI);
4361
+ const configRestAPI = new ConfigurationRestAPI8(
4362
+ config.configurationRestAPI
4363
+ );
4361
4364
  configRestAPI.basePath = configRestAPI.basePath || DERIVATIVES_TRADING_OPTIONS_REST_API_PROD_URL;
4362
4365
  configRestAPI.baseOptions = configRestAPI.baseOptions || {};
4363
4366
  configRestAPI.baseOptions.headers = {
4364
4367
  ...configRestAPI.baseOptions.headers || {},
4365
- "User-Agent": `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`
4368
+ "User-Agent": userAgent
4366
4369
  };
4367
4370
  this.restAPI = new RestAPI(configRestAPI);
4368
4371
  }
@@ -4371,6 +4374,7 @@ var DerivativesTradingOptions = class {
4371
4374
  config.configurationWebsocketStreams
4372
4375
  );
4373
4376
  configWebsocketStreams.wsURL = configWebsocketStreams.wsURL || DERIVATIVES_TRADING_OPTIONS_WS_STREAMS_PROD_URL;
4377
+ configWebsocketStreams.userAgent = userAgent;
4374
4378
  this.websocketStreams = new WebsocketStreams(configWebsocketStreams);
4375
4379
  }
4376
4380
  }