-
Notifications
You must be signed in to change notification settings - Fork 14
/
QuoteRequest.ts
38 lines (35 loc) · 1.21 KB
/
QuoteRequest.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
import { SocketPreferences } from "./SocketPreferences";
export enum SortOptions {
Output = "output",
Gas = "gas",
Time = "time",
}
export interface QuotePreferences extends SocketPreferences {
/** Flag to return only best route per bridge using the sort criteria **/
uniqueRoutesPerBridge?: boolean;
/** Param to sort routes based on. **/
sort?: SortOptions;
/** Maximum number of transactions.
* This option will be ignored if singleTxOnly is marked as true. **/
maxUserTxs?: string;
/** Only get quotes with that are compatible with contracts **/
isContractCall?: boolean;
/** include gas transfer with bridging tx **/
bridgeWithGas?: boolean;
}
export interface QuoteRequest extends QuotePreferences {
/** Chain id of source chain. **/
fromChainId: number;
/** Token address on source chain. **/
fromTokenAddress: string;
/** Chain id of destination chain. **/
toChainId: number;
/** Token address on destination chain. **/
toTokenAddress: string;
/** Amount of sending tokens. **/
fromAmount: string;
/** Address of user. This will be used to check approvals. **/
userAddress: string;
/** Address of recipient. This will be used to check approvals. **/
recipient?: string;
}