@myx-trade/sdk 0.1.86 → 0.1.89

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
@@ -1,4 +1,5 @@
1
- import { AddressLike, Signer, ethers } from 'ethers';
1
+ import * as ethers from 'ethers';
2
+ import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
2
3
  export { formatUnits, parseUnits } from 'ethers';
3
4
  import { Options, Event } from 'reconnecting-websocket';
4
5
  import { WalletClient } from 'viem';
@@ -8,9 +9,6 @@ declare enum ChainId {
8
9
  LINEA_MAINNET = 59144,
9
10
  ARB_TESTNET = 421614,
10
11
  ARB_MAINNET = 42161,
11
- OPBNB_TESTNET = 5611,
12
- OPBNB_MAINNET = 204,
13
- SCROLL_MAINNET = 534352,
14
12
  BSC_TESTNET = 97,
15
13
  BSC_MAINNET = 56
16
14
  }
@@ -51,49 +49,49 @@ interface CancelTpSLParams {
51
49
  orderId: string;
52
50
  }
53
51
 
54
- declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
52
+ declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
55
53
 
56
- declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
57
- declare const getMarketPools: (chainId: ChainId) => Promise<any>;
54
+ declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
55
+ declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
58
56
  declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
59
57
  quotePool: {
60
- poolToken: any;
61
- exchangeRate: any;
62
- poolTokenPrice: any;
63
- poolTokenSupply: any;
58
+ poolToken: string;
59
+ exchangeRate: bigint;
60
+ poolTokenPrice: bigint;
61
+ poolTokenSupply: bigint;
64
62
  };
65
63
  basePool: {
66
- poolToken: any;
67
- exchangeRate: any;
68
- poolTokenPrice: any;
69
- poolTokenSupply: any;
64
+ poolToken: string;
65
+ exchangeRate: bigint;
66
+ poolTokenPrice: bigint;
67
+ poolTokenSupply: bigint;
70
68
  };
71
69
  reserveInfo: {
72
- baseTotalAmount: any;
73
- baseReservedAmount: any;
74
- quoteTotalAmount: any;
75
- quoteReservedAmount: any;
70
+ baseTotalAmount: bigint;
71
+ baseReservedAmount: bigint;
72
+ quoteTotalAmount: bigint;
73
+ quoteReservedAmount: bigint;
76
74
  };
77
75
  fundingInfo: {
78
- nextFundingRate: any;
79
- lastFundingFeeTracker: any;
80
- nextEpochTime: any;
76
+ nextFundingRate: bigint;
77
+ lastFundingFeeTracker: bigint;
78
+ nextEpochTime: bigint;
81
79
  };
82
80
  ioTracker: {
83
- tracker: any;
84
- longSize: any;
85
- shortSize: any;
86
- poolEntryPrice: any;
81
+ tracker: bigint;
82
+ longSize: bigint;
83
+ shortSize: bigint;
84
+ poolEntryPrice: bigint;
87
85
  };
88
86
  }>;
89
87
 
90
- declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
88
+ declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
91
89
 
92
- declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
90
+ declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
93
91
 
94
- declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
92
+ declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
95
93
 
96
- declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
94
+ declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
97
95
 
98
96
  /**
99
97
  * Trading related types and enums
@@ -873,21 +871,21 @@ interface PreviewWithdrawDataParams {
873
871
  amount: string | number;
874
872
  }
875
873
 
876
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
877
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
874
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
875
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
878
876
 
879
- declare const deposit$1: (params: Deposit) => Promise<any>;
877
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
880
878
 
881
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
879
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
882
880
 
883
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
881
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
884
882
 
885
883
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
886
- baseAmountOut: any;
887
- rebateAmount: any;
884
+ baseAmountOut: bigint;
885
+ rebateAmount: bigint;
888
886
  } | undefined>;
889
887
 
890
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
888
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
891
889
 
892
890
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
893
891
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -896,18 +894,18 @@ declare namespace index$2 {
896
894
  export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw };
897
895
  }
898
896
 
899
- declare const deposit: (params: Deposit) => Promise<any>;
897
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
900
898
 
901
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
899
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
902
900
 
903
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
901
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
904
902
 
905
- declare const getRewards: (params: RewardsParams) => Promise<any>;
903
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
906
904
 
907
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
908
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
905
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
906
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
909
907
 
910
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
908
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
911
909
 
912
910
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
913
911
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -920,9 +918,17 @@ declare namespace index$1 {
920
918
  export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw };
921
919
  }
922
920
 
923
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
921
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, string, bigint, bigint, bigint, bigint, bigint] & {
922
+ marketId: string;
923
+ quoteToken: string;
924
+ baseReserveRatio: bigint;
925
+ quoteReserveRatio: bigint;
926
+ oracleFeeUsd: bigint;
927
+ oracleRefundFeeUsd: bigint;
928
+ poolPrimeThreshold: bigint;
929
+ }) | undefined>;
924
930
 
925
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
931
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
926
932
 
927
933
  declare const index_getMarket: typeof getMarket;
928
934
  declare const index_getOracleFee: typeof getOracleFee;
@@ -965,9 +971,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
965
971
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
966
972
  balance?: number | undefined;
967
973
  address: string;
968
- name: any;
969
- symbol: any;
970
- decimals: any;
974
+ name: string;
975
+ symbol: string;
976
+ decimals: bigint;
971
977
  icon: string;
972
978
  totalSupply: number;
973
979
  }>;
@@ -1181,7 +1187,7 @@ interface MyxClientConfig {
1181
1187
  signer?: Signer;
1182
1188
  seamlessAccount?: {
1183
1189
  masterAddress: string;
1184
- wallet: ethers.Wallet | null;
1190
+ wallet: ethers$1.Wallet | null;
1185
1191
  authorized: boolean;
1186
1192
  };
1187
1193
  walletClient?: WalletClient;
@@ -1201,7 +1207,7 @@ declare class ConfigManager {
1201
1207
  clear(): void;
1202
1208
  startSeamlessMode(open: boolean): void;
1203
1209
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1204
- wallet?: ethers.Wallet;
1210
+ wallet?: ethers$1.Wallet;
1205
1211
  authorized?: boolean;
1206
1212
  masterAddress?: string;
1207
1213
  }): void;
@@ -1520,9 +1526,9 @@ declare class Seamless {
1520
1526
  private utils;
1521
1527
  private account;
1522
1528
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1523
- onCheckRelayer(account: string, relayer: string): Promise<any>;
1529
+ onCheckRelayer(account: string, relayer: string): Promise<boolean>;
1524
1530
  getUSDPermitParams(deadline: number): Promise<{
1525
- token: string | ethers.Addressable;
1531
+ token: string | ethers$1.Addressable;
1526
1532
  owner: Promise<string> | undefined;
1527
1533
  spender: string;
1528
1534
  value: bigint;
@@ -1539,7 +1545,7 @@ declare class Seamless {
1539
1545
  deadline: number;
1540
1546
  data: string;
1541
1547
  nonce: string;
1542
- }, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1548
+ }, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1543
1549
  authorizeSeamlessAccount({ approve, seamlessAddress }: {
1544
1550
  approve: boolean;
1545
1551
  seamlessAddress: string;
@@ -1559,7 +1565,7 @@ declare class Seamless {
1559
1565
  data: {
1560
1566
  masterAddress: string;
1561
1567
  seamlessAccount: string;
1562
- authorized: any;
1568
+ authorized: boolean;
1563
1569
  };
1564
1570
  }>;
1565
1571
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1577,9 +1583,9 @@ declare class Seamless {
1577
1583
  }): Promise<{
1578
1584
  code: number;
1579
1585
  data: {
1580
- masterAddress: any;
1586
+ masterAddress: string;
1581
1587
  seamlessAccount: string;
1582
- authorized: any;
1588
+ authorized: boolean;
1583
1589
  apiKey: string;
1584
1590
  };
1585
1591
  }>;
@@ -1598,7 +1604,7 @@ declare class Seamless {
1598
1604
  data: {
1599
1605
  masterAddress: string;
1600
1606
  seamlessAccount: string;
1601
- authorized: any;
1607
+ authorized: boolean;
1602
1608
  apiKey: string;
1603
1609
  };
1604
1610
  message?: undefined;
@@ -1625,13 +1631,13 @@ declare class Order {
1625
1631
  data: {
1626
1632
  success: boolean;
1627
1633
  orderId: string | null;
1628
- transactionHash: any;
1629
- blockNumber: any;
1630
- gasUsed: any;
1634
+ transactionHash: string;
1635
+ blockNumber: number | undefined;
1636
+ gasUsed: string | undefined;
1631
1637
  status: string;
1632
1638
  confirmations: number;
1633
1639
  timestamp: number;
1634
- receipt: any;
1640
+ receipt: ethers$1.ContractTransactionReceipt | null;
1635
1641
  };
1636
1642
  } | {
1637
1643
  code: number;
@@ -1642,13 +1648,13 @@ declare class Order {
1642
1648
  code: number;
1643
1649
  message: string;
1644
1650
  data: string | null;
1645
- transactionHash: any;
1646
- blockNumber: any;
1647
- gasUsed: any;
1651
+ transactionHash: string;
1652
+ blockNumber: number | undefined;
1653
+ gasUsed: string | undefined;
1648
1654
  status: string;
1649
1655
  confirmations: number;
1650
1656
  timestamp: number;
1651
- receipt: any;
1657
+ receipt: ethers$1.ContractTransactionReceipt | null;
1652
1658
  } | {
1653
1659
  code: number;
1654
1660
  message: any;
@@ -1667,13 +1673,13 @@ declare class Order {
1667
1673
  data: {
1668
1674
  success: boolean;
1669
1675
  orderId: string | null;
1670
- transactionHash: any;
1671
- blockNumber: any;
1672
- gasUsed: any;
1676
+ transactionHash: string;
1677
+ blockNumber: number | undefined;
1678
+ gasUsed: string | undefined;
1673
1679
  status: string;
1674
1680
  confirmations: number;
1675
1681
  timestamp: number;
1676
- receipt: any;
1682
+ receipt: ethers$1.ContractTransactionReceipt | null;
1677
1683
  };
1678
1684
  } | {
1679
1685
  code: number;
@@ -1686,13 +1692,13 @@ declare class Order {
1686
1692
  data: {
1687
1693
  success: boolean;
1688
1694
  orderId: string | null;
1689
- transactionHash: any;
1690
- blockNumber: any;
1691
- gasUsed: any;
1695
+ transactionHash: string;
1696
+ blockNumber: number | undefined;
1697
+ gasUsed: string | undefined;
1692
1698
  status: string;
1693
1699
  confirmations: number;
1694
1700
  timestamp: number;
1695
- receipt: any;
1701
+ receipt: ethers$1.ContractTransactionReceipt | null;
1696
1702
  };
1697
1703
  } | {
1698
1704
  code: number;
@@ -1713,7 +1719,7 @@ declare class Order {
1713
1719
  }>;
1714
1720
  updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
1715
1721
  code: number;
1716
- data: any;
1722
+ data: ethers$1.ContractTransactionReceipt | null;
1717
1723
  message: string;
1718
1724
  } | {
1719
1725
  code: number;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { AddressLike, Signer, ethers } from 'ethers';
1
+ import * as ethers from 'ethers';
2
+ import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
2
3
  export { formatUnits, parseUnits } from 'ethers';
3
4
  import { Options, Event } from 'reconnecting-websocket';
4
5
  import { WalletClient } from 'viem';
@@ -8,9 +9,6 @@ declare enum ChainId {
8
9
  LINEA_MAINNET = 59144,
9
10
  ARB_TESTNET = 421614,
10
11
  ARB_MAINNET = 42161,
11
- OPBNB_TESTNET = 5611,
12
- OPBNB_MAINNET = 204,
13
- SCROLL_MAINNET = 534352,
14
12
  BSC_TESTNET = 97,
15
13
  BSC_MAINNET = 56
16
14
  }
@@ -51,49 +49,49 @@ interface CancelTpSLParams {
51
49
  orderId: string;
52
50
  }
53
51
 
54
- declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
52
+ declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
55
53
 
56
- declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
57
- declare const getMarketPools: (chainId: ChainId) => Promise<any>;
54
+ declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
55
+ declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
58
56
  declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
59
57
  quotePool: {
60
- poolToken: any;
61
- exchangeRate: any;
62
- poolTokenPrice: any;
63
- poolTokenSupply: any;
58
+ poolToken: string;
59
+ exchangeRate: bigint;
60
+ poolTokenPrice: bigint;
61
+ poolTokenSupply: bigint;
64
62
  };
65
63
  basePool: {
66
- poolToken: any;
67
- exchangeRate: any;
68
- poolTokenPrice: any;
69
- poolTokenSupply: any;
64
+ poolToken: string;
65
+ exchangeRate: bigint;
66
+ poolTokenPrice: bigint;
67
+ poolTokenSupply: bigint;
70
68
  };
71
69
  reserveInfo: {
72
- baseTotalAmount: any;
73
- baseReservedAmount: any;
74
- quoteTotalAmount: any;
75
- quoteReservedAmount: any;
70
+ baseTotalAmount: bigint;
71
+ baseReservedAmount: bigint;
72
+ quoteTotalAmount: bigint;
73
+ quoteReservedAmount: bigint;
76
74
  };
77
75
  fundingInfo: {
78
- nextFundingRate: any;
79
- lastFundingFeeTracker: any;
80
- nextEpochTime: any;
76
+ nextFundingRate: bigint;
77
+ lastFundingFeeTracker: bigint;
78
+ nextEpochTime: bigint;
81
79
  };
82
80
  ioTracker: {
83
- tracker: any;
84
- longSize: any;
85
- shortSize: any;
86
- poolEntryPrice: any;
81
+ tracker: bigint;
82
+ longSize: bigint;
83
+ shortSize: bigint;
84
+ poolEntryPrice: bigint;
87
85
  };
88
86
  }>;
89
87
 
90
- declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
88
+ declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
91
89
 
92
- declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
90
+ declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
93
91
 
94
- declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
92
+ declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
95
93
 
96
- declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
94
+ declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
97
95
 
98
96
  /**
99
97
  * Trading related types and enums
@@ -873,21 +871,21 @@ interface PreviewWithdrawDataParams {
873
871
  amount: string | number;
874
872
  }
875
873
 
876
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
877
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
874
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
875
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
878
876
 
879
- declare const deposit$1: (params: Deposit) => Promise<any>;
877
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
880
878
 
881
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
879
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
882
880
 
883
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
881
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
884
882
 
885
883
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
886
- baseAmountOut: any;
887
- rebateAmount: any;
884
+ baseAmountOut: bigint;
885
+ rebateAmount: bigint;
888
886
  } | undefined>;
889
887
 
890
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
888
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
891
889
 
892
890
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
893
891
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -896,18 +894,18 @@ declare namespace index$2 {
896
894
  export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw };
897
895
  }
898
896
 
899
- declare const deposit: (params: Deposit) => Promise<any>;
897
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
900
898
 
901
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
899
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
902
900
 
903
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
901
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
904
902
 
905
- declare const getRewards: (params: RewardsParams) => Promise<any>;
903
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
906
904
 
907
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
908
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
905
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
906
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
909
907
 
910
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
908
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
911
909
 
912
910
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
913
911
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -920,9 +918,17 @@ declare namespace index$1 {
920
918
  export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw };
921
919
  }
922
920
 
923
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
921
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, string, bigint, bigint, bigint, bigint, bigint] & {
922
+ marketId: string;
923
+ quoteToken: string;
924
+ baseReserveRatio: bigint;
925
+ quoteReserveRatio: bigint;
926
+ oracleFeeUsd: bigint;
927
+ oracleRefundFeeUsd: bigint;
928
+ poolPrimeThreshold: bigint;
929
+ }) | undefined>;
924
930
 
925
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
931
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
926
932
 
927
933
  declare const index_getMarket: typeof getMarket;
928
934
  declare const index_getOracleFee: typeof getOracleFee;
@@ -965,9 +971,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
965
971
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
966
972
  balance?: number | undefined;
967
973
  address: string;
968
- name: any;
969
- symbol: any;
970
- decimals: any;
974
+ name: string;
975
+ symbol: string;
976
+ decimals: bigint;
971
977
  icon: string;
972
978
  totalSupply: number;
973
979
  }>;
@@ -1181,7 +1187,7 @@ interface MyxClientConfig {
1181
1187
  signer?: Signer;
1182
1188
  seamlessAccount?: {
1183
1189
  masterAddress: string;
1184
- wallet: ethers.Wallet | null;
1190
+ wallet: ethers$1.Wallet | null;
1185
1191
  authorized: boolean;
1186
1192
  };
1187
1193
  walletClient?: WalletClient;
@@ -1201,7 +1207,7 @@ declare class ConfigManager {
1201
1207
  clear(): void;
1202
1208
  startSeamlessMode(open: boolean): void;
1203
1209
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1204
- wallet?: ethers.Wallet;
1210
+ wallet?: ethers$1.Wallet;
1205
1211
  authorized?: boolean;
1206
1212
  masterAddress?: string;
1207
1213
  }): void;
@@ -1520,9 +1526,9 @@ declare class Seamless {
1520
1526
  private utils;
1521
1527
  private account;
1522
1528
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1523
- onCheckRelayer(account: string, relayer: string): Promise<any>;
1529
+ onCheckRelayer(account: string, relayer: string): Promise<boolean>;
1524
1530
  getUSDPermitParams(deadline: number): Promise<{
1525
- token: string | ethers.Addressable;
1531
+ token: string | ethers$1.Addressable;
1526
1532
  owner: Promise<string> | undefined;
1527
1533
  spender: string;
1528
1534
  value: bigint;
@@ -1539,7 +1545,7 @@ declare class Seamless {
1539
1545
  deadline: number;
1540
1546
  data: string;
1541
1547
  nonce: string;
1542
- }, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1548
+ }, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1543
1549
  authorizeSeamlessAccount({ approve, seamlessAddress }: {
1544
1550
  approve: boolean;
1545
1551
  seamlessAddress: string;
@@ -1559,7 +1565,7 @@ declare class Seamless {
1559
1565
  data: {
1560
1566
  masterAddress: string;
1561
1567
  seamlessAccount: string;
1562
- authorized: any;
1568
+ authorized: boolean;
1563
1569
  };
1564
1570
  }>;
1565
1571
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1577,9 +1583,9 @@ declare class Seamless {
1577
1583
  }): Promise<{
1578
1584
  code: number;
1579
1585
  data: {
1580
- masterAddress: any;
1586
+ masterAddress: string;
1581
1587
  seamlessAccount: string;
1582
- authorized: any;
1588
+ authorized: boolean;
1583
1589
  apiKey: string;
1584
1590
  };
1585
1591
  }>;
@@ -1598,7 +1604,7 @@ declare class Seamless {
1598
1604
  data: {
1599
1605
  masterAddress: string;
1600
1606
  seamlessAccount: string;
1601
- authorized: any;
1607
+ authorized: boolean;
1602
1608
  apiKey: string;
1603
1609
  };
1604
1610
  message?: undefined;
@@ -1625,13 +1631,13 @@ declare class Order {
1625
1631
  data: {
1626
1632
  success: boolean;
1627
1633
  orderId: string | null;
1628
- transactionHash: any;
1629
- blockNumber: any;
1630
- gasUsed: any;
1634
+ transactionHash: string;
1635
+ blockNumber: number | undefined;
1636
+ gasUsed: string | undefined;
1631
1637
  status: string;
1632
1638
  confirmations: number;
1633
1639
  timestamp: number;
1634
- receipt: any;
1640
+ receipt: ethers$1.ContractTransactionReceipt | null;
1635
1641
  };
1636
1642
  } | {
1637
1643
  code: number;
@@ -1642,13 +1648,13 @@ declare class Order {
1642
1648
  code: number;
1643
1649
  message: string;
1644
1650
  data: string | null;
1645
- transactionHash: any;
1646
- blockNumber: any;
1647
- gasUsed: any;
1651
+ transactionHash: string;
1652
+ blockNumber: number | undefined;
1653
+ gasUsed: string | undefined;
1648
1654
  status: string;
1649
1655
  confirmations: number;
1650
1656
  timestamp: number;
1651
- receipt: any;
1657
+ receipt: ethers$1.ContractTransactionReceipt | null;
1652
1658
  } | {
1653
1659
  code: number;
1654
1660
  message: any;
@@ -1667,13 +1673,13 @@ declare class Order {
1667
1673
  data: {
1668
1674
  success: boolean;
1669
1675
  orderId: string | null;
1670
- transactionHash: any;
1671
- blockNumber: any;
1672
- gasUsed: any;
1676
+ transactionHash: string;
1677
+ blockNumber: number | undefined;
1678
+ gasUsed: string | undefined;
1673
1679
  status: string;
1674
1680
  confirmations: number;
1675
1681
  timestamp: number;
1676
- receipt: any;
1682
+ receipt: ethers$1.ContractTransactionReceipt | null;
1677
1683
  };
1678
1684
  } | {
1679
1685
  code: number;
@@ -1686,13 +1692,13 @@ declare class Order {
1686
1692
  data: {
1687
1693
  success: boolean;
1688
1694
  orderId: string | null;
1689
- transactionHash: any;
1690
- blockNumber: any;
1691
- gasUsed: any;
1695
+ transactionHash: string;
1696
+ blockNumber: number | undefined;
1697
+ gasUsed: string | undefined;
1692
1698
  status: string;
1693
1699
  confirmations: number;
1694
1700
  timestamp: number;
1695
- receipt: any;
1701
+ receipt: ethers$1.ContractTransactionReceipt | null;
1696
1702
  };
1697
1703
  } | {
1698
1704
  code: number;
@@ -1713,7 +1719,7 @@ declare class Order {
1713
1719
  }>;
1714
1720
  updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
1715
1721
  code: number;
1716
- data: any;
1722
+ data: ethers$1.ContractTransactionReceipt | null;
1717
1723
  message: string;
1718
1724
  } | {
1719
1725
  code: number;
package/dist/index.js CHANGED
@@ -1456,9 +1456,6 @@ var ChainId = /* @__PURE__ */ ((ChainId3) => {
1456
1456
  ChainId3[ChainId3["LINEA_MAINNET"] = 59144] = "LINEA_MAINNET";
1457
1457
  ChainId3[ChainId3["ARB_TESTNET"] = 421614] = "ARB_TESTNET";
1458
1458
  ChainId3[ChainId3["ARB_MAINNET"] = 42161] = "ARB_MAINNET";
1459
- ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
1460
- ChainId3[ChainId3["OPBNB_MAINNET"] = 204] = "OPBNB_MAINNET";
1461
- ChainId3[ChainId3["SCROLL_MAINNET"] = 534352] = "SCROLL_MAINNET";
1462
1459
  ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
1463
1460
  ChainId3[ChainId3["BSC_MAINNET"] = 56] = "BSC_MAINNET";
1464
1461
  return ChainId3;
@@ -1841,7 +1838,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1841
1838
  // package.json
1842
1839
  var package_default = {
1843
1840
  name: "@myx-trade/sdk",
1844
- version: "0.1.86",
1841
+ version: "0.1.89",
1845
1842
  private: false,
1846
1843
  publishConfig: {
1847
1844
  access: "public"
@@ -14483,6 +14480,7 @@ var Order = class {
14483
14480
  useAccountBalance: false
14484
14481
  };
14485
14482
  });
14483
+ this.logger.info("closeAllPositions params--->", positionIds, dataMap);
14486
14484
  const gasLimit = await brokerContract.placeOrdersWithPosition.estimateGas(positionIds, dataMap);
14487
14485
  const transaction = await brokerContract.placeOrdersWithPosition(positionIds, dataMap, {
14488
14486
  gasLimit: gasLimit * 120n / 100n
package/dist/index.mjs CHANGED
@@ -1361,9 +1361,6 @@ var ChainId = /* @__PURE__ */ ((ChainId3) => {
1361
1361
  ChainId3[ChainId3["LINEA_MAINNET"] = 59144] = "LINEA_MAINNET";
1362
1362
  ChainId3[ChainId3["ARB_TESTNET"] = 421614] = "ARB_TESTNET";
1363
1363
  ChainId3[ChainId3["ARB_MAINNET"] = 42161] = "ARB_MAINNET";
1364
- ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
1365
- ChainId3[ChainId3["OPBNB_MAINNET"] = 204] = "OPBNB_MAINNET";
1366
- ChainId3[ChainId3["SCROLL_MAINNET"] = 534352] = "SCROLL_MAINNET";
1367
1364
  ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
1368
1365
  ChainId3[ChainId3["BSC_MAINNET"] = 56] = "BSC_MAINNET";
1369
1366
  return ChainId3;
@@ -1752,7 +1749,7 @@ var RotationProvider = class extends BaseProvider {
1752
1749
  // package.json
1753
1750
  var package_default = {
1754
1751
  name: "@myx-trade/sdk",
1755
- version: "0.1.86",
1752
+ version: "0.1.89",
1756
1753
  private: false,
1757
1754
  publishConfig: {
1758
1755
  access: "public"
@@ -14394,6 +14391,7 @@ var Order = class {
14394
14391
  useAccountBalance: false
14395
14392
  };
14396
14393
  });
14394
+ this.logger.info("closeAllPositions params--->", positionIds, dataMap);
14397
14395
  const gasLimit = await brokerContract.placeOrdersWithPosition.estimateGas(positionIds, dataMap);
14398
14396
  const transaction = await brokerContract.placeOrdersWithPosition(positionIds, dataMap, {
14399
14397
  gasLimit: gasLimit * 120n / 100n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.86",
3
+ "version": "0.1.89",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"