@myx-trade/sdk 0.1.190 → 0.1.192
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 +96 -175
- package/dist/index.d.ts +96 -175
- package/dist/index.js +189 -120
- package/dist/index.mjs +189 -120
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
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<
|
|
51
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<any>;
|
|
53
52
|
|
|
54
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
55
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
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:
|
|
59
|
-
exchangeRate:
|
|
60
|
-
poolTokenPrice:
|
|
61
|
-
poolTokenSupply:
|
|
57
|
+
poolToken: any;
|
|
58
|
+
exchangeRate: any;
|
|
59
|
+
poolTokenPrice: any;
|
|
60
|
+
poolTokenSupply: any;
|
|
62
61
|
};
|
|
63
62
|
basePool: {
|
|
64
|
-
poolToken:
|
|
65
|
-
exchangeRate:
|
|
66
|
-
poolTokenPrice:
|
|
67
|
-
poolTokenSupply:
|
|
63
|
+
poolToken: any;
|
|
64
|
+
exchangeRate: any;
|
|
65
|
+
poolTokenPrice: any;
|
|
66
|
+
poolTokenSupply: any;
|
|
68
67
|
};
|
|
69
68
|
reserveInfo: {
|
|
70
|
-
baseTotalAmount:
|
|
71
|
-
baseReservedAmount:
|
|
72
|
-
quoteTotalAmount:
|
|
73
|
-
quoteReservedAmount:
|
|
69
|
+
baseTotalAmount: any;
|
|
70
|
+
baseReservedAmount: any;
|
|
71
|
+
quoteTotalAmount: any;
|
|
72
|
+
quoteReservedAmount: any;
|
|
74
73
|
};
|
|
75
74
|
fundingInfo: {
|
|
76
|
-
nextFundingRate:
|
|
77
|
-
lastFundingFeeTracker:
|
|
78
|
-
nextEpochTime:
|
|
75
|
+
nextFundingRate: any;
|
|
76
|
+
lastFundingFeeTracker: any;
|
|
77
|
+
nextEpochTime: any;
|
|
79
78
|
};
|
|
80
79
|
ioTracker: {
|
|
81
|
-
tracker:
|
|
82
|
-
longSize:
|
|
83
|
-
shortSize:
|
|
84
|
-
poolEntryPrice:
|
|
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<
|
|
87
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<any>;
|
|
89
88
|
|
|
90
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
89
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<any>;
|
|
91
90
|
|
|
92
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
91
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<any>;
|
|
93
92
|
|
|
94
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
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,
|
|
@@ -562,7 +564,6 @@ interface GetHistoryOrdersParams {
|
|
|
562
564
|
limit?: number;
|
|
563
565
|
chainId?: number;
|
|
564
566
|
poolId?: string;
|
|
565
|
-
isProd?: boolean;
|
|
566
567
|
}
|
|
567
568
|
declare enum OrderTypeEnum {
|
|
568
569
|
Market = 0,
|
|
@@ -647,7 +648,7 @@ interface HistoryOrderItem {
|
|
|
647
648
|
/**
|
|
648
649
|
* Get history orders
|
|
649
650
|
*/
|
|
650
|
-
declare const getHistoryOrders: ({ accessToken, address,
|
|
651
|
+
declare const getHistoryOrders: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<HistoryOrderItem[]>>;
|
|
651
652
|
/**
|
|
652
653
|
* Get position history
|
|
653
654
|
*/
|
|
@@ -683,7 +684,7 @@ interface PositionHistoryItem {
|
|
|
683
684
|
closeType: CloseTypeEnum;
|
|
684
685
|
avgClosePrice: string;
|
|
685
686
|
}
|
|
686
|
-
declare const getPositionHistory: ({ accessToken, address,
|
|
687
|
+
declare const getPositionHistory: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<PositionHistoryItem[]>>;
|
|
687
688
|
/**
|
|
688
689
|
* Get Trade Flow
|
|
689
690
|
*/
|
|
@@ -714,7 +715,7 @@ interface TradeFlowItem {
|
|
|
714
715
|
referralRebate: string;
|
|
715
716
|
rebateClaimedAmount: string;
|
|
716
717
|
}
|
|
717
|
-
declare const getTradeFlow: ({ accessToken, address,
|
|
718
|
+
declare const getTradeFlow: ({ accessToken, address, ...params }: GetHistoryOrdersParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<TradeFlowItem[]>>;
|
|
718
719
|
|
|
719
720
|
type ForwarderTxParams = {
|
|
720
721
|
from: string;
|
|
@@ -789,7 +790,7 @@ interface GetPoolLevelConfigParams {
|
|
|
789
790
|
/**
|
|
790
791
|
* Get Pool Level Config
|
|
791
792
|
*/
|
|
792
|
-
declare const getPoolLevelConfig: ({ poolId, chainId, isProd }: GetPoolLevelConfigParams) => Promise<ApiResponse<PoolLevelConfig>>;
|
|
793
|
+
declare const getPoolLevelConfig: ({ poolId, chainId, isProd, }: GetPoolLevelConfigParams) => Promise<ApiResponse<PoolLevelConfig>>;
|
|
793
794
|
declare const getPoolDetail: (chainId: number, poolId: string, isProd?: boolean) => Promise<PoolResponse>;
|
|
794
795
|
declare const getPositions: (accessToken: string, address: string, isProd?: boolean) => Promise<PositionResponse>;
|
|
795
796
|
declare const getOrders: (accessToken: string, address: string, isProd?: boolean) => Promise<PositionResponse>;
|
|
@@ -803,22 +804,18 @@ interface GetKlineDataParams {
|
|
|
803
804
|
endTime: number;
|
|
804
805
|
limit: number;
|
|
805
806
|
interval: HttpKlineIntervalEnum;
|
|
806
|
-
isProd?: boolean;
|
|
807
807
|
}
|
|
808
|
-
declare const getKlineData: ({ chainId, poolId, endTime, limit, interval
|
|
808
|
+
declare const getKlineData: ({ chainId, poolId, endTime, limit, interval }: GetKlineDataParams, envParams: HttpEnvParams) => Promise<ApiResponse<KlineDataItemType[]>>;
|
|
809
809
|
/**
|
|
810
810
|
* Get Kline Latest Bar
|
|
811
811
|
*/
|
|
812
|
-
declare const getKlineLatestBar: (params: Pick<GetKlineDataParams, "chainId" | "poolId" | "interval">,
|
|
812
|
+
declare const getKlineLatestBar: (params: Pick<GetKlineDataParams, "chainId" | "poolId" | "interval">, envParams: HttpEnvParams) => Promise<ApiResponse<KlineDataItemType>>;
|
|
813
813
|
interface GetTickerDataParams {
|
|
814
814
|
chainId: ChainId;
|
|
815
815
|
poolIds: string[];
|
|
816
|
-
isProd?: boolean;
|
|
817
816
|
}
|
|
818
|
-
declare const getTickerData: ({ chainId, poolIds
|
|
819
|
-
declare const getAllTickers: (
|
|
820
|
-
isProd?: boolean;
|
|
821
|
-
}) => Promise<ApiResponse<TickerDataItem[]>>;
|
|
817
|
+
declare const getTickerData: ({ chainId, poolIds }: GetTickerDataParams, envParams: HttpEnvParams) => Promise<ApiResponse<TickerDataItem[]>>;
|
|
818
|
+
declare const getAllTickers: (envParams: HttpEnvParams) => Promise<ApiResponse<TickerDataItem[]>>;
|
|
822
819
|
/**
|
|
823
820
|
* search
|
|
824
821
|
*/
|
|
@@ -827,25 +824,22 @@ interface SearchMarketParams {
|
|
|
827
824
|
searchType?: SearchTypeEnum;
|
|
828
825
|
type?: SearchSecondTypeEnum;
|
|
829
826
|
searchKey?: string;
|
|
830
|
-
isProd?: boolean;
|
|
831
827
|
}
|
|
832
|
-
declare const searchMarketAuth: ({ accessToken, address,
|
|
833
|
-
declare const searchMarket: ({
|
|
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>>;
|
|
834
830
|
/**
|
|
835
831
|
* favorite
|
|
836
832
|
*/
|
|
837
833
|
interface AddFavoriteParams {
|
|
838
834
|
poolId: string;
|
|
839
835
|
chainId: ChainId;
|
|
840
|
-
isProd?: boolean;
|
|
841
836
|
}
|
|
842
|
-
declare const addFavorite: ({ accessToken, address,
|
|
837
|
+
declare const addFavorite: ({ accessToken, address, ...params }: AddFavoriteParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<null>>;
|
|
843
838
|
interface RemoveFavoriteParams {
|
|
844
839
|
poolId: string;
|
|
845
840
|
chainId: ChainId;
|
|
846
|
-
isProd?: boolean;
|
|
847
841
|
}
|
|
848
|
-
declare const removeFavorite: ({ accessToken, address,
|
|
842
|
+
declare const removeFavorite: ({ accessToken, address, ...params }: RemoveFavoriteParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<null>>;
|
|
849
843
|
/**
|
|
850
844
|
* Favorites List
|
|
851
845
|
*/
|
|
@@ -857,24 +851,19 @@ interface FavoritesListParams {
|
|
|
857
851
|
limit?: number;
|
|
858
852
|
timeInterval?: FavoritesTimeInterval;
|
|
859
853
|
chainId: ChainId | 0;
|
|
860
|
-
isProd?: boolean;
|
|
861
854
|
}
|
|
862
|
-
declare const getFavoritesList: ({ accessToken, address,
|
|
855
|
+
declare const getFavoritesList: ({ accessToken, address, ...params }: FavoritesListParams & AccessTokenRequest, envParams: HttpEnvParams) => Promise<ApiResponse<FavoritesListItem[]>>;
|
|
863
856
|
interface GetBaseDetailParams {
|
|
864
857
|
chainId: ChainId;
|
|
865
858
|
poolId: string;
|
|
866
|
-
isProd?: boolean;
|
|
867
859
|
}
|
|
868
|
-
declare const getBaseDetail: ({
|
|
860
|
+
declare const getBaseDetail: ({ ...params }: GetBaseDetailParams, envParams: HttpEnvParams) => Promise<ApiResponse<BaseDetailResponse>>;
|
|
869
861
|
interface GetMarketDetailParams {
|
|
870
862
|
chainId: number;
|
|
871
863
|
poolId: string;
|
|
872
|
-
isProd?: boolean;
|
|
873
864
|
}
|
|
874
|
-
declare const getMarketDetail: ({
|
|
875
|
-
declare const getMarketList: (
|
|
876
|
-
isProd?: boolean;
|
|
877
|
-
}) => Promise<ApiResponse<MarketInfo[]>>;
|
|
865
|
+
declare const getMarketDetail: ({ ...params }: GetMarketDetailParams, envParams: HttpEnvParams) => Promise<ApiResponse<MarketDetailResponse>>;
|
|
866
|
+
declare const getMarketList: (envParams: HttpEnvParams) => Promise<ApiResponse<MarketInfo[]>>;
|
|
878
867
|
|
|
879
868
|
declare const getPoolInfo: (chainId: ChainId, poolId: string) => Promise<MarketPool | undefined>;
|
|
880
869
|
|
|
@@ -934,21 +923,21 @@ interface PreviewWithdrawDataParams {
|
|
|
934
923
|
amount: string | number;
|
|
935
924
|
}
|
|
936
925
|
|
|
937
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
938
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
926
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
927
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
939
928
|
|
|
940
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
929
|
+
declare const deposit$1: (params: Deposit) => Promise<any>;
|
|
941
930
|
|
|
942
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
931
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<any>;
|
|
943
932
|
|
|
944
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
933
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<any>;
|
|
945
934
|
|
|
946
935
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
947
|
-
baseAmountOut:
|
|
948
|
-
rebateAmount:
|
|
936
|
+
baseAmountOut: any;
|
|
937
|
+
rebateAmount: any;
|
|
949
938
|
} | undefined>;
|
|
950
939
|
|
|
951
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
940
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
952
941
|
|
|
953
942
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
954
943
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -957,18 +946,18 @@ declare namespace index$2 {
|
|
|
957
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 };
|
|
958
947
|
}
|
|
959
948
|
|
|
960
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
949
|
+
declare const deposit: (params: Deposit) => Promise<any>;
|
|
961
950
|
|
|
962
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
951
|
+
declare const withdraw: (params: WithdrawParams) => Promise<any>;
|
|
963
952
|
|
|
964
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
953
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<any>;
|
|
965
954
|
|
|
966
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
955
|
+
declare const getRewards: (params: RewardsParams) => Promise<any>;
|
|
967
956
|
|
|
968
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
969
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
957
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<any>;
|
|
958
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<any>;
|
|
970
959
|
|
|
971
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
960
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<any>;
|
|
972
961
|
|
|
973
962
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
974
963
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -981,16 +970,9 @@ declare namespace index$1 {
|
|
|
981
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 };
|
|
982
971
|
}
|
|
983
972
|
|
|
984
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
985
|
-
quoteToken: string;
|
|
986
|
-
baseReserveRatio: bigint;
|
|
987
|
-
quoteReserveRatio: bigint;
|
|
988
|
-
oracleFeeUsd: bigint;
|
|
989
|
-
oracleRefundFeeUsd: bigint;
|
|
990
|
-
poolPrimeThreshold: bigint;
|
|
991
|
-
}) | undefined>;
|
|
973
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
992
974
|
|
|
993
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
975
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<any>;
|
|
994
976
|
|
|
995
977
|
declare const index_getMarket: typeof getMarket;
|
|
996
978
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -1033,9 +1015,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
1033
1015
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
1034
1016
|
balance?: number | undefined;
|
|
1035
1017
|
address: string;
|
|
1036
|
-
name:
|
|
1037
|
-
symbol:
|
|
1038
|
-
decimals:
|
|
1018
|
+
name: any;
|
|
1019
|
+
symbol: any;
|
|
1020
|
+
decimals: any;
|
|
1039
1021
|
icon: string;
|
|
1040
1022
|
totalSupply: number;
|
|
1041
1023
|
}>;
|
|
@@ -1249,7 +1231,7 @@ interface MyxClientConfig {
|
|
|
1249
1231
|
signer?: Signer;
|
|
1250
1232
|
seamlessAccount?: {
|
|
1251
1233
|
masterAddress: string;
|
|
1252
|
-
wallet: ethers
|
|
1234
|
+
wallet: ethers.Wallet | null;
|
|
1253
1235
|
authorized: boolean;
|
|
1254
1236
|
};
|
|
1255
1237
|
walletClient?: WalletClient;
|
|
@@ -1269,7 +1251,7 @@ declare class ConfigManager {
|
|
|
1269
1251
|
clear(): void;
|
|
1270
1252
|
startSeamlessMode(open: boolean): MyxClientConfig;
|
|
1271
1253
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1272
|
-
wallet?: ethers
|
|
1254
|
+
wallet?: ethers.Wallet;
|
|
1273
1255
|
authorized?: boolean;
|
|
1274
1256
|
masterAddress?: string;
|
|
1275
1257
|
}): void;
|
|
@@ -1377,7 +1359,7 @@ declare class Utils {
|
|
|
1377
1359
|
quoteAddress: string;
|
|
1378
1360
|
amount?: string;
|
|
1379
1361
|
spenderAddress?: string;
|
|
1380
|
-
signer?: ethers
|
|
1362
|
+
signer?: ethers.Signer;
|
|
1381
1363
|
}): Promise<{
|
|
1382
1364
|
code: number;
|
|
1383
1365
|
message: any;
|
|
@@ -1420,68 +1402,7 @@ declare class Utils {
|
|
|
1420
1402
|
marketPrice: string;
|
|
1421
1403
|
}): Promise<{
|
|
1422
1404
|
code: number;
|
|
1423
|
-
data:
|
|
1424
|
-
poolToken: string;
|
|
1425
|
-
exchangeRate: bigint;
|
|
1426
|
-
poolTokenPrice: bigint;
|
|
1427
|
-
poolTokenSupply: bigint;
|
|
1428
|
-
}, [string, bigint, bigint, bigint] & {
|
|
1429
|
-
poolToken: string;
|
|
1430
|
-
exchangeRate: bigint;
|
|
1431
|
-
poolTokenPrice: bigint;
|
|
1432
|
-
poolTokenSupply: bigint;
|
|
1433
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1434
|
-
baseTotalAmount: bigint;
|
|
1435
|
-
baseReservedAmount: bigint;
|
|
1436
|
-
quoteTotalAmount: bigint;
|
|
1437
|
-
quoteReservedAmount: bigint;
|
|
1438
|
-
}, [bigint, bigint, bigint] & {
|
|
1439
|
-
nextFundingRate: bigint;
|
|
1440
|
-
lastFundingFeeTracker: bigint;
|
|
1441
|
-
nextEpochTime: bigint;
|
|
1442
|
-
}, [bigint, bigint, bigint, bigint] & {
|
|
1443
|
-
tracker: bigint;
|
|
1444
|
-
longSize: bigint;
|
|
1445
|
-
shortSize: bigint;
|
|
1446
|
-
poolEntryPrice: bigint;
|
|
1447
|
-
}, [bigint, bigint] & {
|
|
1448
|
-
windowCaps: bigint;
|
|
1449
|
-
openInterest: bigint;
|
|
1450
|
-
}] & {
|
|
1451
|
-
basePool: [string, bigint, bigint, bigint] & {
|
|
1452
|
-
poolToken: string;
|
|
1453
|
-
exchangeRate: bigint;
|
|
1454
|
-
poolTokenPrice: bigint;
|
|
1455
|
-
poolTokenSupply: bigint;
|
|
1456
|
-
};
|
|
1457
|
-
quotePool: [string, bigint, bigint, bigint] & {
|
|
1458
|
-
poolToken: string;
|
|
1459
|
-
exchangeRate: bigint;
|
|
1460
|
-
poolTokenPrice: bigint;
|
|
1461
|
-
poolTokenSupply: bigint;
|
|
1462
|
-
};
|
|
1463
|
-
reserveInfo: [bigint, bigint, bigint, bigint] & {
|
|
1464
|
-
baseTotalAmount: bigint;
|
|
1465
|
-
baseReservedAmount: bigint;
|
|
1466
|
-
quoteTotalAmount: bigint;
|
|
1467
|
-
quoteReservedAmount: bigint;
|
|
1468
|
-
};
|
|
1469
|
-
fundingInfo: [bigint, bigint, bigint] & {
|
|
1470
|
-
nextFundingRate: bigint;
|
|
1471
|
-
lastFundingFeeTracker: bigint;
|
|
1472
|
-
nextEpochTime: bigint;
|
|
1473
|
-
};
|
|
1474
|
-
oi: [bigint, bigint, bigint, bigint] & {
|
|
1475
|
-
tracker: bigint;
|
|
1476
|
-
longSize: bigint;
|
|
1477
|
-
shortSize: bigint;
|
|
1478
|
-
poolEntryPrice: bigint;
|
|
1479
|
-
};
|
|
1480
|
-
liquidityInfo: [bigint, bigint] & {
|
|
1481
|
-
windowCaps: bigint;
|
|
1482
|
-
openInterest: bigint;
|
|
1483
|
-
};
|
|
1484
|
-
};
|
|
1405
|
+
data: any;
|
|
1485
1406
|
message?: undefined;
|
|
1486
1407
|
} | {
|
|
1487
1408
|
code: number;
|
|
@@ -1639,9 +1560,9 @@ declare class Seamless {
|
|
|
1639
1560
|
private utils;
|
|
1640
1561
|
private account;
|
|
1641
1562
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
|
|
1642
|
-
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<
|
|
1563
|
+
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<any>;
|
|
1643
1564
|
getUSDPermitParams(deadline: number, chainId: number): Promise<{
|
|
1644
|
-
token: string | ethers
|
|
1565
|
+
token: string | ethers.Addressable;
|
|
1645
1566
|
owner: string;
|
|
1646
1567
|
spender: string;
|
|
1647
1568
|
value: bigint;
|
|
@@ -1658,7 +1579,7 @@ declare class Seamless {
|
|
|
1658
1579
|
deadline: number;
|
|
1659
1580
|
data: string;
|
|
1660
1581
|
nonce: string;
|
|
1661
|
-
}, chainId: number, provider?: ethers
|
|
1582
|
+
}, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1662
1583
|
authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
|
|
1663
1584
|
approve: boolean;
|
|
1664
1585
|
seamlessAddress: string;
|
|
@@ -1680,7 +1601,7 @@ declare class Seamless {
|
|
|
1680
1601
|
data: {
|
|
1681
1602
|
masterAddress: string;
|
|
1682
1603
|
seamlessAccount: string;
|
|
1683
|
-
authorized:
|
|
1604
|
+
authorized: any;
|
|
1684
1605
|
};
|
|
1685
1606
|
}>;
|
|
1686
1607
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1699,9 +1620,9 @@ declare class Seamless {
|
|
|
1699
1620
|
}): Promise<{
|
|
1700
1621
|
code: number;
|
|
1701
1622
|
data: {
|
|
1702
|
-
masterAddress:
|
|
1623
|
+
masterAddress: any;
|
|
1703
1624
|
seamlessAccount: string;
|
|
1704
|
-
authorized:
|
|
1625
|
+
authorized: any;
|
|
1705
1626
|
apiKey: string;
|
|
1706
1627
|
};
|
|
1707
1628
|
}>;
|
|
@@ -1721,7 +1642,7 @@ declare class Seamless {
|
|
|
1721
1642
|
data: {
|
|
1722
1643
|
masterAddress: string;
|
|
1723
1644
|
seamlessAccount: string;
|
|
1724
|
-
authorized:
|
|
1645
|
+
authorized: any;
|
|
1725
1646
|
apiKey: string;
|
|
1726
1647
|
};
|
|
1727
1648
|
message?: undefined;
|
|
@@ -1752,7 +1673,7 @@ declare class Position {
|
|
|
1752
1673
|
code: number;
|
|
1753
1674
|
data: PositionHistoryItem[];
|
|
1754
1675
|
}>;
|
|
1755
|
-
adjustCollateral({ poolId, positionId, adjustAmount, quoteToken, poolOracleType, chainId, address }: {
|
|
1676
|
+
adjustCollateral({ poolId, positionId, adjustAmount, quoteToken, poolOracleType, chainId, address, }: {
|
|
1756
1677
|
poolId: string;
|
|
1757
1678
|
positionId: string;
|
|
1758
1679
|
adjustAmount: string;
|
|
@@ -1810,13 +1731,13 @@ declare class Order {
|
|
|
1810
1731
|
data: {
|
|
1811
1732
|
success: boolean;
|
|
1812
1733
|
orderId: string | null;
|
|
1813
|
-
transactionHash:
|
|
1814
|
-
blockNumber:
|
|
1815
|
-
gasUsed:
|
|
1734
|
+
transactionHash: any;
|
|
1735
|
+
blockNumber: any;
|
|
1736
|
+
gasUsed: any;
|
|
1816
1737
|
status: string;
|
|
1817
1738
|
confirmations: number;
|
|
1818
1739
|
timestamp: number;
|
|
1819
|
-
receipt:
|
|
1740
|
+
receipt: any;
|
|
1820
1741
|
};
|
|
1821
1742
|
} | {
|
|
1822
1743
|
code: number;
|
|
@@ -1838,13 +1759,13 @@ declare class Order {
|
|
|
1838
1759
|
code: number;
|
|
1839
1760
|
message: string;
|
|
1840
1761
|
data: string | null;
|
|
1841
|
-
transactionHash:
|
|
1842
|
-
blockNumber:
|
|
1843
|
-
gasUsed:
|
|
1762
|
+
transactionHash: any;
|
|
1763
|
+
blockNumber: any;
|
|
1764
|
+
gasUsed: any;
|
|
1844
1765
|
status: string;
|
|
1845
1766
|
confirmations: number;
|
|
1846
1767
|
timestamp: number;
|
|
1847
|
-
receipt:
|
|
1768
|
+
receipt: any;
|
|
1848
1769
|
} | {
|
|
1849
1770
|
code: number;
|
|
1850
1771
|
message: any;
|
|
@@ -1867,13 +1788,13 @@ declare class Order {
|
|
|
1867
1788
|
data: {
|
|
1868
1789
|
success: boolean;
|
|
1869
1790
|
orderId: string | null;
|
|
1870
|
-
transactionHash:
|
|
1871
|
-
blockNumber:
|
|
1872
|
-
gasUsed:
|
|
1791
|
+
transactionHash: any;
|
|
1792
|
+
blockNumber: any;
|
|
1793
|
+
gasUsed: any;
|
|
1873
1794
|
status: string;
|
|
1874
1795
|
confirmations: number;
|
|
1875
1796
|
timestamp: number;
|
|
1876
|
-
receipt:
|
|
1797
|
+
receipt: any;
|
|
1877
1798
|
};
|
|
1878
1799
|
} | {
|
|
1879
1800
|
code: number;
|
|
@@ -1890,13 +1811,13 @@ declare class Order {
|
|
|
1890
1811
|
data: {
|
|
1891
1812
|
success: boolean;
|
|
1892
1813
|
orderId: string | null;
|
|
1893
|
-
transactionHash:
|
|
1894
|
-
blockNumber:
|
|
1895
|
-
gasUsed:
|
|
1814
|
+
transactionHash: any;
|
|
1815
|
+
blockNumber: any;
|
|
1816
|
+
gasUsed: any;
|
|
1896
1817
|
status: string;
|
|
1897
1818
|
confirmations: number;
|
|
1898
1819
|
timestamp: number;
|
|
1899
|
-
receipt:
|
|
1820
|
+
receipt: any;
|
|
1900
1821
|
};
|
|
1901
1822
|
} | {
|
|
1902
1823
|
code: number;
|
|
@@ -1922,7 +1843,7 @@ declare class Order {
|
|
|
1922
1843
|
}>;
|
|
1923
1844
|
updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
|
|
1924
1845
|
code: number;
|
|
1925
|
-
data:
|
|
1846
|
+
data: any;
|
|
1926
1847
|
message: string;
|
|
1927
1848
|
} | {
|
|
1928
1849
|
code: number;
|
|
@@ -1980,4 +1901,4 @@ declare class MyxClient {
|
|
|
1980
1901
|
getAccessToken(): Promise<string | null>;
|
|
1981
1902
|
}
|
|
1982
1903
|
|
|
1983
|
-
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, 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 };
|
|
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 };
|