@myx-trade/sdk 0.1.179 → 0.1.182

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';
@@ -48,49 +49,49 @@ interface CancelTpSLParams {
48
49
  orderId: string;
49
50
  }
50
51
 
51
- declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
52
+ declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
52
53
 
53
- declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
54
- 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[]>;
55
56
  declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
56
57
  quotePool: {
57
- poolToken: any;
58
- exchangeRate: any;
59
- poolTokenPrice: any;
60
- poolTokenSupply: any;
58
+ poolToken: string;
59
+ exchangeRate: bigint;
60
+ poolTokenPrice: bigint;
61
+ poolTokenSupply: bigint;
61
62
  };
62
63
  basePool: {
63
- poolToken: any;
64
- exchangeRate: any;
65
- poolTokenPrice: any;
66
- poolTokenSupply: any;
64
+ poolToken: string;
65
+ exchangeRate: bigint;
66
+ poolTokenPrice: bigint;
67
+ poolTokenSupply: bigint;
67
68
  };
68
69
  reserveInfo: {
69
- baseTotalAmount: any;
70
- baseReservedAmount: any;
71
- quoteTotalAmount: any;
72
- quoteReservedAmount: any;
70
+ baseTotalAmount: bigint;
71
+ baseReservedAmount: bigint;
72
+ quoteTotalAmount: bigint;
73
+ quoteReservedAmount: bigint;
73
74
  };
74
75
  fundingInfo: {
75
- nextFundingRate: any;
76
- lastFundingFeeTracker: any;
77
- nextEpochTime: any;
76
+ nextFundingRate: bigint;
77
+ lastFundingFeeTracker: bigint;
78
+ nextEpochTime: bigint;
78
79
  };
79
80
  ioTracker: {
80
- tracker: any;
81
- longSize: any;
82
- shortSize: any;
83
- poolEntryPrice: any;
81
+ tracker: bigint;
82
+ longSize: bigint;
83
+ shortSize: bigint;
84
+ poolEntryPrice: bigint;
84
85
  };
85
86
  }>;
86
87
 
87
- declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
88
+ declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
88
89
 
89
- declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
90
+ declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
90
91
 
91
- declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
92
+ declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
92
93
 
93
- 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>;
94
95
 
95
96
  /**
96
97
  * Trading related types and enums
@@ -915,21 +916,21 @@ interface PreviewWithdrawDataParams {
915
916
  amount: string | number;
916
917
  }
917
918
 
918
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
919
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
919
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
920
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
920
921
 
921
- declare const deposit$1: (params: Deposit) => Promise<any>;
922
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
922
923
 
923
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
924
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
924
925
 
925
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
926
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
926
927
 
927
928
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
928
- baseAmountOut: any;
929
- rebateAmount: any;
929
+ baseAmountOut: bigint;
930
+ rebateAmount: bigint;
930
931
  } | undefined>;
931
932
 
932
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
933
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
933
934
 
934
935
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
935
936
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -938,18 +939,18 @@ declare namespace index$2 {
938
939
  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 };
939
940
  }
940
941
 
941
- declare const deposit: (params: Deposit) => Promise<any>;
942
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
942
943
 
943
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
944
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
944
945
 
945
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
946
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
946
947
 
947
- declare const getRewards: (params: RewardsParams) => Promise<any>;
948
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
948
949
 
949
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
950
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
950
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
951
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
951
952
 
952
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
953
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
953
954
 
954
955
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
955
956
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -962,9 +963,16 @@ declare namespace index$1 {
962
963
  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 };
963
964
  }
964
965
 
965
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
966
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
967
+ quoteToken: string;
968
+ baseReserveRatio: bigint;
969
+ quoteReserveRatio: bigint;
970
+ oracleFeeUsd: bigint;
971
+ oracleRefundFeeUsd: bigint;
972
+ poolPrimeThreshold: bigint;
973
+ }) | undefined>;
966
974
 
967
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
975
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
968
976
 
969
977
  declare const index_getMarket: typeof getMarket;
970
978
  declare const index_getOracleFee: typeof getOracleFee;
@@ -1007,9 +1015,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
1007
1015
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
1008
1016
  balance?: number | undefined;
1009
1017
  address: string;
1010
- name: any;
1011
- symbol: any;
1012
- decimals: any;
1018
+ name: string;
1019
+ symbol: string;
1020
+ decimals: bigint;
1013
1021
  icon: string;
1014
1022
  totalSupply: number;
1015
1023
  }>;
@@ -1223,7 +1231,7 @@ interface MyxClientConfig {
1223
1231
  signer?: Signer;
1224
1232
  seamlessAccount?: {
1225
1233
  masterAddress: string;
1226
- wallet: ethers.Wallet | null;
1234
+ wallet: ethers$1.Wallet | null;
1227
1235
  authorized: boolean;
1228
1236
  };
1229
1237
  walletClient?: WalletClient;
@@ -1243,7 +1251,7 @@ declare class ConfigManager {
1243
1251
  clear(): void;
1244
1252
  startSeamlessMode(open: boolean): MyxClientConfig;
1245
1253
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1246
- wallet?: ethers.Wallet;
1254
+ wallet?: ethers$1.Wallet;
1247
1255
  authorized?: boolean;
1248
1256
  masterAddress?: string;
1249
1257
  }): void;
@@ -1351,7 +1359,7 @@ declare class Utils {
1351
1359
  quoteAddress: string;
1352
1360
  amount?: string;
1353
1361
  spenderAddress?: string;
1354
- signer?: ethers.Signer;
1362
+ signer?: ethers$1.Signer;
1355
1363
  }): Promise<{
1356
1364
  code: number;
1357
1365
  message: any;
@@ -1394,7 +1402,68 @@ declare class Utils {
1394
1402
  marketPrice: string;
1395
1403
  }): Promise<{
1396
1404
  code: number;
1397
- data: any;
1405
+ data: [[string, bigint, bigint, bigint] & {
1406
+ poolToken: string;
1407
+ exchangeRate: bigint;
1408
+ poolTokenPrice: bigint;
1409
+ poolTokenSupply: bigint;
1410
+ }, [string, bigint, bigint, bigint] & {
1411
+ poolToken: string;
1412
+ exchangeRate: bigint;
1413
+ poolTokenPrice: bigint;
1414
+ poolTokenSupply: bigint;
1415
+ }, [bigint, bigint, bigint, bigint] & {
1416
+ baseTotalAmount: bigint;
1417
+ baseReservedAmount: bigint;
1418
+ quoteTotalAmount: bigint;
1419
+ quoteReservedAmount: bigint;
1420
+ }, [bigint, bigint, bigint] & {
1421
+ nextFundingRate: bigint;
1422
+ lastFundingFeeTracker: bigint;
1423
+ nextEpochTime: bigint;
1424
+ }, [bigint, bigint, bigint, bigint] & {
1425
+ tracker: bigint;
1426
+ longSize: bigint;
1427
+ shortSize: bigint;
1428
+ poolEntryPrice: bigint;
1429
+ }, [bigint, bigint] & {
1430
+ windowCaps: bigint;
1431
+ openInterest: bigint;
1432
+ }] & {
1433
+ basePool: [string, bigint, bigint, bigint] & {
1434
+ poolToken: string;
1435
+ exchangeRate: bigint;
1436
+ poolTokenPrice: bigint;
1437
+ poolTokenSupply: bigint;
1438
+ };
1439
+ quotePool: [string, bigint, bigint, bigint] & {
1440
+ poolToken: string;
1441
+ exchangeRate: bigint;
1442
+ poolTokenPrice: bigint;
1443
+ poolTokenSupply: bigint;
1444
+ };
1445
+ reserveInfo: [bigint, bigint, bigint, bigint] & {
1446
+ baseTotalAmount: bigint;
1447
+ baseReservedAmount: bigint;
1448
+ quoteTotalAmount: bigint;
1449
+ quoteReservedAmount: bigint;
1450
+ };
1451
+ fundingInfo: [bigint, bigint, bigint] & {
1452
+ nextFundingRate: bigint;
1453
+ lastFundingFeeTracker: bigint;
1454
+ nextEpochTime: bigint;
1455
+ };
1456
+ oi: [bigint, bigint, bigint, bigint] & {
1457
+ tracker: bigint;
1458
+ longSize: bigint;
1459
+ shortSize: bigint;
1460
+ poolEntryPrice: bigint;
1461
+ };
1462
+ liquidityInfo: [bigint, bigint] & {
1463
+ windowCaps: bigint;
1464
+ openInterest: bigint;
1465
+ };
1466
+ };
1398
1467
  message?: undefined;
1399
1468
  } | {
1400
1469
  code: number;
@@ -1552,9 +1621,9 @@ declare class Seamless {
1552
1621
  private utils;
1553
1622
  private account;
1554
1623
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1555
- onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
1624
+ onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
1556
1625
  getUSDPermitParams(deadline: number, chainId: number): Promise<{
1557
- token: string | ethers.Addressable;
1626
+ token: string | ethers$1.Addressable;
1558
1627
  owner: string;
1559
1628
  spender: string;
1560
1629
  value: bigint;
@@ -1571,7 +1640,7 @@ declare class Seamless {
1571
1640
  deadline: number;
1572
1641
  data: string;
1573
1642
  nonce: string;
1574
- }, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1643
+ }, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1575
1644
  authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
1576
1645
  approve: boolean;
1577
1646
  seamlessAddress: string;
@@ -1593,7 +1662,7 @@ declare class Seamless {
1593
1662
  data: {
1594
1663
  masterAddress: string;
1595
1664
  seamlessAccount: string;
1596
- authorized: any;
1665
+ authorized: boolean;
1597
1666
  };
1598
1667
  }>;
1599
1668
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1612,9 +1681,9 @@ declare class Seamless {
1612
1681
  }): Promise<{
1613
1682
  code: number;
1614
1683
  data: {
1615
- masterAddress: any;
1684
+ masterAddress: string;
1616
1685
  seamlessAccount: string;
1617
- authorized: any;
1686
+ authorized: boolean;
1618
1687
  apiKey: string;
1619
1688
  };
1620
1689
  }>;
@@ -1634,7 +1703,7 @@ declare class Seamless {
1634
1703
  data: {
1635
1704
  masterAddress: string;
1636
1705
  seamlessAccount: string;
1637
- authorized: any;
1706
+ authorized: boolean;
1638
1707
  apiKey: string;
1639
1708
  };
1640
1709
  message?: undefined;
@@ -1723,13 +1792,13 @@ declare class Order {
1723
1792
  data: {
1724
1793
  success: boolean;
1725
1794
  orderId: string | null;
1726
- transactionHash: any;
1727
- blockNumber: any;
1728
- gasUsed: any;
1795
+ transactionHash: string;
1796
+ blockNumber: number | undefined;
1797
+ gasUsed: string | undefined;
1729
1798
  status: string;
1730
1799
  confirmations: number;
1731
1800
  timestamp: number;
1732
- receipt: any;
1801
+ receipt: ethers$1.ContractTransactionReceipt | null;
1733
1802
  };
1734
1803
  } | {
1735
1804
  code: number;
@@ -1751,13 +1820,13 @@ declare class Order {
1751
1820
  code: number;
1752
1821
  message: string;
1753
1822
  data: string | null;
1754
- transactionHash: any;
1755
- blockNumber: any;
1756
- gasUsed: any;
1823
+ transactionHash: string;
1824
+ blockNumber: number | undefined;
1825
+ gasUsed: string | undefined;
1757
1826
  status: string;
1758
1827
  confirmations: number;
1759
1828
  timestamp: number;
1760
- receipt: any;
1829
+ receipt: ethers$1.ContractTransactionReceipt | null;
1761
1830
  } | {
1762
1831
  code: number;
1763
1832
  message: any;
@@ -1780,13 +1849,13 @@ declare class Order {
1780
1849
  data: {
1781
1850
  success: boolean;
1782
1851
  orderId: string | null;
1783
- transactionHash: any;
1784
- blockNumber: any;
1785
- gasUsed: any;
1852
+ transactionHash: string;
1853
+ blockNumber: number | undefined;
1854
+ gasUsed: string | undefined;
1786
1855
  status: string;
1787
1856
  confirmations: number;
1788
1857
  timestamp: number;
1789
- receipt: any;
1858
+ receipt: ethers$1.ContractTransactionReceipt | null;
1790
1859
  };
1791
1860
  } | {
1792
1861
  code: number;
@@ -1803,13 +1872,13 @@ declare class Order {
1803
1872
  data: {
1804
1873
  success: boolean;
1805
1874
  orderId: string | null;
1806
- transactionHash: any;
1807
- blockNumber: any;
1808
- gasUsed: any;
1875
+ transactionHash: string;
1876
+ blockNumber: number | undefined;
1877
+ gasUsed: string | undefined;
1809
1878
  status: string;
1810
1879
  confirmations: number;
1811
1880
  timestamp: number;
1812
- receipt: any;
1881
+ receipt: ethers$1.ContractTransactionReceipt | null;
1813
1882
  };
1814
1883
  } | {
1815
1884
  code: number;
@@ -1835,7 +1904,7 @@ declare class Order {
1835
1904
  }>;
1836
1905
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
1837
1906
  code: number;
1838
- data: any;
1907
+ data: ethers$1.ContractTransactionReceipt | null;
1839
1908
  message: string;
1840
1909
  } | {
1841
1910
  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';
@@ -48,49 +49,49 @@ interface CancelTpSLParams {
48
49
  orderId: string;
49
50
  }
50
51
 
51
- declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
52
+ declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
52
53
 
53
- declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
54
- 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[]>;
55
56
  declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
56
57
  quotePool: {
57
- poolToken: any;
58
- exchangeRate: any;
59
- poolTokenPrice: any;
60
- poolTokenSupply: any;
58
+ poolToken: string;
59
+ exchangeRate: bigint;
60
+ poolTokenPrice: bigint;
61
+ poolTokenSupply: bigint;
61
62
  };
62
63
  basePool: {
63
- poolToken: any;
64
- exchangeRate: any;
65
- poolTokenPrice: any;
66
- poolTokenSupply: any;
64
+ poolToken: string;
65
+ exchangeRate: bigint;
66
+ poolTokenPrice: bigint;
67
+ poolTokenSupply: bigint;
67
68
  };
68
69
  reserveInfo: {
69
- baseTotalAmount: any;
70
- baseReservedAmount: any;
71
- quoteTotalAmount: any;
72
- quoteReservedAmount: any;
70
+ baseTotalAmount: bigint;
71
+ baseReservedAmount: bigint;
72
+ quoteTotalAmount: bigint;
73
+ quoteReservedAmount: bigint;
73
74
  };
74
75
  fundingInfo: {
75
- nextFundingRate: any;
76
- lastFundingFeeTracker: any;
77
- nextEpochTime: any;
76
+ nextFundingRate: bigint;
77
+ lastFundingFeeTracker: bigint;
78
+ nextEpochTime: bigint;
78
79
  };
79
80
  ioTracker: {
80
- tracker: any;
81
- longSize: any;
82
- shortSize: any;
83
- poolEntryPrice: any;
81
+ tracker: bigint;
82
+ longSize: bigint;
83
+ shortSize: bigint;
84
+ poolEntryPrice: bigint;
84
85
  };
85
86
  }>;
86
87
 
87
- declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
88
+ declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
88
89
 
89
- declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
90
+ declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
90
91
 
91
- declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
92
+ declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
92
93
 
93
- 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>;
94
95
 
95
96
  /**
96
97
  * Trading related types and enums
@@ -915,21 +916,21 @@ interface PreviewWithdrawDataParams {
915
916
  amount: string | number;
916
917
  }
917
918
 
918
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
919
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
919
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
920
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
920
921
 
921
- declare const deposit$1: (params: Deposit) => Promise<any>;
922
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
922
923
 
923
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
924
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
924
925
 
925
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
926
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
926
927
 
927
928
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
928
- baseAmountOut: any;
929
- rebateAmount: any;
929
+ baseAmountOut: bigint;
930
+ rebateAmount: bigint;
930
931
  } | undefined>;
931
932
 
932
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
933
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
933
934
 
934
935
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
935
936
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -938,18 +939,18 @@ declare namespace index$2 {
938
939
  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 };
939
940
  }
940
941
 
941
- declare const deposit: (params: Deposit) => Promise<any>;
942
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
942
943
 
943
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
944
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
944
945
 
945
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
946
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
946
947
 
947
- declare const getRewards: (params: RewardsParams) => Promise<any>;
948
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
948
949
 
949
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
950
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
950
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
951
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
951
952
 
952
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
953
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
953
954
 
954
955
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
955
956
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -962,9 +963,16 @@ declare namespace index$1 {
962
963
  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 };
963
964
  }
964
965
 
965
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
966
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
967
+ quoteToken: string;
968
+ baseReserveRatio: bigint;
969
+ quoteReserveRatio: bigint;
970
+ oracleFeeUsd: bigint;
971
+ oracleRefundFeeUsd: bigint;
972
+ poolPrimeThreshold: bigint;
973
+ }) | undefined>;
966
974
 
967
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
975
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
968
976
 
969
977
  declare const index_getMarket: typeof getMarket;
970
978
  declare const index_getOracleFee: typeof getOracleFee;
@@ -1007,9 +1015,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
1007
1015
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
1008
1016
  balance?: number | undefined;
1009
1017
  address: string;
1010
- name: any;
1011
- symbol: any;
1012
- decimals: any;
1018
+ name: string;
1019
+ symbol: string;
1020
+ decimals: bigint;
1013
1021
  icon: string;
1014
1022
  totalSupply: number;
1015
1023
  }>;
@@ -1223,7 +1231,7 @@ interface MyxClientConfig {
1223
1231
  signer?: Signer;
1224
1232
  seamlessAccount?: {
1225
1233
  masterAddress: string;
1226
- wallet: ethers.Wallet | null;
1234
+ wallet: ethers$1.Wallet | null;
1227
1235
  authorized: boolean;
1228
1236
  };
1229
1237
  walletClient?: WalletClient;
@@ -1243,7 +1251,7 @@ declare class ConfigManager {
1243
1251
  clear(): void;
1244
1252
  startSeamlessMode(open: boolean): MyxClientConfig;
1245
1253
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1246
- wallet?: ethers.Wallet;
1254
+ wallet?: ethers$1.Wallet;
1247
1255
  authorized?: boolean;
1248
1256
  masterAddress?: string;
1249
1257
  }): void;
@@ -1351,7 +1359,7 @@ declare class Utils {
1351
1359
  quoteAddress: string;
1352
1360
  amount?: string;
1353
1361
  spenderAddress?: string;
1354
- signer?: ethers.Signer;
1362
+ signer?: ethers$1.Signer;
1355
1363
  }): Promise<{
1356
1364
  code: number;
1357
1365
  message: any;
@@ -1394,7 +1402,68 @@ declare class Utils {
1394
1402
  marketPrice: string;
1395
1403
  }): Promise<{
1396
1404
  code: number;
1397
- data: any;
1405
+ data: [[string, bigint, bigint, bigint] & {
1406
+ poolToken: string;
1407
+ exchangeRate: bigint;
1408
+ poolTokenPrice: bigint;
1409
+ poolTokenSupply: bigint;
1410
+ }, [string, bigint, bigint, bigint] & {
1411
+ poolToken: string;
1412
+ exchangeRate: bigint;
1413
+ poolTokenPrice: bigint;
1414
+ poolTokenSupply: bigint;
1415
+ }, [bigint, bigint, bigint, bigint] & {
1416
+ baseTotalAmount: bigint;
1417
+ baseReservedAmount: bigint;
1418
+ quoteTotalAmount: bigint;
1419
+ quoteReservedAmount: bigint;
1420
+ }, [bigint, bigint, bigint] & {
1421
+ nextFundingRate: bigint;
1422
+ lastFundingFeeTracker: bigint;
1423
+ nextEpochTime: bigint;
1424
+ }, [bigint, bigint, bigint, bigint] & {
1425
+ tracker: bigint;
1426
+ longSize: bigint;
1427
+ shortSize: bigint;
1428
+ poolEntryPrice: bigint;
1429
+ }, [bigint, bigint] & {
1430
+ windowCaps: bigint;
1431
+ openInterest: bigint;
1432
+ }] & {
1433
+ basePool: [string, bigint, bigint, bigint] & {
1434
+ poolToken: string;
1435
+ exchangeRate: bigint;
1436
+ poolTokenPrice: bigint;
1437
+ poolTokenSupply: bigint;
1438
+ };
1439
+ quotePool: [string, bigint, bigint, bigint] & {
1440
+ poolToken: string;
1441
+ exchangeRate: bigint;
1442
+ poolTokenPrice: bigint;
1443
+ poolTokenSupply: bigint;
1444
+ };
1445
+ reserveInfo: [bigint, bigint, bigint, bigint] & {
1446
+ baseTotalAmount: bigint;
1447
+ baseReservedAmount: bigint;
1448
+ quoteTotalAmount: bigint;
1449
+ quoteReservedAmount: bigint;
1450
+ };
1451
+ fundingInfo: [bigint, bigint, bigint] & {
1452
+ nextFundingRate: bigint;
1453
+ lastFundingFeeTracker: bigint;
1454
+ nextEpochTime: bigint;
1455
+ };
1456
+ oi: [bigint, bigint, bigint, bigint] & {
1457
+ tracker: bigint;
1458
+ longSize: bigint;
1459
+ shortSize: bigint;
1460
+ poolEntryPrice: bigint;
1461
+ };
1462
+ liquidityInfo: [bigint, bigint] & {
1463
+ windowCaps: bigint;
1464
+ openInterest: bigint;
1465
+ };
1466
+ };
1398
1467
  message?: undefined;
1399
1468
  } | {
1400
1469
  code: number;
@@ -1552,9 +1621,9 @@ declare class Seamless {
1552
1621
  private utils;
1553
1622
  private account;
1554
1623
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1555
- onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
1624
+ onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
1556
1625
  getUSDPermitParams(deadline: number, chainId: number): Promise<{
1557
- token: string | ethers.Addressable;
1626
+ token: string | ethers$1.Addressable;
1558
1627
  owner: string;
1559
1628
  spender: string;
1560
1629
  value: bigint;
@@ -1571,7 +1640,7 @@ declare class Seamless {
1571
1640
  deadline: number;
1572
1641
  data: string;
1573
1642
  nonce: string;
1574
- }, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1643
+ }, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1575
1644
  authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
1576
1645
  approve: boolean;
1577
1646
  seamlessAddress: string;
@@ -1593,7 +1662,7 @@ declare class Seamless {
1593
1662
  data: {
1594
1663
  masterAddress: string;
1595
1664
  seamlessAccount: string;
1596
- authorized: any;
1665
+ authorized: boolean;
1597
1666
  };
1598
1667
  }>;
1599
1668
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1612,9 +1681,9 @@ declare class Seamless {
1612
1681
  }): Promise<{
1613
1682
  code: number;
1614
1683
  data: {
1615
- masterAddress: any;
1684
+ masterAddress: string;
1616
1685
  seamlessAccount: string;
1617
- authorized: any;
1686
+ authorized: boolean;
1618
1687
  apiKey: string;
1619
1688
  };
1620
1689
  }>;
@@ -1634,7 +1703,7 @@ declare class Seamless {
1634
1703
  data: {
1635
1704
  masterAddress: string;
1636
1705
  seamlessAccount: string;
1637
- authorized: any;
1706
+ authorized: boolean;
1638
1707
  apiKey: string;
1639
1708
  };
1640
1709
  message?: undefined;
@@ -1723,13 +1792,13 @@ declare class Order {
1723
1792
  data: {
1724
1793
  success: boolean;
1725
1794
  orderId: string | null;
1726
- transactionHash: any;
1727
- blockNumber: any;
1728
- gasUsed: any;
1795
+ transactionHash: string;
1796
+ blockNumber: number | undefined;
1797
+ gasUsed: string | undefined;
1729
1798
  status: string;
1730
1799
  confirmations: number;
1731
1800
  timestamp: number;
1732
- receipt: any;
1801
+ receipt: ethers$1.ContractTransactionReceipt | null;
1733
1802
  };
1734
1803
  } | {
1735
1804
  code: number;
@@ -1751,13 +1820,13 @@ declare class Order {
1751
1820
  code: number;
1752
1821
  message: string;
1753
1822
  data: string | null;
1754
- transactionHash: any;
1755
- blockNumber: any;
1756
- gasUsed: any;
1823
+ transactionHash: string;
1824
+ blockNumber: number | undefined;
1825
+ gasUsed: string | undefined;
1757
1826
  status: string;
1758
1827
  confirmations: number;
1759
1828
  timestamp: number;
1760
- receipt: any;
1829
+ receipt: ethers$1.ContractTransactionReceipt | null;
1761
1830
  } | {
1762
1831
  code: number;
1763
1832
  message: any;
@@ -1780,13 +1849,13 @@ declare class Order {
1780
1849
  data: {
1781
1850
  success: boolean;
1782
1851
  orderId: string | null;
1783
- transactionHash: any;
1784
- blockNumber: any;
1785
- gasUsed: any;
1852
+ transactionHash: string;
1853
+ blockNumber: number | undefined;
1854
+ gasUsed: string | undefined;
1786
1855
  status: string;
1787
1856
  confirmations: number;
1788
1857
  timestamp: number;
1789
- receipt: any;
1858
+ receipt: ethers$1.ContractTransactionReceipt | null;
1790
1859
  };
1791
1860
  } | {
1792
1861
  code: number;
@@ -1803,13 +1872,13 @@ declare class Order {
1803
1872
  data: {
1804
1873
  success: boolean;
1805
1874
  orderId: string | null;
1806
- transactionHash: any;
1807
- blockNumber: any;
1808
- gasUsed: any;
1875
+ transactionHash: string;
1876
+ blockNumber: number | undefined;
1877
+ gasUsed: string | undefined;
1809
1878
  status: string;
1810
1879
  confirmations: number;
1811
1880
  timestamp: number;
1812
- receipt: any;
1881
+ receipt: ethers$1.ContractTransactionReceipt | null;
1813
1882
  };
1814
1883
  } | {
1815
1884
  code: number;
@@ -1835,7 +1904,7 @@ declare class Order {
1835
1904
  }>;
1836
1905
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
1837
1906
  code: number;
1838
- data: any;
1907
+ data: ethers$1.ContractTransactionReceipt | null;
1839
1908
  message: string;
1840
1909
  } | {
1841
1910
  code: number;
package/dist/index.js CHANGED
@@ -1824,7 +1824,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1824
1824
  // package.json
1825
1825
  var package_default = {
1826
1826
  name: "@myx-trade/sdk",
1827
- version: "0.1.179",
1827
+ version: "0.1.182",
1828
1828
  private: false,
1829
1829
  publishConfig: {
1830
1830
  access: "public"
@@ -12279,7 +12279,7 @@ var withdraw = async (params) => {
12279
12279
  try {
12280
12280
  const { chainId, poolId, amount, slippage = 0.01 } = params;
12281
12281
  const pool = await getPoolInfo(chainId, poolId);
12282
- const lpAddress = pool?.quotePoolToken;
12282
+ const lpAddress = pool?.basePoolToken;
12283
12283
  const chainInfo = CHAIN_INFO[chainId];
12284
12284
  const account = await getAccount(chainId);
12285
12285
  const decimals = COMMON_LP_AMOUNT_DECIMALS;
package/dist/index.mjs CHANGED
@@ -1731,7 +1731,7 @@ var RotationProvider = class extends BaseProvider {
1731
1731
  // package.json
1732
1732
  var package_default = {
1733
1733
  name: "@myx-trade/sdk",
1734
- version: "0.1.179",
1734
+ version: "0.1.182",
1735
1735
  private: false,
1736
1736
  publishConfig: {
1737
1737
  access: "public"
@@ -12186,7 +12186,7 @@ var withdraw = async (params) => {
12186
12186
  try {
12187
12187
  const { chainId, poolId, amount, slippage = 0.01 } = params;
12188
12188
  const pool = await getPoolInfo(chainId, poolId);
12189
- const lpAddress = pool?.quotePoolToken;
12189
+ const lpAddress = pool?.basePoolToken;
12190
12190
  const chainInfo = CHAIN_INFO[chainId];
12191
12191
  const account = await getAccount(chainId);
12192
12192
  const decimals = COMMON_LP_AMOUNT_DECIMALS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.179",
3
+ "version": "0.1.182",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"