@myx-trade/sdk 0.1.115 → 0.1.117

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
@@ -1447,11 +1447,12 @@ declare class Account {
1447
1447
  code: number;
1448
1448
  data: TradeFlowItem[];
1449
1449
  }>;
1450
- withdraw({ chainId, receiver, tokenAddress, amount }: {
1450
+ withdraw({ chainId, receiver, tokenAddress, amount, poolId }: {
1451
1451
  chainId: number;
1452
1452
  receiver: string;
1453
1453
  tokenAddress: string;
1454
1454
  amount: string;
1455
+ poolId: string;
1455
1456
  }): Promise<{
1456
1457
  code: number;
1457
1458
  message: string;
package/dist/index.d.ts CHANGED
@@ -1447,11 +1447,12 @@ declare class Account {
1447
1447
  code: number;
1448
1448
  data: TradeFlowItem[];
1449
1449
  }>;
1450
- withdraw({ chainId, receiver, tokenAddress, amount }: {
1450
+ withdraw({ chainId, receiver, tokenAddress, amount, poolId }: {
1451
1451
  chainId: number;
1452
1452
  receiver: string;
1453
1453
  tokenAddress: string;
1454
1454
  amount: string;
1455
+ poolId: string;
1455
1456
  }): Promise<{
1456
1457
  code: number;
1457
1458
  message: string;
package/dist/index.js CHANGED
@@ -1822,7 +1822,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1822
1822
  // package.json
1823
1823
  var package_default = {
1824
1824
  name: "@myx-trade/sdk",
1825
- version: "0.1.115",
1825
+ version: "0.1.117",
1826
1826
  private: false,
1827
1827
  publishConfig: {
1828
1828
  access: "public"
@@ -21045,7 +21045,7 @@ var Account = class {
21045
21045
  data: res.data
21046
21046
  };
21047
21047
  }
21048
- async withdraw({ chainId, receiver, tokenAddress, amount }) {
21048
+ async withdraw({ chainId, receiver, tokenAddress, amount, poolId }) {
21049
21049
  const config = this.configManager.getConfig();
21050
21050
  const contractAddress = getContractAddressByChainId(chainId);
21051
21051
  try {
@@ -21062,11 +21062,11 @@ var Account = class {
21062
21062
  Account_default,
21063
21063
  seamlessWallet
21064
21064
  );
21065
- const functionHash = accountContract2.interface.encodeFunctionData("withdraw", [receiver, tokenAddress, amount]);
21065
+ const functionHash = accountContract2.interface.encodeFunctionData("updateAndWithdraw", [receiver, poolId, true, amount]);
21066
21066
  const nonce = await forwarderContract.nonces(seamlessWallet.address);
21067
21067
  const forwardTxParams = {
21068
21068
  from: seamlessWallet.address ?? "",
21069
- to: this.configManager.getConfig().brokerAddress,
21069
+ to: contractAddress.Account,
21070
21070
  value: "0",
21071
21071
  gas: "350000",
21072
21072
  deadline: (0, import_dayjs3.default)().add(60, "minute").unix(),
@@ -21087,7 +21087,7 @@ var Account = class {
21087
21087
  Account_default,
21088
21088
  config.signer
21089
21089
  );
21090
- const rs = await accountContract.withdraw(receiver, tokenAddress, amount);
21090
+ const rs = await accountContract.updateAndWithdraw(receiver, poolId, true, amount);
21091
21091
  const receipt = await rs?.wait(1);
21092
21092
  return {
21093
21093
  code: 0,
@@ -21128,7 +21128,7 @@ var Account = class {
21128
21128
  const nonce = await forwarderContract.nonces(seamlessWallet.address);
21129
21129
  const forwardTxParams = {
21130
21130
  from: seamlessWallet.address ?? "",
21131
- to: this.configManager.getConfig().brokerAddress,
21131
+ to: contractAddress.Account,
21132
21132
  value: "0",
21133
21133
  gas: "350000",
21134
21134
  deadline: (0, import_dayjs3.default)().add(60, "minute").unix(),
package/dist/index.mjs CHANGED
@@ -1732,7 +1732,7 @@ var RotationProvider = class extends BaseProvider {
1732
1732
  // package.json
1733
1733
  var package_default = {
1734
1734
  name: "@myx-trade/sdk",
1735
- version: "0.1.115",
1735
+ version: "0.1.117",
1736
1736
  private: false,
1737
1737
  publishConfig: {
1738
1738
  access: "public"
@@ -20955,7 +20955,7 @@ var Account = class {
20955
20955
  data: res.data
20956
20956
  };
20957
20957
  }
20958
- async withdraw({ chainId, receiver, tokenAddress, amount }) {
20958
+ async withdraw({ chainId, receiver, tokenAddress, amount, poolId }) {
20959
20959
  const config = this.configManager.getConfig();
20960
20960
  const contractAddress = getContractAddressByChainId(chainId);
20961
20961
  try {
@@ -20972,11 +20972,11 @@ var Account = class {
20972
20972
  Account_default,
20973
20973
  seamlessWallet
20974
20974
  );
20975
- const functionHash = accountContract2.interface.encodeFunctionData("withdraw", [receiver, tokenAddress, amount]);
20975
+ const functionHash = accountContract2.interface.encodeFunctionData("updateAndWithdraw", [receiver, poolId, true, amount]);
20976
20976
  const nonce = await forwarderContract.nonces(seamlessWallet.address);
20977
20977
  const forwardTxParams = {
20978
20978
  from: seamlessWallet.address ?? "",
20979
- to: this.configManager.getConfig().brokerAddress,
20979
+ to: contractAddress.Account,
20980
20980
  value: "0",
20981
20981
  gas: "350000",
20982
20982
  deadline: dayjs3().add(60, "minute").unix(),
@@ -20997,7 +20997,7 @@ var Account = class {
20997
20997
  Account_default,
20998
20998
  config.signer
20999
20999
  );
21000
- const rs = await accountContract.withdraw(receiver, tokenAddress, amount);
21000
+ const rs = await accountContract.updateAndWithdraw(receiver, poolId, true, amount);
21001
21001
  const receipt = await rs?.wait(1);
21002
21002
  return {
21003
21003
  code: 0,
@@ -21038,7 +21038,7 @@ var Account = class {
21038
21038
  const nonce = await forwarderContract.nonces(seamlessWallet.address);
21039
21039
  const forwardTxParams = {
21040
21040
  from: seamlessWallet.address ?? "",
21041
- to: this.configManager.getConfig().brokerAddress,
21041
+ to: contractAddress.Account,
21042
21042
  value: "0",
21043
21043
  gas: "350000",
21044
21044
  deadline: dayjs3().add(60, "minute").unix(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.115",
3
+ "version": "0.1.117",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"