@avail-project/ca-common 2.2.0 → 2.2.1
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.
|
@@ -19,9 +19,11 @@ class FibrousAggregator {
|
|
|
19
19
|
static BASE_URL = "https://api.fibrous.finance";
|
|
20
20
|
axios;
|
|
21
21
|
slippage;
|
|
22
|
+
excludeProtocols;
|
|
22
23
|
constructor(options = {}) {
|
|
23
|
-
const { apiKey, slippage = 0.5 } = options;
|
|
24
|
+
const { apiKey, slippage = 0.5, excludeProtocols = "3" } = options;
|
|
24
25
|
this.slippage = slippage;
|
|
26
|
+
this.excludeProtocols = excludeProtocols;
|
|
25
27
|
this.axios = axios_1.default.create({
|
|
26
28
|
baseURL: FibrousAggregator.BASE_URL,
|
|
27
29
|
headers: apiKey != null ? { "X-API-Key": apiKey } : undefined,
|
|
@@ -57,6 +59,7 @@ class FibrousAggregator {
|
|
|
57
59
|
tokenOutAddress: outputTokenAddr,
|
|
58
60
|
slippage: this.slippage,
|
|
59
61
|
destination: receiverAddrHex,
|
|
62
|
+
excludeProtocols: this.excludeProtocols,
|
|
60
63
|
},
|
|
61
64
|
});
|
|
62
65
|
}
|
|
@@ -15,9 +15,11 @@ export class FibrousAggregator {
|
|
|
15
15
|
static BASE_URL = "https://api.fibrous.finance";
|
|
16
16
|
axios;
|
|
17
17
|
slippage;
|
|
18
|
+
excludeProtocols;
|
|
18
19
|
constructor(options = {}) {
|
|
19
|
-
const { apiKey, slippage = 0.5 } = options;
|
|
20
|
+
const { apiKey, slippage = 0.5, excludeProtocols = "3" } = options;
|
|
20
21
|
this.slippage = slippage;
|
|
22
|
+
this.excludeProtocols = excludeProtocols;
|
|
21
23
|
this.axios = axios.create({
|
|
22
24
|
baseURL: FibrousAggregator.BASE_URL,
|
|
23
25
|
headers: apiKey != null ? { "X-API-Key": apiKey } : undefined,
|
|
@@ -53,6 +55,7 @@ export class FibrousAggregator {
|
|
|
53
55
|
tokenOutAddress: outputTokenAddr,
|
|
54
56
|
slippage: this.slippage,
|
|
55
57
|
destination: receiverAddrHex,
|
|
58
|
+
excludeProtocols: this.excludeProtocols,
|
|
56
59
|
},
|
|
57
60
|
});
|
|
58
61
|
}
|
|
@@ -44,11 +44,13 @@ export type FibrousQuote = Quote & {
|
|
|
44
44
|
export type FibrousAggregatorOptions = {
|
|
45
45
|
apiKey?: string;
|
|
46
46
|
slippage?: number;
|
|
47
|
+
excludeProtocols?: string;
|
|
47
48
|
};
|
|
48
49
|
export declare class FibrousAggregator implements Aggregator {
|
|
49
50
|
private static readonly BASE_URL;
|
|
50
51
|
private readonly axios;
|
|
51
52
|
private readonly slippage;
|
|
53
|
+
private readonly excludeProtocols;
|
|
52
54
|
constructor(options?: FibrousAggregatorOptions);
|
|
53
55
|
getQuotes(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[]): Promise<(Quote | null)[]>;
|
|
54
56
|
}
|