@myx-trade/sdk 0.1.159 → 0.1.162

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
@@ -887,21 +888,21 @@ interface PreviewWithdrawDataParams {
887
888
  amount: string | number;
888
889
  }
889
890
 
890
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
891
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
891
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
892
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
892
893
 
893
- declare const deposit$1: (params: Deposit) => Promise<any>;
894
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
894
895
 
895
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
896
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
896
897
 
897
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
898
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
898
899
 
899
900
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
900
- baseAmountOut: any;
901
- rebateAmount: any;
901
+ baseAmountOut: bigint;
902
+ rebateAmount: bigint;
902
903
  } | undefined>;
903
904
 
904
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
905
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
905
906
 
906
907
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
907
908
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -910,18 +911,18 @@ declare namespace index$2 {
910
911
  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 };
911
912
  }
912
913
 
913
- declare const deposit: (params: Deposit) => Promise<any>;
914
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
914
915
 
915
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
916
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
916
917
 
917
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
918
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
918
919
 
919
- declare const getRewards: (params: RewardsParams) => Promise<any>;
920
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
920
921
 
921
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
922
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
922
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
923
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
923
924
 
924
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
925
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
925
926
 
926
927
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
927
928
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -934,9 +935,16 @@ declare namespace index$1 {
934
935
  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 };
935
936
  }
936
937
 
937
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
938
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
939
+ quoteToken: string;
940
+ baseReserveRatio: bigint;
941
+ quoteReserveRatio: bigint;
942
+ oracleFeeUsd: bigint;
943
+ oracleRefundFeeUsd: bigint;
944
+ poolPrimeThreshold: bigint;
945
+ }) | undefined>;
938
946
 
939
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
947
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
940
948
 
941
949
  declare const index_getMarket: typeof getMarket;
942
950
  declare const index_getOracleFee: typeof getOracleFee;
@@ -979,9 +987,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
979
987
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
980
988
  balance?: number | undefined;
981
989
  address: string;
982
- name: any;
983
- symbol: any;
984
- decimals: any;
990
+ name: string;
991
+ symbol: string;
992
+ decimals: bigint;
985
993
  icon: string;
986
994
  totalSupply: number;
987
995
  }>;
@@ -1195,7 +1203,7 @@ interface MyxClientConfig {
1195
1203
  signer?: Signer;
1196
1204
  seamlessAccount?: {
1197
1205
  masterAddress: string;
1198
- wallet: ethers.Wallet | null;
1206
+ wallet: ethers$1.Wallet | null;
1199
1207
  authorized: boolean;
1200
1208
  };
1201
1209
  walletClient?: WalletClient;
@@ -1215,7 +1223,7 @@ declare class ConfigManager {
1215
1223
  clear(): void;
1216
1224
  startSeamlessMode(open: boolean): MyxClientConfig;
1217
1225
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1218
- wallet?: ethers.Wallet;
1226
+ wallet?: ethers$1.Wallet;
1219
1227
  authorized?: boolean;
1220
1228
  masterAddress?: string;
1221
1229
  }): void;
@@ -1323,7 +1331,7 @@ declare class Utils {
1323
1331
  quoteAddress: string;
1324
1332
  amount?: string;
1325
1333
  spenderAddress?: string;
1326
- signer?: ethers.Signer;
1334
+ signer?: ethers$1.Signer;
1327
1335
  }): Promise<{
1328
1336
  code: number;
1329
1337
  message: any;
@@ -1366,7 +1374,68 @@ declare class Utils {
1366
1374
  marketPrice: string;
1367
1375
  }): Promise<{
1368
1376
  code: number;
1369
- data: any;
1377
+ data: [[string, bigint, bigint, bigint] & {
1378
+ poolToken: string;
1379
+ exchangeRate: bigint;
1380
+ poolTokenPrice: bigint;
1381
+ poolTokenSupply: bigint;
1382
+ }, [string, bigint, bigint, bigint] & {
1383
+ poolToken: string;
1384
+ exchangeRate: bigint;
1385
+ poolTokenPrice: bigint;
1386
+ poolTokenSupply: bigint;
1387
+ }, [bigint, bigint, bigint, bigint] & {
1388
+ baseTotalAmount: bigint;
1389
+ baseReservedAmount: bigint;
1390
+ quoteTotalAmount: bigint;
1391
+ quoteReservedAmount: bigint;
1392
+ }, [bigint, bigint, bigint] & {
1393
+ nextFundingRate: bigint;
1394
+ lastFundingFeeTracker: bigint;
1395
+ nextEpochTime: bigint;
1396
+ }, [bigint, bigint, bigint, bigint] & {
1397
+ tracker: bigint;
1398
+ longSize: bigint;
1399
+ shortSize: bigint;
1400
+ poolEntryPrice: bigint;
1401
+ }, [bigint, bigint] & {
1402
+ windowCaps: bigint;
1403
+ openInterest: bigint;
1404
+ }] & {
1405
+ basePool: [string, bigint, bigint, bigint] & {
1406
+ poolToken: string;
1407
+ exchangeRate: bigint;
1408
+ poolTokenPrice: bigint;
1409
+ poolTokenSupply: bigint;
1410
+ };
1411
+ quotePool: [string, bigint, bigint, bigint] & {
1412
+ poolToken: string;
1413
+ exchangeRate: bigint;
1414
+ poolTokenPrice: bigint;
1415
+ poolTokenSupply: bigint;
1416
+ };
1417
+ reserveInfo: [bigint, bigint, bigint, bigint] & {
1418
+ baseTotalAmount: bigint;
1419
+ baseReservedAmount: bigint;
1420
+ quoteTotalAmount: bigint;
1421
+ quoteReservedAmount: bigint;
1422
+ };
1423
+ fundingInfo: [bigint, bigint, bigint] & {
1424
+ nextFundingRate: bigint;
1425
+ lastFundingFeeTracker: bigint;
1426
+ nextEpochTime: bigint;
1427
+ };
1428
+ oi: [bigint, bigint, bigint, bigint] & {
1429
+ tracker: bigint;
1430
+ longSize: bigint;
1431
+ shortSize: bigint;
1432
+ poolEntryPrice: bigint;
1433
+ };
1434
+ liquidityInfo: [bigint, bigint] & {
1435
+ windowCaps: bigint;
1436
+ openInterest: bigint;
1437
+ };
1438
+ };
1370
1439
  message?: undefined;
1371
1440
  } | {
1372
1441
  code: number;
@@ -1520,9 +1589,9 @@ declare class Seamless {
1520
1589
  private utils;
1521
1590
  private account;
1522
1591
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1523
- onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
1592
+ onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
1524
1593
  getUSDPermitParams(deadline: number, chainId: number): Promise<{
1525
- token: string | ethers.Addressable;
1594
+ token: string | ethers$1.Addressable;
1526
1595
  owner: string;
1527
1596
  spender: string;
1528
1597
  value: bigint;
@@ -1539,7 +1608,7 @@ declare class Seamless {
1539
1608
  deadline: number;
1540
1609
  data: string;
1541
1610
  nonce: string;
1542
- }, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1611
+ }, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1543
1612
  authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
1544
1613
  approve: boolean;
1545
1614
  seamlessAddress: string;
@@ -1561,7 +1630,7 @@ declare class Seamless {
1561
1630
  data: {
1562
1631
  masterAddress: string;
1563
1632
  seamlessAccount: string;
1564
- authorized: any;
1633
+ authorized: boolean;
1565
1634
  };
1566
1635
  }>;
1567
1636
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1580,9 +1649,9 @@ declare class Seamless {
1580
1649
  }): Promise<{
1581
1650
  code: number;
1582
1651
  data: {
1583
- masterAddress: any;
1652
+ masterAddress: string;
1584
1653
  seamlessAccount: string;
1585
- authorized: any;
1654
+ authorized: boolean;
1586
1655
  apiKey: string;
1587
1656
  };
1588
1657
  }>;
@@ -1602,7 +1671,7 @@ declare class Seamless {
1602
1671
  data: {
1603
1672
  masterAddress: string;
1604
1673
  seamlessAccount: string;
1605
- authorized: any;
1674
+ authorized: boolean;
1606
1675
  apiKey: string;
1607
1676
  };
1608
1677
  message?: undefined;
@@ -1689,13 +1758,13 @@ declare class Order {
1689
1758
  data: {
1690
1759
  success: boolean;
1691
1760
  orderId: string | null;
1692
- transactionHash: any;
1693
- blockNumber: any;
1694
- gasUsed: any;
1761
+ transactionHash: string;
1762
+ blockNumber: number | undefined;
1763
+ gasUsed: string | undefined;
1695
1764
  status: string;
1696
1765
  confirmations: number;
1697
1766
  timestamp: number;
1698
- receipt: any;
1767
+ receipt: ethers$1.ContractTransactionReceipt | null;
1699
1768
  };
1700
1769
  } | {
1701
1770
  code: number;
@@ -1717,13 +1786,13 @@ declare class Order {
1717
1786
  code: number;
1718
1787
  message: string;
1719
1788
  data: string | null;
1720
- transactionHash: any;
1721
- blockNumber: any;
1722
- gasUsed: any;
1789
+ transactionHash: string;
1790
+ blockNumber: number | undefined;
1791
+ gasUsed: string | undefined;
1723
1792
  status: string;
1724
1793
  confirmations: number;
1725
1794
  timestamp: number;
1726
- receipt: any;
1795
+ receipt: ethers$1.ContractTransactionReceipt | null;
1727
1796
  } | {
1728
1797
  code: number;
1729
1798
  message: any;
@@ -1746,13 +1815,13 @@ declare class Order {
1746
1815
  data: {
1747
1816
  success: boolean;
1748
1817
  orderId: string | null;
1749
- transactionHash: any;
1750
- blockNumber: any;
1751
- gasUsed: any;
1818
+ transactionHash: string;
1819
+ blockNumber: number | undefined;
1820
+ gasUsed: string | undefined;
1752
1821
  status: string;
1753
1822
  confirmations: number;
1754
1823
  timestamp: number;
1755
- receipt: any;
1824
+ receipt: ethers$1.ContractTransactionReceipt | null;
1756
1825
  };
1757
1826
  } | {
1758
1827
  code: number;
@@ -1769,13 +1838,13 @@ declare class Order {
1769
1838
  data: {
1770
1839
  success: boolean;
1771
1840
  orderId: string | null;
1772
- transactionHash: any;
1773
- blockNumber: any;
1774
- gasUsed: any;
1841
+ transactionHash: string;
1842
+ blockNumber: number | undefined;
1843
+ gasUsed: string | undefined;
1775
1844
  status: string;
1776
1845
  confirmations: number;
1777
1846
  timestamp: number;
1778
- receipt: any;
1847
+ receipt: ethers$1.ContractTransactionReceipt | null;
1779
1848
  };
1780
1849
  } | {
1781
1850
  code: number;
@@ -1801,7 +1870,7 @@ declare class Order {
1801
1870
  }>;
1802
1871
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
1803
1872
  code: number;
1804
- data: any;
1873
+ data: ethers$1.ContractTransactionReceipt | null;
1805
1874
  message: string;
1806
1875
  } | {
1807
1876
  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
@@ -887,21 +888,21 @@ interface PreviewWithdrawDataParams {
887
888
  amount: string | number;
888
889
  }
889
890
 
890
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
891
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
891
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
892
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
892
893
 
893
- declare const deposit$1: (params: Deposit) => Promise<any>;
894
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
894
895
 
895
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
896
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
896
897
 
897
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
898
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
898
899
 
899
900
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
900
- baseAmountOut: any;
901
- rebateAmount: any;
901
+ baseAmountOut: bigint;
902
+ rebateAmount: bigint;
902
903
  } | undefined>;
903
904
 
904
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
905
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
905
906
 
906
907
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
907
908
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -910,18 +911,18 @@ declare namespace index$2 {
910
911
  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 };
911
912
  }
912
913
 
913
- declare const deposit: (params: Deposit) => Promise<any>;
914
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
914
915
 
915
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
916
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
916
917
 
917
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
918
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
918
919
 
919
- declare const getRewards: (params: RewardsParams) => Promise<any>;
920
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
920
921
 
921
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
922
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
922
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
923
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
923
924
 
924
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
925
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
925
926
 
926
927
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
927
928
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -934,9 +935,16 @@ declare namespace index$1 {
934
935
  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 };
935
936
  }
936
937
 
937
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
938
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
939
+ quoteToken: string;
940
+ baseReserveRatio: bigint;
941
+ quoteReserveRatio: bigint;
942
+ oracleFeeUsd: bigint;
943
+ oracleRefundFeeUsd: bigint;
944
+ poolPrimeThreshold: bigint;
945
+ }) | undefined>;
938
946
 
939
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
947
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
940
948
 
941
949
  declare const index_getMarket: typeof getMarket;
942
950
  declare const index_getOracleFee: typeof getOracleFee;
@@ -979,9 +987,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
979
987
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
980
988
  balance?: number | undefined;
981
989
  address: string;
982
- name: any;
983
- symbol: any;
984
- decimals: any;
990
+ name: string;
991
+ symbol: string;
992
+ decimals: bigint;
985
993
  icon: string;
986
994
  totalSupply: number;
987
995
  }>;
@@ -1195,7 +1203,7 @@ interface MyxClientConfig {
1195
1203
  signer?: Signer;
1196
1204
  seamlessAccount?: {
1197
1205
  masterAddress: string;
1198
- wallet: ethers.Wallet | null;
1206
+ wallet: ethers$1.Wallet | null;
1199
1207
  authorized: boolean;
1200
1208
  };
1201
1209
  walletClient?: WalletClient;
@@ -1215,7 +1223,7 @@ declare class ConfigManager {
1215
1223
  clear(): void;
1216
1224
  startSeamlessMode(open: boolean): MyxClientConfig;
1217
1225
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1218
- wallet?: ethers.Wallet;
1226
+ wallet?: ethers$1.Wallet;
1219
1227
  authorized?: boolean;
1220
1228
  masterAddress?: string;
1221
1229
  }): void;
@@ -1323,7 +1331,7 @@ declare class Utils {
1323
1331
  quoteAddress: string;
1324
1332
  amount?: string;
1325
1333
  spenderAddress?: string;
1326
- signer?: ethers.Signer;
1334
+ signer?: ethers$1.Signer;
1327
1335
  }): Promise<{
1328
1336
  code: number;
1329
1337
  message: any;
@@ -1366,7 +1374,68 @@ declare class Utils {
1366
1374
  marketPrice: string;
1367
1375
  }): Promise<{
1368
1376
  code: number;
1369
- data: any;
1377
+ data: [[string, bigint, bigint, bigint] & {
1378
+ poolToken: string;
1379
+ exchangeRate: bigint;
1380
+ poolTokenPrice: bigint;
1381
+ poolTokenSupply: bigint;
1382
+ }, [string, bigint, bigint, bigint] & {
1383
+ poolToken: string;
1384
+ exchangeRate: bigint;
1385
+ poolTokenPrice: bigint;
1386
+ poolTokenSupply: bigint;
1387
+ }, [bigint, bigint, bigint, bigint] & {
1388
+ baseTotalAmount: bigint;
1389
+ baseReservedAmount: bigint;
1390
+ quoteTotalAmount: bigint;
1391
+ quoteReservedAmount: bigint;
1392
+ }, [bigint, bigint, bigint] & {
1393
+ nextFundingRate: bigint;
1394
+ lastFundingFeeTracker: bigint;
1395
+ nextEpochTime: bigint;
1396
+ }, [bigint, bigint, bigint, bigint] & {
1397
+ tracker: bigint;
1398
+ longSize: bigint;
1399
+ shortSize: bigint;
1400
+ poolEntryPrice: bigint;
1401
+ }, [bigint, bigint] & {
1402
+ windowCaps: bigint;
1403
+ openInterest: bigint;
1404
+ }] & {
1405
+ basePool: [string, bigint, bigint, bigint] & {
1406
+ poolToken: string;
1407
+ exchangeRate: bigint;
1408
+ poolTokenPrice: bigint;
1409
+ poolTokenSupply: bigint;
1410
+ };
1411
+ quotePool: [string, bigint, bigint, bigint] & {
1412
+ poolToken: string;
1413
+ exchangeRate: bigint;
1414
+ poolTokenPrice: bigint;
1415
+ poolTokenSupply: bigint;
1416
+ };
1417
+ reserveInfo: [bigint, bigint, bigint, bigint] & {
1418
+ baseTotalAmount: bigint;
1419
+ baseReservedAmount: bigint;
1420
+ quoteTotalAmount: bigint;
1421
+ quoteReservedAmount: bigint;
1422
+ };
1423
+ fundingInfo: [bigint, bigint, bigint] & {
1424
+ nextFundingRate: bigint;
1425
+ lastFundingFeeTracker: bigint;
1426
+ nextEpochTime: bigint;
1427
+ };
1428
+ oi: [bigint, bigint, bigint, bigint] & {
1429
+ tracker: bigint;
1430
+ longSize: bigint;
1431
+ shortSize: bigint;
1432
+ poolEntryPrice: bigint;
1433
+ };
1434
+ liquidityInfo: [bigint, bigint] & {
1435
+ windowCaps: bigint;
1436
+ openInterest: bigint;
1437
+ };
1438
+ };
1370
1439
  message?: undefined;
1371
1440
  } | {
1372
1441
  code: number;
@@ -1520,9 +1589,9 @@ declare class Seamless {
1520
1589
  private utils;
1521
1590
  private account;
1522
1591
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1523
- onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
1592
+ onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
1524
1593
  getUSDPermitParams(deadline: number, chainId: number): Promise<{
1525
- token: string | ethers.Addressable;
1594
+ token: string | ethers$1.Addressable;
1526
1595
  owner: string;
1527
1596
  spender: string;
1528
1597
  value: bigint;
@@ -1539,7 +1608,7 @@ declare class Seamless {
1539
1608
  deadline: number;
1540
1609
  data: string;
1541
1610
  nonce: string;
1542
- }, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1611
+ }, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1543
1612
  authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
1544
1613
  approve: boolean;
1545
1614
  seamlessAddress: string;
@@ -1561,7 +1630,7 @@ declare class Seamless {
1561
1630
  data: {
1562
1631
  masterAddress: string;
1563
1632
  seamlessAccount: string;
1564
- authorized: any;
1633
+ authorized: boolean;
1565
1634
  };
1566
1635
  }>;
1567
1636
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1580,9 +1649,9 @@ declare class Seamless {
1580
1649
  }): Promise<{
1581
1650
  code: number;
1582
1651
  data: {
1583
- masterAddress: any;
1652
+ masterAddress: string;
1584
1653
  seamlessAccount: string;
1585
- authorized: any;
1654
+ authorized: boolean;
1586
1655
  apiKey: string;
1587
1656
  };
1588
1657
  }>;
@@ -1602,7 +1671,7 @@ declare class Seamless {
1602
1671
  data: {
1603
1672
  masterAddress: string;
1604
1673
  seamlessAccount: string;
1605
- authorized: any;
1674
+ authorized: boolean;
1606
1675
  apiKey: string;
1607
1676
  };
1608
1677
  message?: undefined;
@@ -1689,13 +1758,13 @@ declare class Order {
1689
1758
  data: {
1690
1759
  success: boolean;
1691
1760
  orderId: string | null;
1692
- transactionHash: any;
1693
- blockNumber: any;
1694
- gasUsed: any;
1761
+ transactionHash: string;
1762
+ blockNumber: number | undefined;
1763
+ gasUsed: string | undefined;
1695
1764
  status: string;
1696
1765
  confirmations: number;
1697
1766
  timestamp: number;
1698
- receipt: any;
1767
+ receipt: ethers$1.ContractTransactionReceipt | null;
1699
1768
  };
1700
1769
  } | {
1701
1770
  code: number;
@@ -1717,13 +1786,13 @@ declare class Order {
1717
1786
  code: number;
1718
1787
  message: string;
1719
1788
  data: string | null;
1720
- transactionHash: any;
1721
- blockNumber: any;
1722
- gasUsed: any;
1789
+ transactionHash: string;
1790
+ blockNumber: number | undefined;
1791
+ gasUsed: string | undefined;
1723
1792
  status: string;
1724
1793
  confirmations: number;
1725
1794
  timestamp: number;
1726
- receipt: any;
1795
+ receipt: ethers$1.ContractTransactionReceipt | null;
1727
1796
  } | {
1728
1797
  code: number;
1729
1798
  message: any;
@@ -1746,13 +1815,13 @@ declare class Order {
1746
1815
  data: {
1747
1816
  success: boolean;
1748
1817
  orderId: string | null;
1749
- transactionHash: any;
1750
- blockNumber: any;
1751
- gasUsed: any;
1818
+ transactionHash: string;
1819
+ blockNumber: number | undefined;
1820
+ gasUsed: string | undefined;
1752
1821
  status: string;
1753
1822
  confirmations: number;
1754
1823
  timestamp: number;
1755
- receipt: any;
1824
+ receipt: ethers$1.ContractTransactionReceipt | null;
1756
1825
  };
1757
1826
  } | {
1758
1827
  code: number;
@@ -1769,13 +1838,13 @@ declare class Order {
1769
1838
  data: {
1770
1839
  success: boolean;
1771
1840
  orderId: string | null;
1772
- transactionHash: any;
1773
- blockNumber: any;
1774
- gasUsed: any;
1841
+ transactionHash: string;
1842
+ blockNumber: number | undefined;
1843
+ gasUsed: string | undefined;
1775
1844
  status: string;
1776
1845
  confirmations: number;
1777
1846
  timestamp: number;
1778
- receipt: any;
1847
+ receipt: ethers$1.ContractTransactionReceipt | null;
1779
1848
  };
1780
1849
  } | {
1781
1850
  code: number;
@@ -1801,7 +1870,7 @@ declare class Order {
1801
1870
  }>;
1802
1871
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
1803
1872
  code: number;
1804
- data: any;
1873
+ data: ethers$1.ContractTransactionReceipt | null;
1805
1874
  message: string;
1806
1875
  } | {
1807
1876
  code: number;
package/dist/index.js CHANGED
@@ -1821,7 +1821,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1821
1821
  // package.json
1822
1822
  var package_default = {
1823
1823
  name: "@myx-trade/sdk",
1824
- version: "0.1.159",
1824
+ version: "0.1.162",
1825
1825
  private: false,
1826
1826
  publishConfig: {
1827
1827
  access: "public"
@@ -21101,6 +21101,7 @@ var Account = class {
21101
21101
  const poolList = poolListRes.data;
21102
21102
  const pool = poolList?.find((pool2) => pool2.poolId === poolId);
21103
21103
  const orderRes = await this.client.order.getOrders();
21104
+ this.logger.info("orderRes-->", orderRes);
21104
21105
  if (orderRes.code !== 0) {
21105
21106
  throw new MyxSDKError(
21106
21107
  "REQUEST_FAILED" /* RequestFailed */,
@@ -21132,9 +21133,10 @@ var Account = class {
21132
21133
  const availableAccountMarginBalance = accountMargin - usedMargin;
21133
21134
  return availableAccountMarginBalance;
21134
21135
  } catch (error) {
21136
+ this.logger.info("getAvailableMarginBalance error-->", error);
21135
21137
  throw new MyxSDKError(
21136
21138
  "REQUEST_FAILED" /* RequestFailed */,
21137
- "Failed to get orders"
21139
+ "Failed to get getAvailableMarginBalance"
21138
21140
  );
21139
21141
  }
21140
21142
  }
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.159",
1734
+ version: "0.1.162",
1735
1735
  private: false,
1736
1736
  publishConfig: {
1737
1737
  access: "public"
@@ -21011,6 +21011,7 @@ var Account = class {
21011
21011
  const poolList = poolListRes.data;
21012
21012
  const pool = poolList?.find((pool2) => pool2.poolId === poolId);
21013
21013
  const orderRes = await this.client.order.getOrders();
21014
+ this.logger.info("orderRes-->", orderRes);
21014
21015
  if (orderRes.code !== 0) {
21015
21016
  throw new MyxSDKError(
21016
21017
  "REQUEST_FAILED" /* RequestFailed */,
@@ -21042,9 +21043,10 @@ var Account = class {
21042
21043
  const availableAccountMarginBalance = accountMargin - usedMargin;
21043
21044
  return availableAccountMarginBalance;
21044
21045
  } catch (error) {
21046
+ this.logger.info("getAvailableMarginBalance error-->", error);
21045
21047
  throw new MyxSDKError(
21046
21048
  "REQUEST_FAILED" /* RequestFailed */,
21047
- "Failed to get orders"
21049
+ "Failed to get getAvailableMarginBalance"
21048
21050
  );
21049
21051
  }
21050
21052
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.159",
3
+ "version": "0.1.162",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"