@dhedge/v2-sdk 2.1.5 → 2.1.6
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/README.md +180 -45
- package/dist/config.d.ts +2 -0
- package/dist/entities/pool.d.ts +110 -1
- package/dist/services/hyperliquid/constants.d.ts +16 -0
- package/dist/services/hyperliquid/index.d.ts +6 -0
- package/dist/services/hyperliquid/marketData.d.ts +12 -0
- package/dist/services/hyperliquid/positionData.d.ts +1 -0
- package/dist/services/toros/limitOrder.d.ts +8 -0
- package/dist/test/constants.d.ts +7 -1
- package/dist/test/wallet.d.ts +1 -0
- package/dist/types.d.ts +12 -2
- package/dist/v2-sdk.cjs.development.js +1470 -32
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +1449 -12
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/abi/hyperliquid/ICoreDepositWallet.json +130 -0
- package/src/abi/hyperliquid/ICoreWriter.json +1 -0
- package/src/abi/toros/IPoolLimitOrderManager.json +78 -0
- package/src/config.ts +31 -9
- package/src/entities/pool.ts +348 -4
- package/src/services/hyperliquid/constants.ts +23 -0
- package/src/services/hyperliquid/index.ts +176 -0
- package/src/services/hyperliquid/marketData.ts +157 -0
- package/src/services/hyperliquid/positionData.ts +33 -0
- package/src/services/toros/limitOrder.ts +86 -0
- package/src/test/constants.ts +11 -5
- package/src/test/hyperliquid.test.ts +107 -0
- package/src/test/pool.test.ts +37 -45
- package/src/test/torosLimitOrder.test.ts +130 -0
- package/src/test/wallet.ts +2 -1
- package/src/types.ts +13 -2
package/src/types.ts
CHANGED
|
@@ -7,7 +7,8 @@ export enum Network {
|
|
|
7
7
|
ARBITRUM = "arbitrum",
|
|
8
8
|
BASE = "base",
|
|
9
9
|
ETHEREUM = "ethereum",
|
|
10
|
-
PLASMA = "plasma"
|
|
10
|
+
PLASMA = "plasma",
|
|
11
|
+
HYPERLIQUID = "hyperliquid"
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export enum Dapp {
|
|
@@ -33,7 +34,8 @@ export enum Dapp {
|
|
|
33
34
|
COMPOUNDV3 = "compoundV3",
|
|
34
35
|
ODOS = "odos",
|
|
35
36
|
PENDLE = "pendle",
|
|
36
|
-
KYBERSWAP = "kyberswap"
|
|
37
|
+
KYBERSWAP = "kyberswap",
|
|
38
|
+
HYPERLIQUID = "hyperliquid"
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export enum Transaction {
|
|
@@ -111,3 +113,12 @@ export type SDKOptions =
|
|
|
111
113
|
useTraderAddressAsFrom?: boolean;
|
|
112
114
|
}
|
|
113
115
|
| boolean; // shorthand for { estimateGas: true/false }; for backward compatibility
|
|
116
|
+
|
|
117
|
+
export type LimitOrderInfo = {
|
|
118
|
+
amount: BigNumber;
|
|
119
|
+
stopLossPriceD18: BigNumber;
|
|
120
|
+
takeProfitPriceD18: BigNumber;
|
|
121
|
+
user: string;
|
|
122
|
+
pool: string;
|
|
123
|
+
pricingAsset: string;
|
|
124
|
+
};
|