@myx-trade/sdk 0.1.189 → 0.1.191

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,5 +1,4 @@
1
- import * as ethers from 'ethers';
2
- import { AddressLike, Signer, ethers as ethers$1 } from 'ethers';
1
+ import { AddressLike, Signer, ethers } from 'ethers';
3
2
  export { formatUnits, parseUnits } from 'ethers';
4
3
  import { Options, Event } from 'reconnecting-websocket';
5
4
  import { WalletClient } from 'viem';
@@ -49,49 +48,49 @@ interface CancelTpSLParams {
49
48
  orderId: string;
50
49
  }
51
50
 
52
- declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
51
+ declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
53
52
 
54
- declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
55
- declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
53
+ declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<any>;
54
+ declare const getMarketPools: (chainId: ChainId) => Promise<any>;
56
55
  declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
57
56
  quotePool: {
58
- poolToken: string;
59
- exchangeRate: bigint;
60
- poolTokenPrice: bigint;
61
- poolTokenSupply: bigint;
57
+ poolToken: any;
58
+ exchangeRate: any;
59
+ poolTokenPrice: any;
60
+ poolTokenSupply: any;
62
61
  };
63
62
  basePool: {
64
- poolToken: string;
65
- exchangeRate: bigint;
66
- poolTokenPrice: bigint;
67
- poolTokenSupply: bigint;
63
+ poolToken: any;
64
+ exchangeRate: any;
65
+ poolTokenPrice: any;
66
+ poolTokenSupply: any;
68
67
  };
69
68
  reserveInfo: {
70
- baseTotalAmount: bigint;
71
- baseReservedAmount: bigint;
72
- quoteTotalAmount: bigint;
73
- quoteReservedAmount: bigint;
69
+ baseTotalAmount: any;
70
+ baseReservedAmount: any;
71
+ quoteTotalAmount: any;
72
+ quoteReservedAmount: any;
74
73
  };
75
74
  fundingInfo: {
76
- nextFundingRate: bigint;
77
- lastFundingFeeTracker: bigint;
78
- nextEpochTime: bigint;
75
+ nextFundingRate: any;
76
+ lastFundingFeeTracker: any;
77
+ nextEpochTime: any;
79
78
  };
80
79
  ioTracker: {
81
- tracker: bigint;
82
- longSize: bigint;
83
- shortSize: bigint;
84
- poolEntryPrice: bigint;
80
+ tracker: any;
81
+ longSize: any;
82
+ shortSize: any;
83
+ poolEntryPrice: any;
85
84
  };
86
85
  }>;
87
86
 
88
- declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
87
+ declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
89
88
 
90
- declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
89
+ declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
91
90
 
92
- declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
91
+ declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
93
92
 
94
- declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
93
+ declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<any>;
95
94
 
96
95
  /**
97
96
  * Trading related types and enums
@@ -354,6 +353,9 @@ interface AccessTokenRequest {
354
353
  accessToken: string;
355
354
  address: string;
356
355
  }
356
+ interface HttpEnvParams {
357
+ isProd?: boolean;
358
+ }
357
359
  declare enum HttpKlineIntervalEnum {
358
360
  Minute1 = 1,
359
361
  Minute5 = 5,
@@ -646,7 +648,7 @@ interface HistoryOrderItem {
646
648
  /**
647
649
  * Get history orders
648
650
  */
649
- declare const getHistoryOrders: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<HistoryOrderItem[]>>;
651
+ declare const getHistoryOrders: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<HistoryOrderItem[]>>;
650
652
  /**
651
653
  * Get position history
652
654
  */
@@ -682,7 +684,7 @@ interface PositionHistoryItem {
682
684
  closeType: CloseTypeEnum;
683
685
  avgClosePrice: string;
684
686
  }
685
- declare const getPositionHistory: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<PositionHistoryItem[]>>;
687
+ declare const getPositionHistory: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<PositionHistoryItem[]>>;
686
688
  /**
687
689
  * Get Trade Flow
688
690
  */
@@ -713,7 +715,7 @@ interface TradeFlowItem {
713
715
  referralRebate: string;
714
716
  rebateClaimedAmount: string;
715
717
  }
716
- declare const getTradeFlow: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest) => Promise<ApiResponse<TradeFlowItem[]>>;
718
+ declare const getTradeFlow: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<TradeFlowItem[]>>;
717
719
 
718
720
  type ForwarderTxParams = {
719
721
  from: string;
@@ -725,7 +727,7 @@ type ForwarderTxParams = {
725
727
  deadline: number;
726
728
  signature: string;
727
729
  };
728
- declare const forwarderTxApi: (params: ForwarderTxParams, chainId: number) => Promise<ApiResponse<any>>;
730
+ declare const forwarderTxApi: (params: ForwarderTxParams, chainId: number, isProd?: boolean) => Promise<ApiResponse<any>>;
729
731
  type FetchForwarderGetParams = {
730
732
  requestId: string;
731
733
  };
@@ -741,9 +743,11 @@ type FetchForwarderGetResponseData = {
741
743
  reason: string;
742
744
  };
743
745
  type FetchForwarderGetResponse = BaseResponse<FetchForwarderGetResponseData>;
744
- declare const fetchForwarderGetApi: (params: FetchForwarderGetParams) => Promise<FetchForwarderGetResponse>;
746
+ declare const fetchForwarderGetApi: (params: FetchForwarderGetParams, isProd?: boolean) => Promise<FetchForwarderGetResponse>;
745
747
 
746
- declare const getPoolList: () => Promise<ApiResponse<any[]>>;
748
+ declare const getPoolList: ({ isProd, }: {
749
+ isProd?: boolean;
750
+ }) => Promise<ApiResponse<any[]>>;
747
751
  interface PoolSymbolAllResponse {
748
752
  chainId: number;
749
753
  marketId: string;
@@ -752,11 +756,13 @@ interface PoolSymbolAllResponse {
752
756
  quoteSymbol: string;
753
757
  baseTokenIcon: string;
754
758
  }
755
- declare const getPoolSymbolAll: () => Promise<ApiResponse<PoolSymbolAllResponse[]>>;
759
+ declare const getPoolSymbolAll: ({ isProd, }: {
760
+ isProd?: boolean;
761
+ }) => Promise<ApiResponse<PoolSymbolAllResponse[]>>;
756
762
 
757
- declare const baseUrl = "https://api-test.myx.cash";
758
- declare const forwardUrl = "https://api-test.myx.cash/v2/agent";
759
- declare const getOraclePrice: (chainId: ChainId, poolIds?: string[]) => Promise<PriceResponse>;
763
+ declare const getBaseUrlByEnv: (isProd: boolean) => "https://api.myx.finance" | "https://api-test.myx.cash";
764
+ declare const getForwardUrlByEnv: (isProd: boolean) => "https://api.myx.finance/v2/agent" | "https://api-test.myx.cash/v2/agent";
765
+ declare const getOraclePrice: (chainId: ChainId, poolIds?: string[], isProd?: boolean) => Promise<PriceResponse>;
760
766
  interface LevelConfig {
761
767
  fundingFeeRate1: number;
762
768
  fundingFeeRate1Max: number;
@@ -779,15 +785,16 @@ interface PoolLevelConfig {
779
785
  interface GetPoolLevelConfigParams {
780
786
  poolId: string;
781
787
  chainId: ChainId;
788
+ isProd?: boolean;
782
789
  }
783
790
  /**
784
791
  * Get Pool Level Config
785
792
  */
786
- declare const getPoolLevelConfig: ({ poolId, chainId, }: GetPoolLevelConfigParams) => Promise<ApiResponse<PoolLevelConfig>>;
787
- declare const getPoolDetail: (chainId: number, poolId: string) => Promise<PoolResponse>;
788
- declare const getPositions: (accessToken: string, address: string) => Promise<PositionResponse>;
789
- declare const getOrders: (accessToken: string, address: string) => Promise<PositionResponse>;
790
- declare const getPoolOpenOrders: (accessToken: string, address: string, chainId: ChainId) => Promise<PoolOpenOrdersResponse>;
793
+ declare const getPoolLevelConfig: ({ poolId, chainId, isProd, }: GetPoolLevelConfigParams) => Promise<ApiResponse<PoolLevelConfig>>;
794
+ declare const getPoolDetail: (chainId: number, poolId: string, isProd?: boolean) => Promise<PoolResponse>;
795
+ declare const getPositions: (accessToken: string, address: string, isProd?: boolean) => Promise<PositionResponse>;
796
+ declare const getOrders: (accessToken: string, address: string, isProd?: boolean) => Promise<PositionResponse>;
797
+ declare const getPoolOpenOrders: (accessToken: string, address: string, chainId: ChainId, isProd?: boolean) => Promise<PoolOpenOrdersResponse>;
791
798
  /**
792
799
  * Get Kline Data
793
800
  */
@@ -798,17 +805,17 @@ interface GetKlineDataParams {
798
805
  limit: number;
799
806
  interval: HttpKlineIntervalEnum;
800
807
  }
801
- declare const getKlineData: ({ chainId, poolId, endTime, limit, interval, }: GetKlineDataParams) => Promise<ApiResponse<KlineDataItemType[]>>;
808
+ declare const getKlineData: ({ chainId, poolId, endTime, limit, interval }: GetKlineDataParams, envParams: HttpEnvParams) => Promise<ApiResponse<KlineDataItemType[]>>;
802
809
  /**
803
810
  * Get Kline Latest Bar
804
811
  */
805
- declare const getKlineLatestBar: (params: Pick<GetKlineDataParams, "chainId" | "poolId" | "interval">) => Promise<ApiResponse<KlineDataItemType>>;
812
+ declare const getKlineLatestBar: (params: Pick<GetKlineDataParams, "chainId" | "poolId" | "interval">, envParams: HttpEnvParams) => Promise<ApiResponse<KlineDataItemType>>;
806
813
  interface GetTickerDataParams {
807
814
  chainId: ChainId;
808
815
  poolIds: string[];
809
816
  }
810
- declare const getTickerData: ({ chainId, poolIds, }: GetTickerDataParams) => Promise<ApiResponse<TickerDataItem[]>>;
811
- declare const getAllTickers: () => Promise<ApiResponse<TickerDataItem[]>>;
817
+ declare const getTickerData: ({ chainId, poolIds }: GetTickerDataParams, envParams: HttpEnvParams) => Promise<ApiResponse<TickerDataItem[]>>;
818
+ declare const getAllTickers: (envParams: HttpEnvParams) => Promise<ApiResponse<TickerDataItem[]>>;
812
819
  /**
813
820
  * search
814
821
  */
@@ -818,8 +825,8 @@ interface SearchMarketParams {
818
825
  type?: SearchSecondTypeEnum;
819
826
  searchKey?: string;
820
827
  }
821
- declare const searchMarketAuth: ({ accessToken, address, ...params }: SearchMarketParams & AccessTokenRequest) => Promise<ApiResponse<SearchResultResponse>>;
822
- declare const searchMarket: ({ ...params }: SearchMarketParams) => Promise<ApiResponse<SearchResultResponse>>;
828
+ declare const searchMarketAuth: ({ accessToken, address, ...params }: SearchMarketParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<SearchResultResponse>>;
829
+ declare const searchMarket: ({ ...params }: SearchMarketParams, envParams: HttpEnvParams) => Promise<ApiResponse<SearchResultResponse>>;
823
830
  /**
824
831
  * favorite
825
832
  */
@@ -827,12 +834,12 @@ interface AddFavoriteParams {
827
834
  poolId: string;
828
835
  chainId: ChainId;
829
836
  }
830
- declare const addFavorite: ({ accessToken, address, ...params }: AddFavoriteParams & AccessTokenRequest) => Promise<ApiResponse<null>>;
837
+ declare const addFavorite: ({ accessToken, address, ...params }: AddFavoriteParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<null>>;
831
838
  interface RemoveFavoriteParams {
832
839
  poolId: string;
833
840
  chainId: ChainId;
834
841
  }
835
- declare const removeFavorite: ({ accessToken, address, ...params }: RemoveFavoriteParams & AccessTokenRequest) => Promise<ApiResponse<null>>;
842
+ declare const removeFavorite: ({ accessToken, address, ...params }: RemoveFavoriteParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<null>>;
836
843
  /**
837
844
  * Favorites List
838
845
  */
@@ -845,18 +852,18 @@ interface FavoritesListParams {
845
852
  timeInterval?: FavoritesTimeInterval;
846
853
  chainId: ChainId | 0;
847
854
  }
848
- declare const getFavoritesList: ({ accessToken, address, ...params }: FavoritesListParams & AccessTokenRequest) => Promise<ApiResponse<FavoritesListItem[]>>;
855
+ declare const getFavoritesList: ({ accessToken, address, ...params }: FavoritesListParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<FavoritesListItem[]>>;
849
856
  interface GetBaseDetailParams {
850
857
  chainId: ChainId;
851
858
  poolId: string;
852
859
  }
853
- declare const getBaseDetail: (params: GetBaseDetailParams) => Promise<ApiResponse<BaseDetailResponse>>;
860
+ declare const getBaseDetail: ({ ...params }: GetBaseDetailParams, envParams: HttpEnvParams) => Promise<ApiResponse<BaseDetailResponse>>;
854
861
  interface GetMarketDetailParams {
855
862
  chainId: number;
856
863
  poolId: string;
857
864
  }
858
- declare const getMarketDetail: (params: GetMarketDetailParams) => Promise<ApiResponse<MarketDetailResponse>>;
859
- declare const getMarketList: () => Promise<ApiResponse<MarketInfo[]>>;
865
+ declare const getMarketDetail: ({ ...params }: GetMarketDetailParams, envParams: HttpEnvParams) => Promise<ApiResponse<MarketDetailResponse>>;
866
+ declare const getMarketList: (envParams: HttpEnvParams) => Promise<ApiResponse<MarketInfo[]>>;
860
867
 
861
868
  declare const getPoolInfo: (chainId: ChainId, poolId: string) => Promise<MarketPool | undefined>;
862
869
 
@@ -916,21 +923,21 @@ interface PreviewWithdrawDataParams {
916
923
  amount: string | number;
917
924
  }
918
925
 
919
- declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
920
- declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
926
+ declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
927
+ declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
921
928
 
922
- declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
929
+ declare const deposit$1: (params: Deposit) => Promise<any>;
923
930
 
924
- declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
931
+ declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
925
932
 
926
- declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
933
+ declare const getRewards$1: (params: RewardsParams) => Promise<any>;
927
934
 
928
935
  declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
929
- baseAmountOut: bigint;
930
- rebateAmount: bigint;
936
+ baseAmountOut: any;
937
+ rebateAmount: any;
931
938
  } | undefined>;
932
939
 
933
- declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
940
+ declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
934
941
 
935
942
  declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
936
943
  declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
@@ -939,18 +946,18 @@ declare namespace index$2 {
939
946
  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 };
940
947
  }
941
948
 
942
- declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
949
+ declare const deposit: (params: Deposit) => Promise<any>;
943
950
 
944
- declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
951
+ declare const withdraw: (params: WithdrawParams) => Promise<any>;
945
952
 
946
- declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
953
+ declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
947
954
 
948
- declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
955
+ declare const getRewards: (params: RewardsParams) => Promise<any>;
949
956
 
950
- declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
951
- declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
957
+ declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
958
+ declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
952
959
 
953
- declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
960
+ declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
954
961
 
955
962
  declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
956
963
  declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
@@ -963,16 +970,9 @@ declare namespace index$1 {
963
970
  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 };
964
971
  }
965
972
 
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>;
973
+ declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
974
974
 
975
- declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
975
+ declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
976
976
 
977
977
  declare const index_getMarket: typeof getMarket;
978
978
  declare const index_getOracleFee: typeof getOracleFee;
@@ -988,7 +988,7 @@ declare const getPricesData: (chainId: ChainId, poolIds: string[]) => Promise<{
988
988
  oracleType: OracleType;
989
989
  vaa: string;
990
990
  }[] | undefined>;
991
- declare const getPriceData: (chainId: ChainId, poolId: string) => Promise<{
991
+ declare const getPriceData: (chainId: ChainId, poolId: string, isProd: boolean) => Promise<{
992
992
  poolId: string;
993
993
  price: string;
994
994
  value: bigint;
@@ -1015,9 +1015,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
1015
1015
  declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
1016
1016
  balance?: number | undefined;
1017
1017
  address: string;
1018
- name: string;
1019
- symbol: string;
1020
- decimals: bigint;
1018
+ name: any;
1019
+ symbol: any;
1020
+ decimals: any;
1021
1021
  icon: string;
1022
1022
  totalSupply: number;
1023
1023
  }>;
@@ -1231,7 +1231,7 @@ interface MyxClientConfig {
1231
1231
  signer?: Signer;
1232
1232
  seamlessAccount?: {
1233
1233
  masterAddress: string;
1234
- wallet: ethers$1.Wallet | null;
1234
+ wallet: ethers.Wallet | null;
1235
1235
  authorized: boolean;
1236
1236
  };
1237
1237
  walletClient?: WalletClient;
@@ -1251,7 +1251,7 @@ declare class ConfigManager {
1251
1251
  clear(): void;
1252
1252
  startSeamlessMode(open: boolean): MyxClientConfig;
1253
1253
  updateSeamlessWallet({ wallet, authorized, masterAddress }: {
1254
- wallet?: ethers$1.Wallet;
1254
+ wallet?: ethers.Wallet;
1255
1255
  authorized?: boolean;
1256
1256
  masterAddress?: string;
1257
1257
  }): void;
@@ -1359,12 +1359,12 @@ declare class Utils {
1359
1359
  quoteAddress: string;
1360
1360
  amount?: string;
1361
1361
  spenderAddress?: string;
1362
- signer?: ethers$1.Signer;
1362
+ signer?: ethers.Signer;
1363
1363
  }): Promise<{
1364
1364
  code: number;
1365
1365
  message: any;
1366
1366
  }>;
1367
- getUserTradingFeeRate(assetClass: number): Promise<{
1367
+ getUserTradingFeeRate(assetClass: number, riskTier: number): Promise<{
1368
1368
  code: number;
1369
1369
  data: {
1370
1370
  takerFeeRate: any;
@@ -1379,7 +1379,7 @@ declare class Utils {
1379
1379
  data?: undefined;
1380
1380
  }>;
1381
1381
  getNetworkFee(quoteAddress: string, chainId: number): Promise<any>;
1382
- getOraclePrice(poolId: string): Promise<{
1382
+ getOraclePrice(poolId: string, chainId: number): Promise<{
1383
1383
  poolId: string;
1384
1384
  price: string;
1385
1385
  value: bigint;
@@ -1402,68 +1402,7 @@ declare class Utils {
1402
1402
  marketPrice: string;
1403
1403
  }): Promise<{
1404
1404
  code: number;
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
- };
1405
+ data: any;
1467
1406
  message?: undefined;
1468
1407
  } | {
1469
1408
  code: number;
@@ -1621,9 +1560,9 @@ declare class Seamless {
1621
1560
  private utils;
1622
1561
  private account;
1623
1562
  constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
1624
- onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
1563
+ onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
1625
1564
  getUSDPermitParams(deadline: number, chainId: number): Promise<{
1626
- token: string | ethers$1.Addressable;
1565
+ token: string | ethers.Addressable;
1627
1566
  owner: string;
1628
1567
  spender: string;
1629
1568
  value: bigint;
@@ -1640,7 +1579,7 @@ declare class Seamless {
1640
1579
  deadline: number;
1641
1580
  data: string;
1642
1581
  nonce: string;
1643
- }, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
1582
+ }, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
1644
1583
  authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
1645
1584
  approve: boolean;
1646
1585
  seamlessAddress: string;
@@ -1662,7 +1601,7 @@ declare class Seamless {
1662
1601
  data: {
1663
1602
  masterAddress: string;
1664
1603
  seamlessAccount: string;
1665
- authorized: boolean;
1604
+ authorized: any;
1666
1605
  };
1667
1606
  }>;
1668
1607
  exportSeamlessPrivateKey({ password, apiKey }: {
@@ -1681,9 +1620,9 @@ declare class Seamless {
1681
1620
  }): Promise<{
1682
1621
  code: number;
1683
1622
  data: {
1684
- masterAddress: string;
1623
+ masterAddress: any;
1685
1624
  seamlessAccount: string;
1686
- authorized: boolean;
1625
+ authorized: any;
1687
1626
  apiKey: string;
1688
1627
  };
1689
1628
  }>;
@@ -1703,7 +1642,7 @@ declare class Seamless {
1703
1642
  data: {
1704
1643
  masterAddress: string;
1705
1644
  seamlessAccount: string;
1706
- authorized: boolean;
1645
+ authorized: any;
1707
1646
  apiKey: string;
1708
1647
  };
1709
1648
  message?: undefined;
@@ -1734,7 +1673,7 @@ declare class Position {
1734
1673
  code: number;
1735
1674
  data: PositionHistoryItem[];
1736
1675
  }>;
1737
- adjustCollateral({ poolId, positionId, adjustAmount, quoteToken, poolOracleType, chainId, address }: {
1676
+ adjustCollateral({ poolId, positionId, adjustAmount, quoteToken, poolOracleType, chainId, address, }: {
1738
1677
  poolId: string;
1739
1678
  positionId: string;
1740
1679
  adjustAmount: string;
@@ -1792,13 +1731,13 @@ declare class Order {
1792
1731
  data: {
1793
1732
  success: boolean;
1794
1733
  orderId: string | null;
1795
- transactionHash: string;
1796
- blockNumber: number | undefined;
1797
- gasUsed: string | undefined;
1734
+ transactionHash: any;
1735
+ blockNumber: any;
1736
+ gasUsed: any;
1798
1737
  status: string;
1799
1738
  confirmations: number;
1800
1739
  timestamp: number;
1801
- receipt: ethers$1.ContractTransactionReceipt | null;
1740
+ receipt: any;
1802
1741
  };
1803
1742
  } | {
1804
1743
  code: number;
@@ -1820,13 +1759,13 @@ declare class Order {
1820
1759
  code: number;
1821
1760
  message: string;
1822
1761
  data: string | null;
1823
- transactionHash: string;
1824
- blockNumber: number | undefined;
1825
- gasUsed: string | undefined;
1762
+ transactionHash: any;
1763
+ blockNumber: any;
1764
+ gasUsed: any;
1826
1765
  status: string;
1827
1766
  confirmations: number;
1828
1767
  timestamp: number;
1829
- receipt: ethers$1.ContractTransactionReceipt | null;
1768
+ receipt: any;
1830
1769
  } | {
1831
1770
  code: number;
1832
1771
  message: any;
@@ -1849,13 +1788,13 @@ declare class Order {
1849
1788
  data: {
1850
1789
  success: boolean;
1851
1790
  orderId: string | null;
1852
- transactionHash: string;
1853
- blockNumber: number | undefined;
1854
- gasUsed: string | undefined;
1791
+ transactionHash: any;
1792
+ blockNumber: any;
1793
+ gasUsed: any;
1855
1794
  status: string;
1856
1795
  confirmations: number;
1857
1796
  timestamp: number;
1858
- receipt: ethers$1.ContractTransactionReceipt | null;
1797
+ receipt: any;
1859
1798
  };
1860
1799
  } | {
1861
1800
  code: number;
@@ -1872,13 +1811,13 @@ declare class Order {
1872
1811
  data: {
1873
1812
  success: boolean;
1874
1813
  orderId: string | null;
1875
- transactionHash: string;
1876
- blockNumber: number | undefined;
1877
- gasUsed: string | undefined;
1814
+ transactionHash: any;
1815
+ blockNumber: any;
1816
+ gasUsed: any;
1878
1817
  status: string;
1879
1818
  confirmations: number;
1880
1819
  timestamp: number;
1881
- receipt: ethers$1.ContractTransactionReceipt | null;
1820
+ receipt: any;
1882
1821
  };
1883
1822
  } | {
1884
1823
  code: number;
@@ -1904,7 +1843,7 @@ declare class Order {
1904
1843
  }>;
1905
1844
  updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
1906
1845
  code: number;
1907
- data: ethers$1.ContractTransactionReceipt | null;
1846
+ data: any;
1908
1847
  message: string;
1909
1848
  } | {
1910
1849
  code: number;
@@ -1962,4 +1901,4 @@ declare class MyxClient {
1962
1901
  getAccessToken(): Promise<string | null>;
1963
1902
  }
1964
1903
 
1965
- 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 PoolSymbolAllResponse, 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, TradeFlowAccountTypeEnum, 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, getPoolList, getPoolOpenOrders, getPoolSymbolAll, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };
1904
+ 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, type HttpEnvParams, 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 PoolSymbolAllResponse, 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, TradeFlowAccountTypeEnum, type TradeFlowItem, TradeFlowTypeEnum, type TradingResult, TriggerType, TriggerTypeEnum, type UpdateOrderTpSlParams, addFavorite, approve, index$2 as base, bigintAmountSlipperCalculator, bigintTradingGasPriceWithRatio, bigintTradingGasToRatioCalculator, fetchForwarderGetApi, forwarderTxApi, getAllTickers, getAllowanceApproved, getBalanceOf, getBaseDetail, getBaseUrlByEnv, getFavoritesList, getForwardUrlByEnv, getHistoryOrders, getKlineData, getKlineLatestBar, getMarketDetail, getMarketList, getOraclePrice, getOrders, getPoolDetail, getPoolLevelConfig, getPoolList, getPoolOpenOrders, getPoolSymbolAll, getPositionHistory, getPositions, getPriceData, getPricesData, getTickerData, getTokenInfo, getTradeFlow, index as market, index$3 as pool, index$1 as quote, removeFavorite, searchMarket, searchMarketAuth };