@myx-trade/sdk 0.1.94 → 0.1.95

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
@@ -569,17 +570,6 @@ declare enum OperationEnum {
569
570
  Increase = 0,
570
571
  Decrease = 1
571
572
  }
572
- declare enum TradeFlowTypeEnum {
573
- Increase = 0,
574
- Decrease = 1,
575
- AddMargin = 2,
576
- RemoveMargin = 3,
577
- CancelOrder = 4,
578
- ADL = 5,
579
- Liquidation = 6,
580
- MarketClose = 7,
581
- EarlyClose = 8
582
- }
583
573
  declare enum TriggerTypeEnum {
584
574
  Unknown = 0,
585
575
  GTE = 1,
@@ -685,7 +675,7 @@ interface TradeFlowItem {
685
675
  baseSymbol: string;
686
676
  quoteSymbol: string;
687
677
  executionFee: string;
688
- type: TradeFlowTypeEnum;
678
+ type: OperationEnum;
689
679
  }
690
680
  declare const getTradeFlow: ({ accessToken, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<TradeFlowItem[]>>;
691
681
 
@@ -879,21 +869,21 @@ interface PreviewWithdrawDataParams {
879
869
  amount: string | number;
880
870
  }
881
871
 
882
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
883
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
872
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
873
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
884
874
 
885
- declare const deposit$1: (params: Deposit) => Promise<any>;
875
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
886
876
 
887
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
877
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
888
878
 
889
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
879
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
890
880
 
891
881
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
892
- baseAmountOut: any;
893
- rebateAmount: any;
882
+ baseAmountOut: bigint;
883
+ rebateAmount: bigint;
894
884
  } | undefined>;
895
885
 
896
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
886
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
897
887
 
898
888
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
899
889
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -902,18 +892,18 @@ declare namespace index$2 {
902
892
  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 };
903
893
  }
904
894
 
905
- declare const deposit: (params: Deposit) => Promise<any>;
895
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
906
896
 
907
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
897
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
908
898
 
909
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
899
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
910
900
 
911
- declare const getRewards: (params: RewardsParams) => Promise<any>;
901
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
912
902
 
913
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
914
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
903
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
904
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
915
905
 
916
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
906
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
917
907
 
918
908
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
919
909
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -926,9 +916,17 @@ declare namespace index$1 {
926
916
  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 };
927
917
  }
928
918
 
929
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
919
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, string, bigint, bigint, bigint, bigint, bigint] & {
920
+ marketId: string;
921
+ quoteToken: string;
922
+ baseReserveRatio: bigint;
923
+ quoteReserveRatio: bigint;
924
+ oracleFeeUsd: bigint;
925
+ oracleRefundFeeUsd: bigint;
926
+ poolPrimeThreshold: bigint;
927
+ }) | undefined>;
930
928
 
931
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
929
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
932
930
 
933
931
  declare const index_getMarket: typeof getMarket;
934
932
  declare const index_getOracleFee: typeof getOracleFee;
@@ -971,9 +969,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
971
969
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
972
970
  balance?: number | undefined;
973
971
  address: string;
974
- name: any;
975
- symbol: any;
976
- decimals: any;
972
+ name: string;
973
+ symbol: string;
974
+ decimals: bigint;
977
975
  icon: string;
978
976
  totalSupply: number;
979
977
  }>;
@@ -1187,7 +1185,7 @@ interface MyxClientConfig {
1187
1185
  signer?: Signer;
1188
1186
  seamlessAccount?: {
1189
1187
  masterAddress: string;
1190
- wallet: ethers.Wallet | null;
1188
+ wallet: ethers$1.Wallet | null;
1191
1189
  authorized: boolean;
1192
1190
  };
1193
1191
  walletClient?: WalletClient;
@@ -1207,7 +1205,7 @@ declare class ConfigManager {
1207
1205
  clear(): void;
1208
1206
  startSeamlessMode(open: boolean): void;
1209
1207
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1210
- wallet?: ethers.Wallet;
1208
+ wallet?: ethers$1.Wallet;
1211
1209
  authorized?: boolean;
1212
1210
  masterAddress?: string;
1213
1211
  }): void;
@@ -1526,9 +1524,9 @@ declare class Seamless {
1526
1524
  private utils;
1527
1525
  private account;
1528
1526
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1529
- onCheckRelayer(account: string, relayer: string): Promise<any>;
1527
+ onCheckRelayer(account: string, relayer: string): Promise<boolean>;
1530
1528
  getUSDPermitParams(deadline: number): Promise<{
1531
- token: string | ethers.Addressable;
1529
+ token: string | ethers$1.Addressable;
1532
1530
  owner: Promise<string> | undefined;
1533
1531
  spender: string;
1534
1532
  value: bigint;
@@ -1545,7 +1543,7 @@ declare class Seamless {
1545
1543
  deadline: number;
1546
1544
  data: string;
1547
1545
  nonce: string;
1548
- }, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1546
+ }, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1549
1547
  authorizeSeamlessAccount({ approve, seamlessAddress }: {
1550
1548
  approve: boolean;
1551
1549
  seamlessAddress: string;
@@ -1565,7 +1563,7 @@ declare class Seamless {
1565
1563
  data: {
1566
1564
  masterAddress: string;
1567
1565
  seamlessAccount: string;
1568
- authorized: any;
1566
+ authorized: boolean;
1569
1567
  };
1570
1568
  }>;
1571
1569
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1583,9 +1581,9 @@ declare class Seamless {
1583
1581
  }): Promise<{
1584
1582
  code: number;
1585
1583
  data: {
1586
- masterAddress: any;
1584
+ masterAddress: string;
1587
1585
  seamlessAccount: string;
1588
- authorized: any;
1586
+ authorized: boolean;
1589
1587
  apiKey: string;
1590
1588
  };
1591
1589
  }>;
@@ -1604,7 +1602,7 @@ declare class Seamless {
1604
1602
  data: {
1605
1603
  masterAddress: string;
1606
1604
  seamlessAccount: string;
1607
- authorized: any;
1605
+ authorized: boolean;
1608
1606
  apiKey: string;
1609
1607
  };
1610
1608
  message?: undefined;
@@ -1631,13 +1629,13 @@ declare class Order {
1631
1629
  data: {
1632
1630
  success: boolean;
1633
1631
  orderId: string | null;
1634
- transactionHash: any;
1635
- blockNumber: any;
1636
- gasUsed: any;
1632
+ transactionHash: string;
1633
+ blockNumber: number | undefined;
1634
+ gasUsed: string | undefined;
1637
1635
  status: string;
1638
1636
  confirmations: number;
1639
1637
  timestamp: number;
1640
- receipt: any;
1638
+ receipt: ethers$1.ContractTransactionReceipt | null;
1641
1639
  };
1642
1640
  } | {
1643
1641
  code: number;
@@ -1648,13 +1646,13 @@ declare class Order {
1648
1646
  code: number;
1649
1647
  message: string;
1650
1648
  data: string | null;
1651
- transactionHash: any;
1652
- blockNumber: any;
1653
- gasUsed: any;
1649
+ transactionHash: string;
1650
+ blockNumber: number | undefined;
1651
+ gasUsed: string | undefined;
1654
1652
  status: string;
1655
1653
  confirmations: number;
1656
1654
  timestamp: number;
1657
- receipt: any;
1655
+ receipt: ethers$1.ContractTransactionReceipt | null;
1658
1656
  } | {
1659
1657
  code: number;
1660
1658
  message: any;
@@ -1673,13 +1671,13 @@ declare class Order {
1673
1671
  data: {
1674
1672
  success: boolean;
1675
1673
  orderId: string | null;
1676
- transactionHash: any;
1677
- blockNumber: any;
1678
- gasUsed: any;
1674
+ transactionHash: string;
1675
+ blockNumber: number | undefined;
1676
+ gasUsed: string | undefined;
1679
1677
  status: string;
1680
1678
  confirmations: number;
1681
1679
  timestamp: number;
1682
- receipt: any;
1680
+ receipt: ethers$1.ContractTransactionReceipt | null;
1683
1681
  };
1684
1682
  } | {
1685
1683
  code: number;
@@ -1692,13 +1690,13 @@ declare class Order {
1692
1690
  data: {
1693
1691
  success: boolean;
1694
1692
  orderId: string | null;
1695
- transactionHash: any;
1696
- blockNumber: any;
1697
- gasUsed: any;
1693
+ transactionHash: string;
1694
+ blockNumber: number | undefined;
1695
+ gasUsed: string | undefined;
1698
1696
  status: string;
1699
1697
  confirmations: number;
1700
1698
  timestamp: number;
1701
- receipt: any;
1699
+ receipt: ethers$1.ContractTransactionReceipt | null;
1702
1700
  };
1703
1701
  } | {
1704
1702
  code: number;
@@ -1719,7 +1717,7 @@ declare class Order {
1719
1717
  }>;
1720
1718
  updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
1721
1719
  code: number;
1722
- data: any;
1720
+ data: ethers$1.ContractTransactionReceipt | null;
1723
1721
  message: string;
1724
1722
  } | {
1725
1723
  code: number;
@@ -1777,4 +1775,4 @@ declare class MyxClient {
1777
1775
  getAccessToken(): Promise<string | null>;
1778
1776
  }
1779
1777
 
1780
- export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
1778
+ export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
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
@@ -569,17 +570,6 @@ declare enum OperationEnum {
569
570
  Increase = 0,
570
571
  Decrease = 1
571
572
  }
572
- declare enum TradeFlowTypeEnum {
573
- Increase = 0,
574
- Decrease = 1,
575
- AddMargin = 2,
576
- RemoveMargin = 3,
577
- CancelOrder = 4,
578
- ADL = 5,
579
- Liquidation = 6,
580
- MarketClose = 7,
581
- EarlyClose = 8
582
- }
583
573
  declare enum TriggerTypeEnum {
584
574
  Unknown = 0,
585
575
  GTE = 1,
@@ -685,7 +675,7 @@ interface TradeFlowItem {
685
675
  baseSymbol: string;
686
676
  quoteSymbol: string;
687
677
  executionFee: string;
688
- type: TradeFlowTypeEnum;
678
+ type: OperationEnum;
689
679
  }
690
680
  declare const getTradeFlow: ({ accessToken, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<TradeFlowItem[]>>;
691
681
 
@@ -879,21 +869,21 @@ interface PreviewWithdrawDataParams {
879
869
  amount: string | number;
880
870
  }
881
871
 
882
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
883
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
872
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
873
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
884
874
 
885
- declare const deposit$1: (params: Deposit) => Promise<any>;
875
+ declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
886
876
 
887
- declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
877
+ declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
888
878
 
889
- declare const getRewards$1: (params: RewardsParams) => Promise<any>;
879
+ declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
890
880
 
891
881
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
892
- baseAmountOut: any;
893
- rebateAmount: any;
882
+ baseAmountOut: bigint;
883
+ rebateAmount: bigint;
894
884
  } | undefined>;
895
885
 
896
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
886
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
897
887
 
898
888
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
899
889
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -902,18 +892,18 @@ declare namespace index$2 {
902
892
  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 };
903
893
  }
904
894
 
905
- declare const deposit: (params: Deposit) => Promise<any>;
895
+ declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
906
896
 
907
- declare const withdraw: (params: WithdrawParams) => Promise<any>;
897
+ declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
908
898
 
909
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
899
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
910
900
 
911
- declare const getRewards: (params: RewardsParams) => Promise<any>;
901
+ declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
912
902
 
913
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
914
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
903
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
904
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
915
905
 
916
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
906
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
917
907
 
918
908
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
919
909
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -926,9 +916,17 @@ declare namespace index$1 {
926
916
  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 };
927
917
  }
928
918
 
929
- declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
919
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, string, bigint, bigint, bigint, bigint, bigint] & {
920
+ marketId: string;
921
+ quoteToken: string;
922
+ baseReserveRatio: bigint;
923
+ quoteReserveRatio: bigint;
924
+ oracleFeeUsd: bigint;
925
+ oracleRefundFeeUsd: bigint;
926
+ poolPrimeThreshold: bigint;
927
+ }) | undefined>;
930
928
 
931
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
929
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
932
930
 
933
931
  declare const index_getMarket: typeof getMarket;
934
932
  declare const index_getOracleFee: typeof getOracleFee;
@@ -971,9 +969,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
971
969
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
972
970
  balance?: number | undefined;
973
971
  address: string;
974
- name: any;
975
- symbol: any;
976
- decimals: any;
972
+ name: string;
973
+ symbol: string;
974
+ decimals: bigint;
977
975
  icon: string;
978
976
  totalSupply: number;
979
977
  }>;
@@ -1187,7 +1185,7 @@ interface MyxClientConfig {
1187
1185
  signer?: Signer;
1188
1186
  seamlessAccount?: {
1189
1187
  masterAddress: string;
1190
- wallet: ethers.Wallet | null;
1188
+ wallet: ethers$1.Wallet | null;
1191
1189
  authorized: boolean;
1192
1190
  };
1193
1191
  walletClient?: WalletClient;
@@ -1207,7 +1205,7 @@ declare class ConfigManager {
1207
1205
  clear(): void;
1208
1206
  startSeamlessMode(open: boolean): void;
1209
1207
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1210
- wallet?: ethers.Wallet;
1208
+ wallet?: ethers$1.Wallet;
1211
1209
  authorized?: boolean;
1212
1210
  masterAddress?: string;
1213
1211
  }): void;
@@ -1526,9 +1524,9 @@ declare class Seamless {
1526
1524
  private utils;
1527
1525
  private account;
1528
1526
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1529
- onCheckRelayer(account: string, relayer: string): Promise<any>;
1527
+ onCheckRelayer(account: string, relayer: string): Promise<boolean>;
1530
1528
  getUSDPermitParams(deadline: number): Promise<{
1531
- token: string | ethers.Addressable;
1529
+ token: string | ethers$1.Addressable;
1532
1530
  owner: Promise<string> | undefined;
1533
1531
  spender: string;
1534
1532
  value: bigint;
@@ -1545,7 +1543,7 @@ declare class Seamless {
1545
1543
  deadline: number;
1546
1544
  data: string;
1547
1545
  nonce: string;
1548
- }, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1546
+ }, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1549
1547
  authorizeSeamlessAccount({ approve, seamlessAddress }: {
1550
1548
  approve: boolean;
1551
1549
  seamlessAddress: string;
@@ -1565,7 +1563,7 @@ declare class Seamless {
1565
1563
  data: {
1566
1564
  masterAddress: string;
1567
1565
  seamlessAccount: string;
1568
- authorized: any;
1566
+ authorized: boolean;
1569
1567
  };
1570
1568
  }>;
1571
1569
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1583,9 +1581,9 @@ declare class Seamless {
1583
1581
  }): Promise<{
1584
1582
  code: number;
1585
1583
  data: {
1586
- masterAddress: any;
1584
+ masterAddress: string;
1587
1585
  seamlessAccount: string;
1588
- authorized: any;
1586
+ authorized: boolean;
1589
1587
  apiKey: string;
1590
1588
  };
1591
1589
  }>;
@@ -1604,7 +1602,7 @@ declare class Seamless {
1604
1602
  data: {
1605
1603
  masterAddress: string;
1606
1604
  seamlessAccount: string;
1607
- authorized: any;
1605
+ authorized: boolean;
1608
1606
  apiKey: string;
1609
1607
  };
1610
1608
  message?: undefined;
@@ -1631,13 +1629,13 @@ declare class Order {
1631
1629
  data: {
1632
1630
  success: boolean;
1633
1631
  orderId: string | null;
1634
- transactionHash: any;
1635
- blockNumber: any;
1636
- gasUsed: any;
1632
+ transactionHash: string;
1633
+ blockNumber: number | undefined;
1634
+ gasUsed: string | undefined;
1637
1635
  status: string;
1638
1636
  confirmations: number;
1639
1637
  timestamp: number;
1640
- receipt: any;
1638
+ receipt: ethers$1.ContractTransactionReceipt | null;
1641
1639
  };
1642
1640
  } | {
1643
1641
  code: number;
@@ -1648,13 +1646,13 @@ declare class Order {
1648
1646
  code: number;
1649
1647
  message: string;
1650
1648
  data: string | null;
1651
- transactionHash: any;
1652
- blockNumber: any;
1653
- gasUsed: any;
1649
+ transactionHash: string;
1650
+ blockNumber: number | undefined;
1651
+ gasUsed: string | undefined;
1654
1652
  status: string;
1655
1653
  confirmations: number;
1656
1654
  timestamp: number;
1657
- receipt: any;
1655
+ receipt: ethers$1.ContractTransactionReceipt | null;
1658
1656
  } | {
1659
1657
  code: number;
1660
1658
  message: any;
@@ -1673,13 +1671,13 @@ declare class Order {
1673
1671
  data: {
1674
1672
  success: boolean;
1675
1673
  orderId: string | null;
1676
- transactionHash: any;
1677
- blockNumber: any;
1678
- gasUsed: any;
1674
+ transactionHash: string;
1675
+ blockNumber: number | undefined;
1676
+ gasUsed: string | undefined;
1679
1677
  status: string;
1680
1678
  confirmations: number;
1681
1679
  timestamp: number;
1682
- receipt: any;
1680
+ receipt: ethers$1.ContractTransactionReceipt | null;
1683
1681
  };
1684
1682
  } | {
1685
1683
  code: number;
@@ -1692,13 +1690,13 @@ declare class Order {
1692
1690
  data: {
1693
1691
  success: boolean;
1694
1692
  orderId: string | null;
1695
- transactionHash: any;
1696
- blockNumber: any;
1697
- gasUsed: any;
1693
+ transactionHash: string;
1694
+ blockNumber: number | undefined;
1695
+ gasUsed: string | undefined;
1698
1696
  status: string;
1699
1697
  confirmations: number;
1700
1698
  timestamp: number;
1701
- receipt: any;
1699
+ receipt: ethers$1.ContractTransactionReceipt | null;
1702
1700
  };
1703
1701
  } | {
1704
1702
  code: number;
@@ -1719,7 +1717,7 @@ declare class Order {
1719
1717
  }>;
1720
1718
  updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
1721
1719
  code: number;
1722
- data: any;
1720
+ data: ethers$1.ContractTransactionReceipt | null;
1723
1721
  message: string;
1724
1722
  } | {
1725
1723
  code: number;
@@ -1777,4 +1775,4 @@ declare class MyxClient {
1777
1775
  getAccessToken(): Promise<string | null>;
1778
1776
  }
1779
1777
 
1780
- export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
1778
+ export { type AccessTokenRequest, type AccessTokenResponse$1 as AccessTokenResponse, type AccessTokenType, type AddFavoriteParams, type Address$1 as Address, type ApiResponse, type BaseDetailResponse, type BaseResponse, COMMON_LP_AMOUNT_DECIMALS, COMMON_PRICE_DECIMALS, ChainId, type ChainIdRequest, CloseTypeEnum, type DashboardType, Direction, DirectionEnum, ErrorCode, ExecTypeEnum, type FavoritesListItem, type FavoritesListParams, type FavoritesTimeInterval, type FavoritesType, type FetchForwarderGetParams, type FetchForwarderGetResponse, type FetchForwarderGetResponseData, ForwarderGetStatus, type ForwarderTxParams, type GetBaseDetailParams, type GetHistoryOrdersParams, type GetKlineDataParams, type GetMarketDetailParams, type GetPoolLevelConfigParams, type GetTickerDataParams, type HistoryOrderItem, HttpKlineIntervalEnum, type KlineDataItemType, type KlineDataResponse, type KlineResolution, type LevelConfig, MarketCapType, type MarketDetailResponse, type MarketInfo, type MarketPool, type MarketPoolResponse, MarketPoolState, MarketType, MyxClient, type MyxClientConfig, type MyxSubscriptionOptions, type NetWorkFee, type ObjectType, type OnKlineCallback, type OnOrderCallback, type OnPositionCallback, type OnTickersAllCallback, type OnTickersCallback, OperationEnum, OperationType, OracleType, type Order$1 as Order, OrderStatus, OrderStatusEnum, OrderType, OrderTypeEnum, type PlaceOrderParams, type PoolLevelConfig, type PoolOpenOrder, type PoolOpenOrdersResponse, type PoolResponse, type Position$1 as Position, type PositionHistoryItem, type PositionResponse, type PositionTpSlOrderParams, type PositionType, type PriceResponse, type PriceType, type RemoveFavoriteParams, type SearchMarketParams, type SearchResultContractItem, type SearchResultCookItem, type SearchResultEarnItem, type SearchResultResponse, SearchSecondTypeEnum, SearchTypeEnum, type StatDashBoardResponse, type TickerDataItem, type TickersDataResponse, TimeInForce, type TradeFlowItem, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, baseUrl, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwardUrl, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getFavoritesList, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolOpenOrders, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
package/dist/index.js CHANGED
@@ -54,7 +54,6 @@ __export(index_exports, {
54
54
  SearchSecondTypeEnum: () => SearchSecondTypeEnum,
55
55
  SearchTypeEnum: () => SearchTypeEnum,
56
56
  TimeInForce: () => TimeInForce2,
57
- TradeFlowTypeEnum: () => TradeFlowTypeEnum,
58
57
  TriggerType: () => TriggerType2,
59
58
  TriggerTypeEnum: () => TriggerTypeEnum,
60
59
  addFavorite: () => addFavorite,
@@ -1839,7 +1838,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
1839
1838
  // package.json
1840
1839
  var package_default = {
1841
1840
  name: "@myx-trade/sdk",
1842
- version: "0.1.94",
1841
+ version: "0.1.95",
1843
1842
  private: false,
1844
1843
  publishConfig: {
1845
1844
  access: "public"
@@ -2054,18 +2053,6 @@ var OperationEnum = /* @__PURE__ */ ((OperationEnum2) => {
2054
2053
  OperationEnum2[OperationEnum2["Decrease"] = 1] = "Decrease";
2055
2054
  return OperationEnum2;
2056
2055
  })(OperationEnum || {});
2057
- var TradeFlowTypeEnum = /* @__PURE__ */ ((TradeFlowTypeEnum2) => {
2058
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Increase"] = 0] = "Increase";
2059
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Decrease"] = 1] = "Decrease";
2060
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["AddMargin"] = 2] = "AddMargin";
2061
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["RemoveMargin"] = 3] = "RemoveMargin";
2062
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["CancelOrder"] = 4] = "CancelOrder";
2063
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["ADL"] = 5] = "ADL";
2064
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Liquidation"] = 6] = "Liquidation";
2065
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["MarketClose"] = 7] = "MarketClose";
2066
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["EarlyClose"] = 8] = "EarlyClose";
2067
- return TradeFlowTypeEnum2;
2068
- })(TradeFlowTypeEnum || {});
2069
2056
  var TriggerTypeEnum = /* @__PURE__ */ ((TriggerTypeEnum2) => {
2070
2057
  TriggerTypeEnum2[TriggerTypeEnum2["Unknown"] = 0] = "Unknown";
2071
2058
  TriggerTypeEnum2[TriggerTypeEnum2["GTE"] = 1] = "GTE";
@@ -14466,6 +14453,8 @@ var Order = class {
14466
14453
  chainId,
14467
14454
  this.configManager.getConfig().brokerAddress
14468
14455
  );
14456
+ console.log("closeAllPositions params--->", chainId, params);
14457
+ console.log("getNetworkFee--->", params[0].executionFeeToken, chainId);
14469
14458
  const networkFee = await this.utils.getNetworkFee(
14470
14459
  params[0].executionFeeToken,
14471
14460
  chainId
@@ -19500,11 +19489,10 @@ var Utils = class {
19500
19489
  }
19501
19490
  }
19502
19491
  async getNetworkFee(quoteAddress, chainId) {
19503
- const config = this.configManager.getConfig();
19504
19492
  const orderManagerAddress = getContractAddressByChainId(
19505
19493
  chainId
19506
19494
  ).ORDER_MANAGER;
19507
- const provider = await getJSONProvider(config.chainId);
19495
+ const provider = await getJSONProvider(chainId);
19508
19496
  const orderManagerContract = new import_ethers25.ethers.Contract(
19509
19497
  orderManagerAddress,
19510
19498
  OrderManager_default,
@@ -21018,7 +21006,6 @@ var MyxClient = class {
21018
21006
  SearchSecondTypeEnum,
21019
21007
  SearchTypeEnum,
21020
21008
  TimeInForce,
21021
- TradeFlowTypeEnum,
21022
21009
  TriggerType,
21023
21010
  TriggerTypeEnum,
21024
21011
  addFavorite,
package/dist/index.mjs CHANGED
@@ -1749,7 +1749,7 @@ var RotationProvider = class extends BaseProvider {
1749
1749
  // package.json
1750
1750
  var package_default = {
1751
1751
  name: "@myx-trade/sdk",
1752
- version: "0.1.94",
1752
+ version: "0.1.95",
1753
1753
  private: false,
1754
1754
  publishConfig: {
1755
1755
  access: "public"
@@ -1964,18 +1964,6 @@ var OperationEnum = /* @__PURE__ */ ((OperationEnum2) => {
1964
1964
  OperationEnum2[OperationEnum2["Decrease"] = 1] = "Decrease";
1965
1965
  return OperationEnum2;
1966
1966
  })(OperationEnum || {});
1967
- var TradeFlowTypeEnum = /* @__PURE__ */ ((TradeFlowTypeEnum2) => {
1968
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Increase"] = 0] = "Increase";
1969
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Decrease"] = 1] = "Decrease";
1970
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["AddMargin"] = 2] = "AddMargin";
1971
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["RemoveMargin"] = 3] = "RemoveMargin";
1972
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["CancelOrder"] = 4] = "CancelOrder";
1973
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["ADL"] = 5] = "ADL";
1974
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["Liquidation"] = 6] = "Liquidation";
1975
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["MarketClose"] = 7] = "MarketClose";
1976
- TradeFlowTypeEnum2[TradeFlowTypeEnum2["EarlyClose"] = 8] = "EarlyClose";
1977
- return TradeFlowTypeEnum2;
1978
- })(TradeFlowTypeEnum || {});
1979
1967
  var TriggerTypeEnum = /* @__PURE__ */ ((TriggerTypeEnum2) => {
1980
1968
  TriggerTypeEnum2[TriggerTypeEnum2["Unknown"] = 0] = "Unknown";
1981
1969
  TriggerTypeEnum2[TriggerTypeEnum2["GTE"] = 1] = "GTE";
@@ -14376,6 +14364,8 @@ var Order = class {
14376
14364
  chainId,
14377
14365
  this.configManager.getConfig().brokerAddress
14378
14366
  );
14367
+ console.log("closeAllPositions params--->", chainId, params);
14368
+ console.log("getNetworkFee--->", params[0].executionFeeToken, chainId);
14379
14369
  const networkFee = await this.utils.getNetworkFee(
14380
14370
  params[0].executionFeeToken,
14381
14371
  chainId
@@ -19410,11 +19400,10 @@ var Utils = class {
19410
19400
  }
19411
19401
  }
19412
19402
  async getNetworkFee(quoteAddress, chainId) {
19413
- const config = this.configManager.getConfig();
19414
19403
  const orderManagerAddress = getContractAddressByChainId(
19415
19404
  chainId
19416
19405
  ).ORDER_MANAGER;
19417
- const provider = await getJSONProvider(config.chainId);
19406
+ const provider = await getJSONProvider(chainId);
19418
19407
  const orderManagerContract = new ethers7.Contract(
19419
19408
  orderManagerAddress,
19420
19409
  OrderManager_default,
@@ -20927,7 +20916,6 @@ export {
20927
20916
  SearchSecondTypeEnum,
20928
20917
  SearchTypeEnum,
20929
20918
  TimeInForce2 as TimeInForce,
20930
- TradeFlowTypeEnum,
20931
20919
  TriggerType2 as TriggerType,
20932
20920
  TriggerTypeEnum,
20933
20921
  addFavorite,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myx-trade/sdk",
3
- "version": "0.1.94",
3
+ "version": "0.1.95",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"