@myx-trade/sdk 0.1.85 → 0.1.88
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 +84 -79
- package/dist/index.d.ts +84 -79
- package/dist/index.js +4 -15
- package/dist/index.mjs +4 -15
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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';
|
|
@@ -8,9 +9,6 @@ declare enum ChainId {
|
|
|
8
9
|
LINEA_MAINNET = 59144,
|
|
9
10
|
ARB_TESTNET = 421614,
|
|
10
11
|
ARB_MAINNET = 42161,
|
|
11
|
-
OPBNB_TESTNET = 5611,
|
|
12
|
-
OPBNB_MAINNET = 204,
|
|
13
|
-
SCROLL_MAINNET = 534352,
|
|
14
12
|
BSC_TESTNET = 97,
|
|
15
13
|
BSC_MAINNET = 56
|
|
16
14
|
}
|
|
@@ -51,49 +49,49 @@ interface CancelTpSLParams {
|
|
|
51
49
|
orderId: string;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
52
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
|
|
55
53
|
|
|
56
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
57
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
54
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
|
|
55
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
|
|
58
56
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
59
57
|
quotePool: {
|
|
60
|
-
poolToken:
|
|
61
|
-
exchangeRate:
|
|
62
|
-
poolTokenPrice:
|
|
63
|
-
poolTokenSupply:
|
|
58
|
+
poolToken: string;
|
|
59
|
+
exchangeRate: bigint;
|
|
60
|
+
poolTokenPrice: bigint;
|
|
61
|
+
poolTokenSupply: bigint;
|
|
64
62
|
};
|
|
65
63
|
basePool: {
|
|
66
|
-
poolToken:
|
|
67
|
-
exchangeRate:
|
|
68
|
-
poolTokenPrice:
|
|
69
|
-
poolTokenSupply:
|
|
64
|
+
poolToken: string;
|
|
65
|
+
exchangeRate: bigint;
|
|
66
|
+
poolTokenPrice: bigint;
|
|
67
|
+
poolTokenSupply: bigint;
|
|
70
68
|
};
|
|
71
69
|
reserveInfo: {
|
|
72
|
-
baseTotalAmount:
|
|
73
|
-
baseReservedAmount:
|
|
74
|
-
quoteTotalAmount:
|
|
75
|
-
quoteReservedAmount:
|
|
70
|
+
baseTotalAmount: bigint;
|
|
71
|
+
baseReservedAmount: bigint;
|
|
72
|
+
quoteTotalAmount: bigint;
|
|
73
|
+
quoteReservedAmount: bigint;
|
|
76
74
|
};
|
|
77
75
|
fundingInfo: {
|
|
78
|
-
nextFundingRate:
|
|
79
|
-
lastFundingFeeTracker:
|
|
80
|
-
nextEpochTime:
|
|
76
|
+
nextFundingRate: bigint;
|
|
77
|
+
lastFundingFeeTracker: bigint;
|
|
78
|
+
nextEpochTime: bigint;
|
|
81
79
|
};
|
|
82
80
|
ioTracker: {
|
|
83
|
-
tracker:
|
|
84
|
-
longSize:
|
|
85
|
-
shortSize:
|
|
86
|
-
poolEntryPrice:
|
|
81
|
+
tracker: bigint;
|
|
82
|
+
longSize: bigint;
|
|
83
|
+
shortSize: bigint;
|
|
84
|
+
poolEntryPrice: bigint;
|
|
87
85
|
};
|
|
88
86
|
}>;
|
|
89
87
|
|
|
90
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
88
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
|
|
91
89
|
|
|
92
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
90
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
93
91
|
|
|
94
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
92
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
95
93
|
|
|
96
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
94
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
97
95
|
|
|
98
96
|
/**
|
|
99
97
|
* Trading related types and enums
|
|
@@ -873,21 +871,21 @@ interface PreviewWithdrawDataParams {
|
|
|
873
871
|
amount: string | number;
|
|
874
872
|
}
|
|
875
873
|
|
|
876
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
877
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
874
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
875
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
878
876
|
|
|
879
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
877
|
+
declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
880
878
|
|
|
881
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
879
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
882
880
|
|
|
883
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
881
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
884
882
|
|
|
885
883
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
886
|
-
baseAmountOut:
|
|
887
|
-
rebateAmount:
|
|
884
|
+
baseAmountOut: bigint;
|
|
885
|
+
rebateAmount: bigint;
|
|
888
886
|
} | undefined>;
|
|
889
887
|
|
|
890
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
888
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
891
889
|
|
|
892
890
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
893
891
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -896,18 +894,18 @@ declare namespace index$2 {
|
|
|
896
894
|
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 };
|
|
897
895
|
}
|
|
898
896
|
|
|
899
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
897
|
+
declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
900
898
|
|
|
901
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
899
|
+
declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
902
900
|
|
|
903
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
901
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
|
|
904
902
|
|
|
905
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
903
|
+
declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
906
904
|
|
|
907
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
908
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
905
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
906
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
909
907
|
|
|
910
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
908
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
911
909
|
|
|
912
910
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
913
911
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -920,9 +918,16 @@ declare namespace index$1 {
|
|
|
920
918
|
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 };
|
|
921
919
|
}
|
|
922
920
|
|
|
923
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
921
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
|
|
922
|
+
quoteToken: string;
|
|
923
|
+
baseReserveRatio: bigint;
|
|
924
|
+
quoteReserveRatio: bigint;
|
|
925
|
+
oracleFeeUsd: bigint;
|
|
926
|
+
oracleRefundFeeUsd: bigint;
|
|
927
|
+
poolPrimeThreshold: bigint;
|
|
928
|
+
}) | undefined>;
|
|
924
929
|
|
|
925
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
930
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
|
|
926
931
|
|
|
927
932
|
declare const index_getMarket: typeof getMarket;
|
|
928
933
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -965,9 +970,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
965
970
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
966
971
|
balance?: number | undefined;
|
|
967
972
|
address: string;
|
|
968
|
-
name:
|
|
969
|
-
symbol:
|
|
970
|
-
decimals:
|
|
973
|
+
name: string;
|
|
974
|
+
symbol: string;
|
|
975
|
+
decimals: bigint;
|
|
971
976
|
icon: string;
|
|
972
977
|
totalSupply: number;
|
|
973
978
|
}>;
|
|
@@ -1181,7 +1186,7 @@ interface MyxClientConfig {
|
|
|
1181
1186
|
signer?: Signer;
|
|
1182
1187
|
seamlessAccount?: {
|
|
1183
1188
|
masterAddress: string;
|
|
1184
|
-
wallet: ethers.Wallet | null;
|
|
1189
|
+
wallet: ethers$1.Wallet | null;
|
|
1185
1190
|
authorized: boolean;
|
|
1186
1191
|
};
|
|
1187
1192
|
walletClient?: WalletClient;
|
|
@@ -1201,7 +1206,7 @@ declare class ConfigManager {
|
|
|
1201
1206
|
clear(): void;
|
|
1202
1207
|
startSeamlessMode(open: boolean): void;
|
|
1203
1208
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1204
|
-
wallet?: ethers.Wallet;
|
|
1209
|
+
wallet?: ethers$1.Wallet;
|
|
1205
1210
|
authorized?: boolean;
|
|
1206
1211
|
masterAddress?: string;
|
|
1207
1212
|
}): void;
|
|
@@ -1355,10 +1360,10 @@ declare class Markets {
|
|
|
1355
1360
|
/**
|
|
1356
1361
|
* kline start
|
|
1357
1362
|
*/
|
|
1358
|
-
getKlineList({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime"> & {
|
|
1363
|
+
getKlineList({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime" | 'chainId'> & {
|
|
1359
1364
|
interval: KlineResolution;
|
|
1360
1365
|
}): Promise<KlineDataItemType[]>;
|
|
1361
|
-
getKlineLatestBar({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime"> & {
|
|
1366
|
+
getKlineLatestBar({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime" | 'chainId'> & {
|
|
1362
1367
|
interval: KlineResolution;
|
|
1363
1368
|
}): Promise<KlineDataItemType>;
|
|
1364
1369
|
/**
|
|
@@ -1367,7 +1372,7 @@ declare class Markets {
|
|
|
1367
1372
|
/**
|
|
1368
1373
|
* ticker start
|
|
1369
1374
|
*/
|
|
1370
|
-
getTickerList(params:
|
|
1375
|
+
getTickerList(params: GetTickerDataParams): Promise<TickerDataItem[]>;
|
|
1371
1376
|
/**
|
|
1372
1377
|
* ticker end
|
|
1373
1378
|
*/
|
|
@@ -1520,9 +1525,9 @@ declare class Seamless {
|
|
|
1520
1525
|
private utils;
|
|
1521
1526
|
private account;
|
|
1522
1527
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
|
|
1523
|
-
onCheckRelayer(account: string, relayer: string): Promise<
|
|
1528
|
+
onCheckRelayer(account: string, relayer: string): Promise<boolean>;
|
|
1524
1529
|
getUSDPermitParams(deadline: number): Promise<{
|
|
1525
|
-
token: string | ethers.Addressable;
|
|
1530
|
+
token: string | ethers$1.Addressable;
|
|
1526
1531
|
owner: Promise<string> | undefined;
|
|
1527
1532
|
spender: string;
|
|
1528
1533
|
value: bigint;
|
|
@@ -1539,7 +1544,7 @@ declare class Seamless {
|
|
|
1539
1544
|
deadline: number;
|
|
1540
1545
|
data: string;
|
|
1541
1546
|
nonce: string;
|
|
1542
|
-
}, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1547
|
+
}, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
|
|
1543
1548
|
authorizeSeamlessAccount({ approve, seamlessAddress }: {
|
|
1544
1549
|
approve: boolean;
|
|
1545
1550
|
seamlessAddress: string;
|
|
@@ -1559,7 +1564,7 @@ declare class Seamless {
|
|
|
1559
1564
|
data: {
|
|
1560
1565
|
masterAddress: string;
|
|
1561
1566
|
seamlessAccount: string;
|
|
1562
|
-
authorized:
|
|
1567
|
+
authorized: boolean;
|
|
1563
1568
|
};
|
|
1564
1569
|
}>;
|
|
1565
1570
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1577,9 +1582,9 @@ declare class Seamless {
|
|
|
1577
1582
|
}): Promise<{
|
|
1578
1583
|
code: number;
|
|
1579
1584
|
data: {
|
|
1580
|
-
masterAddress:
|
|
1585
|
+
masterAddress: string;
|
|
1581
1586
|
seamlessAccount: string;
|
|
1582
|
-
authorized:
|
|
1587
|
+
authorized: boolean;
|
|
1583
1588
|
apiKey: string;
|
|
1584
1589
|
};
|
|
1585
1590
|
}>;
|
|
@@ -1598,7 +1603,7 @@ declare class Seamless {
|
|
|
1598
1603
|
data: {
|
|
1599
1604
|
masterAddress: string;
|
|
1600
1605
|
seamlessAccount: string;
|
|
1601
|
-
authorized:
|
|
1606
|
+
authorized: boolean;
|
|
1602
1607
|
apiKey: string;
|
|
1603
1608
|
};
|
|
1604
1609
|
message?: undefined;
|
|
@@ -1625,13 +1630,13 @@ declare class Order {
|
|
|
1625
1630
|
data: {
|
|
1626
1631
|
success: boolean;
|
|
1627
1632
|
orderId: string | null;
|
|
1628
|
-
transactionHash:
|
|
1629
|
-
blockNumber:
|
|
1630
|
-
gasUsed:
|
|
1633
|
+
transactionHash: string;
|
|
1634
|
+
blockNumber: number | undefined;
|
|
1635
|
+
gasUsed: string | undefined;
|
|
1631
1636
|
status: string;
|
|
1632
1637
|
confirmations: number;
|
|
1633
1638
|
timestamp: number;
|
|
1634
|
-
receipt:
|
|
1639
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1635
1640
|
};
|
|
1636
1641
|
} | {
|
|
1637
1642
|
code: number;
|
|
@@ -1642,13 +1647,13 @@ declare class Order {
|
|
|
1642
1647
|
code: number;
|
|
1643
1648
|
message: string;
|
|
1644
1649
|
data: string | null;
|
|
1645
|
-
transactionHash:
|
|
1646
|
-
blockNumber:
|
|
1647
|
-
gasUsed:
|
|
1650
|
+
transactionHash: string;
|
|
1651
|
+
blockNumber: number | undefined;
|
|
1652
|
+
gasUsed: string | undefined;
|
|
1648
1653
|
status: string;
|
|
1649
1654
|
confirmations: number;
|
|
1650
1655
|
timestamp: number;
|
|
1651
|
-
receipt:
|
|
1656
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1652
1657
|
} | {
|
|
1653
1658
|
code: number;
|
|
1654
1659
|
message: any;
|
|
@@ -1667,13 +1672,13 @@ declare class Order {
|
|
|
1667
1672
|
data: {
|
|
1668
1673
|
success: boolean;
|
|
1669
1674
|
orderId: string | null;
|
|
1670
|
-
transactionHash:
|
|
1671
|
-
blockNumber:
|
|
1672
|
-
gasUsed:
|
|
1675
|
+
transactionHash: string;
|
|
1676
|
+
blockNumber: number | undefined;
|
|
1677
|
+
gasUsed: string | undefined;
|
|
1673
1678
|
status: string;
|
|
1674
1679
|
confirmations: number;
|
|
1675
1680
|
timestamp: number;
|
|
1676
|
-
receipt:
|
|
1681
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1677
1682
|
};
|
|
1678
1683
|
} | {
|
|
1679
1684
|
code: number;
|
|
@@ -1686,13 +1691,13 @@ declare class Order {
|
|
|
1686
1691
|
data: {
|
|
1687
1692
|
success: boolean;
|
|
1688
1693
|
orderId: string | null;
|
|
1689
|
-
transactionHash:
|
|
1690
|
-
blockNumber:
|
|
1691
|
-
gasUsed:
|
|
1694
|
+
transactionHash: string;
|
|
1695
|
+
blockNumber: number | undefined;
|
|
1696
|
+
gasUsed: string | undefined;
|
|
1692
1697
|
status: string;
|
|
1693
1698
|
confirmations: number;
|
|
1694
1699
|
timestamp: number;
|
|
1695
|
-
receipt:
|
|
1700
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1696
1701
|
};
|
|
1697
1702
|
} | {
|
|
1698
1703
|
code: number;
|
|
@@ -1713,7 +1718,7 @@ declare class Order {
|
|
|
1713
1718
|
}>;
|
|
1714
1719
|
updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
|
|
1715
1720
|
code: number;
|
|
1716
|
-
data:
|
|
1721
|
+
data: ethers$1.ContractTransactionReceipt | null;
|
|
1717
1722
|
message: string;
|
|
1718
1723
|
} | {
|
|
1719
1724
|
code: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
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';
|
|
@@ -8,9 +9,6 @@ declare enum ChainId {
|
|
|
8
9
|
LINEA_MAINNET = 59144,
|
|
9
10
|
ARB_TESTNET = 421614,
|
|
10
11
|
ARB_MAINNET = 42161,
|
|
11
|
-
OPBNB_TESTNET = 5611,
|
|
12
|
-
OPBNB_MAINNET = 204,
|
|
13
|
-
SCROLL_MAINNET = 534352,
|
|
14
12
|
BSC_TESTNET = 97,
|
|
15
13
|
BSC_MAINNET = 56
|
|
16
14
|
}
|
|
@@ -51,49 +49,49 @@ interface CancelTpSLParams {
|
|
|
51
49
|
orderId: string;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
52
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
|
|
55
53
|
|
|
56
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
57
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
54
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
|
|
55
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
|
|
58
56
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
59
57
|
quotePool: {
|
|
60
|
-
poolToken:
|
|
61
|
-
exchangeRate:
|
|
62
|
-
poolTokenPrice:
|
|
63
|
-
poolTokenSupply:
|
|
58
|
+
poolToken: string;
|
|
59
|
+
exchangeRate: bigint;
|
|
60
|
+
poolTokenPrice: bigint;
|
|
61
|
+
poolTokenSupply: bigint;
|
|
64
62
|
};
|
|
65
63
|
basePool: {
|
|
66
|
-
poolToken:
|
|
67
|
-
exchangeRate:
|
|
68
|
-
poolTokenPrice:
|
|
69
|
-
poolTokenSupply:
|
|
64
|
+
poolToken: string;
|
|
65
|
+
exchangeRate: bigint;
|
|
66
|
+
poolTokenPrice: bigint;
|
|
67
|
+
poolTokenSupply: bigint;
|
|
70
68
|
};
|
|
71
69
|
reserveInfo: {
|
|
72
|
-
baseTotalAmount:
|
|
73
|
-
baseReservedAmount:
|
|
74
|
-
quoteTotalAmount:
|
|
75
|
-
quoteReservedAmount:
|
|
70
|
+
baseTotalAmount: bigint;
|
|
71
|
+
baseReservedAmount: bigint;
|
|
72
|
+
quoteTotalAmount: bigint;
|
|
73
|
+
quoteReservedAmount: bigint;
|
|
76
74
|
};
|
|
77
75
|
fundingInfo: {
|
|
78
|
-
nextFundingRate:
|
|
79
|
-
lastFundingFeeTracker:
|
|
80
|
-
nextEpochTime:
|
|
76
|
+
nextFundingRate: bigint;
|
|
77
|
+
lastFundingFeeTracker: bigint;
|
|
78
|
+
nextEpochTime: bigint;
|
|
81
79
|
};
|
|
82
80
|
ioTracker: {
|
|
83
|
-
tracker:
|
|
84
|
-
longSize:
|
|
85
|
-
shortSize:
|
|
86
|
-
poolEntryPrice:
|
|
81
|
+
tracker: bigint;
|
|
82
|
+
longSize: bigint;
|
|
83
|
+
shortSize: bigint;
|
|
84
|
+
poolEntryPrice: bigint;
|
|
87
85
|
};
|
|
88
86
|
}>;
|
|
89
87
|
|
|
90
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
88
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
|
|
91
89
|
|
|
92
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
90
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
93
91
|
|
|
94
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
92
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
95
93
|
|
|
96
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
94
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
97
95
|
|
|
98
96
|
/**
|
|
99
97
|
* Trading related types and enums
|
|
@@ -873,21 +871,21 @@ interface PreviewWithdrawDataParams {
|
|
|
873
871
|
amount: string | number;
|
|
874
872
|
}
|
|
875
873
|
|
|
876
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
877
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
874
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
875
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
878
876
|
|
|
879
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
877
|
+
declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
880
878
|
|
|
881
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
879
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
882
880
|
|
|
883
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
881
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
884
882
|
|
|
885
883
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
886
|
-
baseAmountOut:
|
|
887
|
-
rebateAmount:
|
|
884
|
+
baseAmountOut: bigint;
|
|
885
|
+
rebateAmount: bigint;
|
|
888
886
|
} | undefined>;
|
|
889
887
|
|
|
890
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
888
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
891
889
|
|
|
892
890
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
893
891
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -896,18 +894,18 @@ declare namespace index$2 {
|
|
|
896
894
|
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 };
|
|
897
895
|
}
|
|
898
896
|
|
|
899
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
897
|
+
declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
900
898
|
|
|
901
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
899
|
+
declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
902
900
|
|
|
903
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
901
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
|
|
904
902
|
|
|
905
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
903
|
+
declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
906
904
|
|
|
907
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
908
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
905
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
906
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
909
907
|
|
|
910
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
908
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
911
909
|
|
|
912
910
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
913
911
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -920,9 +918,16 @@ declare namespace index$1 {
|
|
|
920
918
|
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 };
|
|
921
919
|
}
|
|
922
920
|
|
|
923
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
921
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
|
|
922
|
+
quoteToken: string;
|
|
923
|
+
baseReserveRatio: bigint;
|
|
924
|
+
quoteReserveRatio: bigint;
|
|
925
|
+
oracleFeeUsd: bigint;
|
|
926
|
+
oracleRefundFeeUsd: bigint;
|
|
927
|
+
poolPrimeThreshold: bigint;
|
|
928
|
+
}) | undefined>;
|
|
924
929
|
|
|
925
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
930
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
|
|
926
931
|
|
|
927
932
|
declare const index_getMarket: typeof getMarket;
|
|
928
933
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -965,9 +970,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
965
970
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
966
971
|
balance?: number | undefined;
|
|
967
972
|
address: string;
|
|
968
|
-
name:
|
|
969
|
-
symbol:
|
|
970
|
-
decimals:
|
|
973
|
+
name: string;
|
|
974
|
+
symbol: string;
|
|
975
|
+
decimals: bigint;
|
|
971
976
|
icon: string;
|
|
972
977
|
totalSupply: number;
|
|
973
978
|
}>;
|
|
@@ -1181,7 +1186,7 @@ interface MyxClientConfig {
|
|
|
1181
1186
|
signer?: Signer;
|
|
1182
1187
|
seamlessAccount?: {
|
|
1183
1188
|
masterAddress: string;
|
|
1184
|
-
wallet: ethers.Wallet | null;
|
|
1189
|
+
wallet: ethers$1.Wallet | null;
|
|
1185
1190
|
authorized: boolean;
|
|
1186
1191
|
};
|
|
1187
1192
|
walletClient?: WalletClient;
|
|
@@ -1201,7 +1206,7 @@ declare class ConfigManager {
|
|
|
1201
1206
|
clear(): void;
|
|
1202
1207
|
startSeamlessMode(open: boolean): void;
|
|
1203
1208
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1204
|
-
wallet?: ethers.Wallet;
|
|
1209
|
+
wallet?: ethers$1.Wallet;
|
|
1205
1210
|
authorized?: boolean;
|
|
1206
1211
|
masterAddress?: string;
|
|
1207
1212
|
}): void;
|
|
@@ -1355,10 +1360,10 @@ declare class Markets {
|
|
|
1355
1360
|
/**
|
|
1356
1361
|
* kline start
|
|
1357
1362
|
*/
|
|
1358
|
-
getKlineList({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime"> & {
|
|
1363
|
+
getKlineList({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime" | 'chainId'> & {
|
|
1359
1364
|
interval: KlineResolution;
|
|
1360
1365
|
}): Promise<KlineDataItemType[]>;
|
|
1361
|
-
getKlineLatestBar({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime"> & {
|
|
1366
|
+
getKlineLatestBar({ interval, ...params }: Pick<GetKlineDataParams, "poolId" | "limit" | "endTime" | 'chainId'> & {
|
|
1362
1367
|
interval: KlineResolution;
|
|
1363
1368
|
}): Promise<KlineDataItemType>;
|
|
1364
1369
|
/**
|
|
@@ -1367,7 +1372,7 @@ declare class Markets {
|
|
|
1367
1372
|
/**
|
|
1368
1373
|
* ticker start
|
|
1369
1374
|
*/
|
|
1370
|
-
getTickerList(params:
|
|
1375
|
+
getTickerList(params: GetTickerDataParams): Promise<TickerDataItem[]>;
|
|
1371
1376
|
/**
|
|
1372
1377
|
* ticker end
|
|
1373
1378
|
*/
|
|
@@ -1520,9 +1525,9 @@ declare class Seamless {
|
|
|
1520
1525
|
private utils;
|
|
1521
1526
|
private account;
|
|
1522
1527
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account);
|
|
1523
|
-
onCheckRelayer(account: string, relayer: string): Promise<
|
|
1528
|
+
onCheckRelayer(account: string, relayer: string): Promise<boolean>;
|
|
1524
1529
|
getUSDPermitParams(deadline: number): Promise<{
|
|
1525
|
-
token: string | ethers.Addressable;
|
|
1530
|
+
token: string | ethers$1.Addressable;
|
|
1526
1531
|
owner: Promise<string> | undefined;
|
|
1527
1532
|
spender: string;
|
|
1528
1533
|
value: bigint;
|
|
@@ -1539,7 +1544,7 @@ declare class Seamless {
|
|
|
1539
1544
|
deadline: number;
|
|
1540
1545
|
data: string;
|
|
1541
1546
|
nonce: string;
|
|
1542
|
-
}, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1547
|
+
}, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
|
|
1543
1548
|
authorizeSeamlessAccount({ approve, seamlessAddress }: {
|
|
1544
1549
|
approve: boolean;
|
|
1545
1550
|
seamlessAddress: string;
|
|
@@ -1559,7 +1564,7 @@ declare class Seamless {
|
|
|
1559
1564
|
data: {
|
|
1560
1565
|
masterAddress: string;
|
|
1561
1566
|
seamlessAccount: string;
|
|
1562
|
-
authorized:
|
|
1567
|
+
authorized: boolean;
|
|
1563
1568
|
};
|
|
1564
1569
|
}>;
|
|
1565
1570
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1577,9 +1582,9 @@ declare class Seamless {
|
|
|
1577
1582
|
}): Promise<{
|
|
1578
1583
|
code: number;
|
|
1579
1584
|
data: {
|
|
1580
|
-
masterAddress:
|
|
1585
|
+
masterAddress: string;
|
|
1581
1586
|
seamlessAccount: string;
|
|
1582
|
-
authorized:
|
|
1587
|
+
authorized: boolean;
|
|
1583
1588
|
apiKey: string;
|
|
1584
1589
|
};
|
|
1585
1590
|
}>;
|
|
@@ -1598,7 +1603,7 @@ declare class Seamless {
|
|
|
1598
1603
|
data: {
|
|
1599
1604
|
masterAddress: string;
|
|
1600
1605
|
seamlessAccount: string;
|
|
1601
|
-
authorized:
|
|
1606
|
+
authorized: boolean;
|
|
1602
1607
|
apiKey: string;
|
|
1603
1608
|
};
|
|
1604
1609
|
message?: undefined;
|
|
@@ -1625,13 +1630,13 @@ declare class Order {
|
|
|
1625
1630
|
data: {
|
|
1626
1631
|
success: boolean;
|
|
1627
1632
|
orderId: string | null;
|
|
1628
|
-
transactionHash:
|
|
1629
|
-
blockNumber:
|
|
1630
|
-
gasUsed:
|
|
1633
|
+
transactionHash: string;
|
|
1634
|
+
blockNumber: number | undefined;
|
|
1635
|
+
gasUsed: string | undefined;
|
|
1631
1636
|
status: string;
|
|
1632
1637
|
confirmations: number;
|
|
1633
1638
|
timestamp: number;
|
|
1634
|
-
receipt:
|
|
1639
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1635
1640
|
};
|
|
1636
1641
|
} | {
|
|
1637
1642
|
code: number;
|
|
@@ -1642,13 +1647,13 @@ declare class Order {
|
|
|
1642
1647
|
code: number;
|
|
1643
1648
|
message: string;
|
|
1644
1649
|
data: string | null;
|
|
1645
|
-
transactionHash:
|
|
1646
|
-
blockNumber:
|
|
1647
|
-
gasUsed:
|
|
1650
|
+
transactionHash: string;
|
|
1651
|
+
blockNumber: number | undefined;
|
|
1652
|
+
gasUsed: string | undefined;
|
|
1648
1653
|
status: string;
|
|
1649
1654
|
confirmations: number;
|
|
1650
1655
|
timestamp: number;
|
|
1651
|
-
receipt:
|
|
1656
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1652
1657
|
} | {
|
|
1653
1658
|
code: number;
|
|
1654
1659
|
message: any;
|
|
@@ -1667,13 +1672,13 @@ declare class Order {
|
|
|
1667
1672
|
data: {
|
|
1668
1673
|
success: boolean;
|
|
1669
1674
|
orderId: string | null;
|
|
1670
|
-
transactionHash:
|
|
1671
|
-
blockNumber:
|
|
1672
|
-
gasUsed:
|
|
1675
|
+
transactionHash: string;
|
|
1676
|
+
blockNumber: number | undefined;
|
|
1677
|
+
gasUsed: string | undefined;
|
|
1673
1678
|
status: string;
|
|
1674
1679
|
confirmations: number;
|
|
1675
1680
|
timestamp: number;
|
|
1676
|
-
receipt:
|
|
1681
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1677
1682
|
};
|
|
1678
1683
|
} | {
|
|
1679
1684
|
code: number;
|
|
@@ -1686,13 +1691,13 @@ declare class Order {
|
|
|
1686
1691
|
data: {
|
|
1687
1692
|
success: boolean;
|
|
1688
1693
|
orderId: string | null;
|
|
1689
|
-
transactionHash:
|
|
1690
|
-
blockNumber:
|
|
1691
|
-
gasUsed:
|
|
1694
|
+
transactionHash: string;
|
|
1695
|
+
blockNumber: number | undefined;
|
|
1696
|
+
gasUsed: string | undefined;
|
|
1692
1697
|
status: string;
|
|
1693
1698
|
confirmations: number;
|
|
1694
1699
|
timestamp: number;
|
|
1695
|
-
receipt:
|
|
1700
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1696
1701
|
};
|
|
1697
1702
|
} | {
|
|
1698
1703
|
code: number;
|
|
@@ -1713,7 +1718,7 @@ declare class Order {
|
|
|
1713
1718
|
}>;
|
|
1714
1719
|
updateOrderTpSl(params: UpdateOrderParams, chainId: number): Promise<{
|
|
1715
1720
|
code: number;
|
|
1716
|
-
data:
|
|
1721
|
+
data: ethers$1.ContractTransactionReceipt | null;
|
|
1717
1722
|
message: string;
|
|
1718
1723
|
} | {
|
|
1719
1724
|
code: number;
|
package/dist/index.js
CHANGED
|
@@ -1456,9 +1456,6 @@ var ChainId = /* @__PURE__ */ ((ChainId3) => {
|
|
|
1456
1456
|
ChainId3[ChainId3["LINEA_MAINNET"] = 59144] = "LINEA_MAINNET";
|
|
1457
1457
|
ChainId3[ChainId3["ARB_TESTNET"] = 421614] = "ARB_TESTNET";
|
|
1458
1458
|
ChainId3[ChainId3["ARB_MAINNET"] = 42161] = "ARB_MAINNET";
|
|
1459
|
-
ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
|
|
1460
|
-
ChainId3[ChainId3["OPBNB_MAINNET"] = 204] = "OPBNB_MAINNET";
|
|
1461
|
-
ChainId3[ChainId3["SCROLL_MAINNET"] = 534352] = "SCROLL_MAINNET";
|
|
1462
1459
|
ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
|
|
1463
1460
|
ChainId3[ChainId3["BSC_MAINNET"] = 56] = "BSC_MAINNET";
|
|
1464
1461
|
return ChainId3;
|
|
@@ -1841,7 +1838,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1841
1838
|
// package.json
|
|
1842
1839
|
var package_default = {
|
|
1843
1840
|
name: "@myx-trade/sdk",
|
|
1844
|
-
version: "0.1.
|
|
1841
|
+
version: "0.1.88",
|
|
1845
1842
|
private: false,
|
|
1846
1843
|
publishConfig: {
|
|
1847
1844
|
access: "public"
|
|
@@ -13834,22 +13831,18 @@ var Markets = class {
|
|
|
13834
13831
|
interval,
|
|
13835
13832
|
...params
|
|
13836
13833
|
}) {
|
|
13837
|
-
const config = this.configManager.getConfig();
|
|
13838
13834
|
return (await getKlineData({
|
|
13839
13835
|
...params,
|
|
13840
|
-
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13841
|
-
chainId: config?.chainId
|
|
13836
|
+
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13842
13837
|
})).data;
|
|
13843
13838
|
}
|
|
13844
13839
|
async getKlineLatestBar({
|
|
13845
13840
|
interval,
|
|
13846
13841
|
...params
|
|
13847
13842
|
}) {
|
|
13848
|
-
const config = this.configManager.getConfig();
|
|
13849
13843
|
return (await getKlineLatestBar({
|
|
13850
13844
|
...params,
|
|
13851
|
-
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13852
|
-
chainId: config?.chainId
|
|
13845
|
+
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13853
13846
|
})).data;
|
|
13854
13847
|
}
|
|
13855
13848
|
/**
|
|
@@ -13859,11 +13852,7 @@ var Markets = class {
|
|
|
13859
13852
|
* ticker start
|
|
13860
13853
|
*/
|
|
13861
13854
|
async getTickerList(params) {
|
|
13862
|
-
|
|
13863
|
-
return (await getTickerData({
|
|
13864
|
-
...params,
|
|
13865
|
-
chainId: config?.chainId
|
|
13866
|
-
})).data;
|
|
13855
|
+
return (await getTickerData(params)).data;
|
|
13867
13856
|
}
|
|
13868
13857
|
/**
|
|
13869
13858
|
* ticker end
|
package/dist/index.mjs
CHANGED
|
@@ -1361,9 +1361,6 @@ var ChainId = /* @__PURE__ */ ((ChainId3) => {
|
|
|
1361
1361
|
ChainId3[ChainId3["LINEA_MAINNET"] = 59144] = "LINEA_MAINNET";
|
|
1362
1362
|
ChainId3[ChainId3["ARB_TESTNET"] = 421614] = "ARB_TESTNET";
|
|
1363
1363
|
ChainId3[ChainId3["ARB_MAINNET"] = 42161] = "ARB_MAINNET";
|
|
1364
|
-
ChainId3[ChainId3["OPBNB_TESTNET"] = 5611] = "OPBNB_TESTNET";
|
|
1365
|
-
ChainId3[ChainId3["OPBNB_MAINNET"] = 204] = "OPBNB_MAINNET";
|
|
1366
|
-
ChainId3[ChainId3["SCROLL_MAINNET"] = 534352] = "SCROLL_MAINNET";
|
|
1367
1364
|
ChainId3[ChainId3["BSC_TESTNET"] = 97] = "BSC_TESTNET";
|
|
1368
1365
|
ChainId3[ChainId3["BSC_MAINNET"] = 56] = "BSC_MAINNET";
|
|
1369
1366
|
return ChainId3;
|
|
@@ -1752,7 +1749,7 @@ var RotationProvider = class extends BaseProvider {
|
|
|
1752
1749
|
// package.json
|
|
1753
1750
|
var package_default = {
|
|
1754
1751
|
name: "@myx-trade/sdk",
|
|
1755
|
-
version: "0.1.
|
|
1752
|
+
version: "0.1.88",
|
|
1756
1753
|
private: false,
|
|
1757
1754
|
publishConfig: {
|
|
1758
1755
|
access: "public"
|
|
@@ -13745,22 +13742,18 @@ var Markets = class {
|
|
|
13745
13742
|
interval,
|
|
13746
13743
|
...params
|
|
13747
13744
|
}) {
|
|
13748
|
-
const config = this.configManager.getConfig();
|
|
13749
13745
|
return (await getKlineData({
|
|
13750
13746
|
...params,
|
|
13751
|
-
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13752
|
-
chainId: config?.chainId
|
|
13747
|
+
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13753
13748
|
})).data;
|
|
13754
13749
|
}
|
|
13755
13750
|
async getKlineLatestBar({
|
|
13756
13751
|
interval,
|
|
13757
13752
|
...params
|
|
13758
13753
|
}) {
|
|
13759
|
-
const config = this.configManager.getConfig();
|
|
13760
13754
|
return (await getKlineLatestBar({
|
|
13761
13755
|
...params,
|
|
13762
|
-
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13763
|
-
chainId: config?.chainId
|
|
13756
|
+
interval: this.utils.transferKlineResolutionToInterval(interval)
|
|
13764
13757
|
})).data;
|
|
13765
13758
|
}
|
|
13766
13759
|
/**
|
|
@@ -13770,11 +13763,7 @@ var Markets = class {
|
|
|
13770
13763
|
* ticker start
|
|
13771
13764
|
*/
|
|
13772
13765
|
async getTickerList(params) {
|
|
13773
|
-
|
|
13774
|
-
return (await getTickerData({
|
|
13775
|
-
...params,
|
|
13776
|
-
chainId: config?.chainId
|
|
13777
|
-
})).data;
|
|
13766
|
+
return (await getTickerData(params)).data;
|
|
13778
13767
|
}
|
|
13779
13768
|
/**
|
|
13780
13769
|
* ticker end
|