@aegis-engine/core 0.10.0 → 0.12.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 CHANGED
@@ -583,6 +583,16 @@ const quote = await fetchAggregatedSwapQuote(
583
583
  )
584
584
  ```
585
585
 
586
+ `AggregatedSwapQuote.priceImpact` is `number | null`: an omitted provider impact
587
+ remains unavailable, while an explicitly reported zero remains zero. Kyber routes
588
+ report no impact field, so it is derived from Kyber's USD values as
589
+ `(amountInUsd - grossOutUsd) / amountInUsd`, where `grossOutUsd` adds the Aegis
590
+ output fee back to `amountOutUsd` (covers market impact and pool fees; excludes
591
+ the Aegis fee and gas)
592
+ and is `null` when either value is missing or zero. Hosts must handle `null`
593
+ before formatting the value. The Widget displays it as “Unavailable” with a
594
+ warning tone.
595
+
586
596
  For a display-only quote, omit the account. For executable calldata, pass the
587
597
  user account:
588
598
 
@@ -616,6 +626,17 @@ carry the `uniswap-v4-aegis` tag. It checks this before build and, in
616
626
  hop is tagged with any other source, it throws `NoAegisRouteError`
617
627
  (`reason: 'no-route' | 'non-aegis-leg'`).
618
628
 
629
+ Ink (57073) has no Kyber coverage, so it uses an in-house provider that accepts
630
+ only `liquiditySources: 'aegis'` (`'any'` is rejected). It enumerates every path
631
+ of up to three hops through the shipped Ink pool catalogue, quotes all of them
632
+ (at most 32) in one Multicall3 `eth_call` to the V4 quoter, and takes the best
633
+ output net of the 50 bps fee. Pass a `publicClient` (the eighth argument) to
634
+ reuse your RPC. The swap goes to the Aegis router, which pulls input through
635
+ Permit2: `executeKyberSwap` approves Permit2 for the exact input, signs a
636
+ Permit2 grant for the router, re-quotes, and simulates before sending. The
637
+ calldata ends with a fixed `TAKE` of the reviewed minimum, so a short fill
638
+ reverts.
639
+
619
640
  ## KyberSwap Execution
620
641
 
621
642
  ```ts
package/dist/abis.d.ts CHANGED
@@ -114,6 +114,22 @@ export declare const PERMIT2_ABI: readonly [{
114
114
  readonly type: "uint48";
115
115
  }];
116
116
  }];
117
+ export declare const V4_PATH_KEY_COMPONENTS: readonly [{
118
+ readonly name: "intermediateCurrency";
119
+ readonly type: "address";
120
+ }, {
121
+ readonly name: "fee";
122
+ readonly type: "uint24";
123
+ }, {
124
+ readonly name: "tickSpacing";
125
+ readonly type: "int24";
126
+ }, {
127
+ readonly name: "hooks";
128
+ readonly type: "address";
129
+ }, {
130
+ readonly name: "hookData";
131
+ readonly type: "bytes";
132
+ }];
117
133
  export declare const UNISWAP_V4_QUOTER_ABI: readonly [{
118
134
  readonly type: "function";
119
135
  readonly name: "quoteExactInputSingle";
@@ -202,4 +218,45 @@ export declare const UNISWAP_V4_QUOTER_ABI: readonly [{
202
218
  readonly name: "gasEstimate";
203
219
  readonly type: "uint256";
204
220
  }];
221
+ }, {
222
+ readonly type: "function";
223
+ readonly name: "quoteExactInput";
224
+ readonly stateMutability: "nonpayable";
225
+ readonly inputs: readonly [{
226
+ readonly name: "params";
227
+ readonly type: "tuple";
228
+ readonly components: readonly [{
229
+ readonly name: "exactCurrency";
230
+ readonly type: "address";
231
+ }, {
232
+ readonly name: "path";
233
+ readonly type: "tuple[]";
234
+ readonly components: readonly [{
235
+ readonly name: "intermediateCurrency";
236
+ readonly type: "address";
237
+ }, {
238
+ readonly name: "fee";
239
+ readonly type: "uint24";
240
+ }, {
241
+ readonly name: "tickSpacing";
242
+ readonly type: "int24";
243
+ }, {
244
+ readonly name: "hooks";
245
+ readonly type: "address";
246
+ }, {
247
+ readonly name: "hookData";
248
+ readonly type: "bytes";
249
+ }];
250
+ }, {
251
+ readonly name: "exactAmount";
252
+ readonly type: "uint128";
253
+ }];
254
+ }];
255
+ readonly outputs: readonly [{
256
+ readonly name: "amountOut";
257
+ readonly type: "uint256";
258
+ }, {
259
+ readonly name: "gasEstimate";
260
+ readonly type: "uint256";
261
+ }];
205
262
  }];
package/dist/account.js CHANGED
@@ -1,5 +1,5 @@
1
- import { w as u, o as b, n as A, s as I, l as P, E as g, A as h, r as f, a as x, i as c, b as E, c as S, d as C, e as _, P as T, f as D } from "./transactionHistory-D3PDVGkr.js";
2
- import { g as M, h as j, j as J, k as O, m as U, p as G, q as Z, t as Q, u as V, v as W, x as X, y as Y, z as ee, B as ae, C as oe, D as se, F as ne, G as te, H as re } from "./transactionHistory-D3PDVGkr.js";
1
+ import { w as u, o as b, n as A, s as I, l as P, E as g, A as h, r as f, a as x, i as c, b as E, c as S, d as C, e as _, P as T, f as D } from "./transactionHistory-B-F6o9hW.js";
2
+ import { g as M, h as j, j as J, k as O, m as U, p as G, q as Z, t as Q, u as V, v as W, x as X, y as Y, z as ee, B as ae, C as oe, D as se, F as ne, G as te, H as re } from "./transactionHistory-B-F6o9hW.js";
3
3
  import { keccak256 as k, encodeAbiParameters as y } from "viem";
4
4
  const H = b({ version: P(1), snapshotId: I().uuid(), page: A().int().min(1).max(95) }).strict();
5
5
  function v(e) {