@myx-trade/sdk 0.1.78 → 0.1.80

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 CHANGED
@@ -1200,7 +1200,7 @@ declare class ConfigManager {
1200
1200
  constructor(config: MyxClientConfig);
1201
1201
  clear(): void;
1202
1202
  startSeamlessMode(open: boolean): void;
1203
- updateClientChainId(chainId: number): void;
1203
+ updateClientChainId(chainId: number, brokerAddress: string): void;
1204
1204
  auth(params: Pick<MyxClientConfig, "signer" | "getAccessToken">): void;
1205
1205
  private validateConfig;
1206
1206
  /**
@@ -1759,7 +1759,7 @@ declare class MyxClient {
1759
1759
  * auth the client
1760
1760
  */
1761
1761
  auth(params: Required<Pick<MyxClientConfig, "signer" | "getAccessToken" | "walletClient">>): void;
1762
- updateClientChainId(chainId: number): void;
1762
+ updateClientChainId(chainId: number, brokerAddress: string): void;
1763
1763
  /**
1764
1764
  * close the client
1765
1765
  */
package/dist/index.d.ts CHANGED
@@ -1200,7 +1200,7 @@ declare class ConfigManager {
1200
1200
  constructor(config: MyxClientConfig);
1201
1201
  clear(): void;
1202
1202
  startSeamlessMode(open: boolean): void;
1203
- updateClientChainId(chainId: number): void;
1203
+ updateClientChainId(chainId: number, brokerAddress: string): void;
1204
1204
  auth(params: Pick<MyxClientConfig, "signer" | "getAccessToken">): void;
1205
1205
  private validateConfig;
1206
1206
  /**
@@ -1759,7 +1759,7 @@ declare class MyxClient {
1759
1759
  * auth the client
1760
1760
  */
1761
1761
  auth(params: Required<Pick<MyxClientConfig, "signer" | "getAccessToken" | "walletClient">>): void;
1762
- updateClientChainId(chainId: number): void;
1762
+ updateClientChainId(chainId: number, brokerAddress: string): void;
1763
1763
  /**
1764
1764
  * close the client
1765
1765
  */
package/dist/index.js CHANGED
@@ -1841,7 +1841,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1841
1841
  // package.json
1842
1842
  var package_default = {
1843
1843
  name: "@myx-trade/sdk",
1844
- version: "0.1.78",
1844
+ version: "0.1.80",
1845
1845
  private: false,
1846
1846
  publishConfig: {
1847
1847
  access: "public"
@@ -13668,10 +13668,11 @@ var ConfigManager = class {
13668
13668
  seamlessMode: open
13669
13669
  };
13670
13670
  }
13671
- updateClientChainId(chainId) {
13671
+ updateClientChainId(chainId, brokerAddress) {
13672
13672
  this.config = {
13673
13673
  ...this.config,
13674
- chainId
13674
+ chainId,
13675
+ brokerAddress
13675
13676
  };
13676
13677
  }
13677
13678
  auth(params) {
@@ -14325,7 +14326,6 @@ var Order = class {
14325
14326
  useAccountBalance = true;
14326
14327
  transferAmount = collateralWithNetworkFee - totalBalance;
14327
14328
  }
14328
- console.log("transferAmount-->", transferAmount);
14329
14329
  const data = {
14330
14330
  user: params.address,
14331
14331
  poolId: params.poolId,
@@ -14345,7 +14345,7 @@ var Order = class {
14345
14345
  tpPrice: params.tpPrice ?? "0",
14346
14346
  slSize: params.slSize ?? "0",
14347
14347
  slPrice: params.slPrice ?? "0",
14348
- useAccountBalance
14348
+ useAccountBalance: false
14349
14349
  };
14350
14350
  this.logger.info("createIncreaseOrder position params--->", data);
14351
14351
  if (config.seamlessMode) {
@@ -20968,8 +20968,8 @@ var MyxClient = class {
20968
20968
  auth(params) {
20969
20969
  this.configManager.auth(params);
20970
20970
  }
20971
- updateClientChainId(chainId) {
20972
- this.configManager.updateClientChainId(chainId);
20971
+ updateClientChainId(chainId, brokerAddress) {
20972
+ this.configManager.updateClientChainId(chainId, brokerAddress);
20973
20973
  }
20974
20974
  /**
20975
20975
  * close the client
package/dist/index.mjs CHANGED
@@ -1752,7 +1752,7 @@ var RotationProvider = class extends BaseProvider {
1752
1752
  // package.json
1753
1753
  var package_default = {
1754
1754
  name: "@myx-trade/sdk",
1755
- version: "0.1.78",
1755
+ version: "0.1.80",
1756
1756
  private: false,
1757
1757
  publishConfig: {
1758
1758
  access: "public"
@@ -13579,10 +13579,11 @@ var ConfigManager = class {
13579
13579
  seamlessMode: open
13580
13580
  };
13581
13581
  }
13582
- updateClientChainId(chainId) {
13582
+ updateClientChainId(chainId, brokerAddress) {
13583
13583
  this.config = {
13584
13584
  ...this.config,
13585
- chainId
13585
+ chainId,
13586
+ brokerAddress
13586
13587
  };
13587
13588
  }
13588
13589
  auth(params) {
@@ -14236,7 +14237,6 @@ var Order = class {
14236
14237
  useAccountBalance = true;
14237
14238
  transferAmount = collateralWithNetworkFee - totalBalance;
14238
14239
  }
14239
- console.log("transferAmount-->", transferAmount);
14240
14240
  const data = {
14241
14241
  user: params.address,
14242
14242
  poolId: params.poolId,
@@ -14256,7 +14256,7 @@ var Order = class {
14256
14256
  tpPrice: params.tpPrice ?? "0",
14257
14257
  slSize: params.slSize ?? "0",
14258
14258
  slPrice: params.slPrice ?? "0",
14259
- useAccountBalance
14259
+ useAccountBalance: false
14260
14260
  };
14261
14261
  this.logger.info("createIncreaseOrder position params--->", data);
14262
14262
  if (config.seamlessMode) {
@@ -20879,8 +20879,8 @@ var MyxClient = class {
20879
20879
  auth(params) {
20880
20880
  this.configManager.auth(params);
20881
20881
  }
20882
- updateClientChainId(chainId) {
20883
- this.configManager.updateClientChainId(chainId);
20882
+ updateClientChainId(chainId, brokerAddress) {
20883
+ this.configManager.updateClientChainId(chainId, brokerAddress);
20884
20884
  }
20885
20885
  /**
20886
20886
  * close the client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.78",
3
+ "version": "0.1.80",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"