-
Notifications
You must be signed in to change notification settings - Fork 14
/
types.ts
39 lines (36 loc) · 1.02 KB
/
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
import { Route } from "./client";
import { BridgeRouteErrors } from "./client/models/BridgeRouteErrors";
import { QuotePreferences } from "./client/models/QuoteRequest";
import { RefuelData } from "./client/models/RefuelData";
import { Path } from "./path";
/**
* The parameters for a quote request
*/
export interface QuoteParams {
/** The path desired */
path: Path;
/** Amount of the quote */
amount: string;
/** User address */
address: string;
}
/**
* Quote parameters and the retrieved route
*/
export interface SocketQuote extends QuoteParams {
/** The route retrieved for the quote */
route: Route;
/** Refuel Data */
refuel?: RefuelData;
/** Errors */
errors: BridgeRouteErrors;
}
/** Sdk options */
export interface SocketOptions {
/** The socket api key */
apiKey: string;
/** How often in ms to poll for status updates when checking transactions */
statusCheckInterval?: number;
/** The preferences used when retrieving quotes from the api */
defaultQuotePreferences?: QuotePreferences;
}