@aegis-engine/core 0.11.0 → 0.13.0
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 +36 -2
- package/dist/account.js +2 -2
- package/dist/actions/kyberSwap.d.ts +5 -0
- package/dist/aegis-core.js +2715 -2657
- package/dist/contract/generated/aegis-swap.d.ts +167 -10
- package/dist/contract/generated/market-data.d.ts +333 -21
- package/dist/engine/account/portfolioSchemas.d.ts +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/quote/aggregatedSwapQuote.d.ts +13 -3
- package/dist/{sdkRuntime-Dcfu-Hbw.js → sdkRuntime-Dra77GTA.js} +1 -1
- package/dist/{transactionHistory-B-F6o9hW.js → transactionHistory-CFVVYJeo.js} +1318 -1318
- package/dist/types/aggregatedSwap.d.ts +27 -1
- package/package.json +1 -1
|
@@ -7,6 +7,21 @@ export type HopInfo = {
|
|
|
7
7
|
outputToken: AegisSwapToken;
|
|
8
8
|
part: number;
|
|
9
9
|
};
|
|
10
|
+
/** One pool swap of a quoted route, as the route provider reported it. */
|
|
11
|
+
export type AggregatedSwapRouteLeg = {
|
|
12
|
+
/** Provider pool identifier (the pool id for Uniswap v4 pools). */
|
|
13
|
+
pool: string;
|
|
14
|
+
tokenIn: Address;
|
|
15
|
+
tokenOut: Address;
|
|
16
|
+
/** Provider liquidity source tag, e.g. `uniswap-v4-aegis`. */
|
|
17
|
+
source: string;
|
|
18
|
+
};
|
|
19
|
+
/** Sequential legs fed by one share of the input; split routes have several. */
|
|
20
|
+
export type AggregatedSwapRoutePath = {
|
|
21
|
+
/** Input routed through this path, when the provider reports it. */
|
|
22
|
+
amountIn?: bigint;
|
|
23
|
+
legs: AggregatedSwapRouteLeg[];
|
|
24
|
+
};
|
|
10
25
|
export type AggregatedSwapQuote = {
|
|
11
26
|
inputToken: AegisSwapToken;
|
|
12
27
|
outputToken: AegisSwapToken;
|
|
@@ -14,6 +29,12 @@ export type AggregatedSwapQuote = {
|
|
|
14
29
|
amountOut: bigint;
|
|
15
30
|
gasEstimate: bigint;
|
|
16
31
|
hops: HopInfo[];
|
|
32
|
+
/**
|
|
33
|
+
* Display-only route structure from the provider. Absent unless every path
|
|
34
|
+
* it reported is complete and chained. Execution never reads it; the
|
|
35
|
+
* calldata is pinned to the quote separately.
|
|
36
|
+
*/
|
|
37
|
+
routePaths?: AggregatedSwapRoutePath[];
|
|
17
38
|
/**
|
|
18
39
|
* Liquidity set the route was requested and validated under. `'aegis'`
|
|
19
40
|
* quotes passed the all-Aegis leg check; execution in Aegis-only mode
|
|
@@ -37,7 +58,12 @@ export type AggregatedSwapQuote = {
|
|
|
37
58
|
*/
|
|
38
59
|
expiresAt?: string;
|
|
39
60
|
transactionValue: bigint;
|
|
40
|
-
|
|
61
|
+
/**
|
|
62
|
+
* Fraction of value lost (positive is adverse). Provider-reported when
|
|
63
|
+
* present; for Kyber, derived from its USD values with the Aegis output fee added
|
|
64
|
+
* back (market impact and pool fees; excludes the Aegis fee and gas). Null when neither source is available.
|
|
65
|
+
*/
|
|
66
|
+
priceImpact: number | null;
|
|
41
67
|
feeAmount: bigint;
|
|
42
68
|
feeBps: number;
|
|
43
69
|
feeRecipient: Address | null;
|