-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtypes.ts
43 lines (36 loc) · 803 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import Token from 'class/Token';
import { HDNodeWallet, Wallet } from 'ethers';
enum Version {
V2,
V3,
}
enum Action {
Buy,
Sell,
}
type SwapRequest = {
action: Action;
amountIn: number;
token: Token;
};
type ExactInputSingleParams = {
tokenIn: string;
tokenOut: string;
fee: number;
recipient: string;
deadline: number;
amountIn: string;
amountOutMinimum: string;
sqrtPriceLimitX96: number;
};
type Slot0 = {
sqrtPriceX96: bigint;
tick: bigint;
observationIndex: bigint;
observationCardinality: bigint;
observationCardinalityNext: bigint;
feeProtocol: bigint;
unlocked: boolean;
};
type UserWallet = Wallet | HDNodeWallet;
export { Action, Version, SwapRequest, ExactInputSingleParams, Slot0, UserWallet };