@aegis-engine/core 0.4.0 → 0.6.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 +148 -26
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/actions/directPoolSwap.d.ts +1 -0
- package/dist/actions/types.d.ts +55 -0
- package/dist/aegis-core.js +201 -9568
- package/dist/contract/generated/aegis-swap.d.ts +112 -92
- package/dist/engine/actions.d.ts +46 -1
- package/dist/engine/activityLotDisplay.d.ts +8 -0
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/lendHistory.d.ts +21 -0
- package/dist/engine/positionStrategy.d.ts +15 -0
- package/dist/engine/quotes.d.ts +10 -1
- package/dist/engine/reads.d.ts +11 -2
- package/dist/engine/simpleYield.d.ts +39 -0
- package/dist/engine/trade/buildTapOpenPosition.d.ts +17 -0
- package/dist/engine/trade/route.d.ts +24 -0
- package/dist/engine/trade/sizing.d.ts +136 -0
- package/dist/engine/trade/swapLeg.d.ts +32 -0
- package/dist/engine/trade/systemState.d.ts +44 -0
- package/dist/engine/trade/units.d.ts +41 -0
- package/dist/engine/types.d.ts +328 -4
- package/dist/errors.d.ts +36 -2
- package/dist/index-D9EfUokZ.js +11031 -0
- package/dist/index.d.ts +7 -3
- package/dist/permit.d.ts +5 -0
- package/dist/{sdkRuntime-Dqr9JFXP.js → sdkRuntime-C_vaU-0g.js} +5108 -4800
- package/dist/swap/authorizePermit.d.ts +5 -1
- package/dist/swap/receiptWait.d.ts +26 -3
- package/dist/swap/sendSwapTransaction.d.ts +15 -0
- package/dist/transactionProgress.d.ts +40 -2
- package/package.json +2 -1
|
@@ -263,6 +263,16 @@ export interface components {
|
|
|
263
263
|
* @enum {string}
|
|
264
264
|
*/
|
|
265
265
|
ChainIdQuery: "1" | "130" | "8453";
|
|
266
|
+
/**
|
|
267
|
+
* @example 4663
|
|
268
|
+
* @enum {string}
|
|
269
|
+
*/
|
|
270
|
+
EngineChainIdQuery: "1" | "130" | "4663" | "8453";
|
|
271
|
+
/**
|
|
272
|
+
* @example 4663
|
|
273
|
+
* @enum {string}
|
|
274
|
+
*/
|
|
275
|
+
DataChainIdQuery: "1" | "130" | "8453" | "4663";
|
|
266
276
|
HealthResponse: {
|
|
267
277
|
/** @enum {boolean} */
|
|
268
278
|
ok: true;
|
|
@@ -406,10 +416,10 @@ export interface components {
|
|
|
406
416
|
Token: {
|
|
407
417
|
id: string;
|
|
408
418
|
/**
|
|
409
|
-
* @example
|
|
419
|
+
* @example 4663
|
|
410
420
|
* @enum {integer}
|
|
411
421
|
*/
|
|
412
|
-
chainId: 1 | 130 | 8453;
|
|
422
|
+
chainId: 1 | 130 | 8453 | 4663;
|
|
413
423
|
address: string;
|
|
414
424
|
symbol: string;
|
|
415
425
|
displayName: string;
|
|
@@ -422,10 +432,10 @@ export interface components {
|
|
|
422
432
|
TokenList: {
|
|
423
433
|
id: string;
|
|
424
434
|
/**
|
|
425
|
-
* @example
|
|
435
|
+
* @example 4663
|
|
426
436
|
* @enum {integer}
|
|
427
437
|
*/
|
|
428
|
-
chainId: 1 | 130 | 8453;
|
|
438
|
+
chainId: 1 | 130 | 8453 | 4663;
|
|
429
439
|
address: string;
|
|
430
440
|
symbol: string;
|
|
431
441
|
displayName: string;
|
|
@@ -521,10 +531,10 @@ export interface components {
|
|
|
521
531
|
}[];
|
|
522
532
|
EngineToken: {
|
|
523
533
|
/**
|
|
524
|
-
* @example
|
|
534
|
+
* @example 4663
|
|
525
535
|
* @enum {integer}
|
|
526
536
|
*/
|
|
527
|
-
chainId: 1 | 130 | 8453;
|
|
537
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
528
538
|
address: string;
|
|
529
539
|
symbol: string;
|
|
530
540
|
name: string;
|
|
@@ -619,10 +629,10 @@ export interface components {
|
|
|
619
629
|
EngineMarket: {
|
|
620
630
|
id: string;
|
|
621
631
|
/**
|
|
622
|
-
* @example
|
|
632
|
+
* @example 4663
|
|
623
633
|
* @enum {integer}
|
|
624
634
|
*/
|
|
625
|
-
chainId: 1 | 130 | 8453;
|
|
635
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
626
636
|
/** @enum {string} */
|
|
627
637
|
source: "rest";
|
|
628
638
|
/** @enum {string} */
|
|
@@ -632,10 +642,10 @@ export interface components {
|
|
|
632
642
|
poolId: string;
|
|
633
643
|
token0: {
|
|
634
644
|
/**
|
|
635
|
-
* @example
|
|
645
|
+
* @example 4663
|
|
636
646
|
* @enum {integer}
|
|
637
647
|
*/
|
|
638
|
-
chainId: 1 | 130 | 8453;
|
|
648
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
639
649
|
address: string;
|
|
640
650
|
symbol: string;
|
|
641
651
|
name: string;
|
|
@@ -646,10 +656,10 @@ export interface components {
|
|
|
646
656
|
};
|
|
647
657
|
token1: {
|
|
648
658
|
/**
|
|
649
|
-
* @example
|
|
659
|
+
* @example 4663
|
|
650
660
|
* @enum {integer}
|
|
651
661
|
*/
|
|
652
|
-
chainId: 1 | 130 | 8453;
|
|
662
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
653
663
|
address: string;
|
|
654
664
|
symbol: string;
|
|
655
665
|
name: string;
|
|
@@ -782,17 +792,17 @@ export interface components {
|
|
|
782
792
|
/** @enum {string} */
|
|
783
793
|
schemaVersion: "1";
|
|
784
794
|
/**
|
|
785
|
-
* @example
|
|
795
|
+
* @example 4663
|
|
786
796
|
* @enum {integer}
|
|
787
797
|
*/
|
|
788
|
-
chainId: 1 | 130 | 8453;
|
|
798
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
789
799
|
markets: {
|
|
790
800
|
id: string;
|
|
791
801
|
/**
|
|
792
|
-
* @example
|
|
802
|
+
* @example 4663
|
|
793
803
|
* @enum {integer}
|
|
794
804
|
*/
|
|
795
|
-
chainId: 1 | 130 | 8453;
|
|
805
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
796
806
|
/** @enum {string} */
|
|
797
807
|
source: "rest";
|
|
798
808
|
/** @enum {string} */
|
|
@@ -802,10 +812,10 @@ export interface components {
|
|
|
802
812
|
poolId: string;
|
|
803
813
|
token0: {
|
|
804
814
|
/**
|
|
805
|
-
* @example
|
|
815
|
+
* @example 4663
|
|
806
816
|
* @enum {integer}
|
|
807
817
|
*/
|
|
808
|
-
chainId: 1 | 130 | 8453;
|
|
818
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
809
819
|
address: string;
|
|
810
820
|
symbol: string;
|
|
811
821
|
name: string;
|
|
@@ -816,10 +826,10 @@ export interface components {
|
|
|
816
826
|
};
|
|
817
827
|
token1: {
|
|
818
828
|
/**
|
|
819
|
-
* @example
|
|
829
|
+
* @example 4663
|
|
820
830
|
* @enum {integer}
|
|
821
831
|
*/
|
|
822
|
-
chainId: 1 | 130 | 8453;
|
|
832
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
823
833
|
address: string;
|
|
824
834
|
symbol: string;
|
|
825
835
|
name: string;
|
|
@@ -981,10 +991,10 @@ export interface components {
|
|
|
981
991
|
EnginePosition: {
|
|
982
992
|
id: string;
|
|
983
993
|
/**
|
|
984
|
-
* @example
|
|
994
|
+
* @example 4663
|
|
985
995
|
* @enum {integer}
|
|
986
996
|
*/
|
|
987
|
-
chainId: 1 | 130 | 8453;
|
|
997
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
988
998
|
account: string;
|
|
989
999
|
vaultId: string;
|
|
990
1000
|
/** @enum {string} */
|
|
@@ -995,10 +1005,10 @@ export interface components {
|
|
|
995
1005
|
poolId: string;
|
|
996
1006
|
token0?: {
|
|
997
1007
|
/**
|
|
998
|
-
* @example
|
|
1008
|
+
* @example 4663
|
|
999
1009
|
* @enum {integer}
|
|
1000
1010
|
*/
|
|
1001
|
-
chainId: 1 | 130 | 8453;
|
|
1011
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1002
1012
|
address: string;
|
|
1003
1013
|
symbol: string;
|
|
1004
1014
|
name: string;
|
|
@@ -1009,10 +1019,10 @@ export interface components {
|
|
|
1009
1019
|
} | null;
|
|
1010
1020
|
token1?: {
|
|
1011
1021
|
/**
|
|
1012
|
-
* @example
|
|
1022
|
+
* @example 4663
|
|
1013
1023
|
* @enum {integer}
|
|
1014
1024
|
*/
|
|
1015
|
-
chainId: 1 | 130 | 8453;
|
|
1025
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1016
1026
|
address: string;
|
|
1017
1027
|
symbol: string;
|
|
1018
1028
|
name: string;
|
|
@@ -1076,10 +1086,10 @@ export interface components {
|
|
|
1076
1086
|
EngineBorrowVaultPositionV2: {
|
|
1077
1087
|
id: string;
|
|
1078
1088
|
/**
|
|
1079
|
-
* @example
|
|
1089
|
+
* @example 4663
|
|
1080
1090
|
* @enum {integer}
|
|
1081
1091
|
*/
|
|
1082
|
-
chainId: 1 | 130 | 8453;
|
|
1092
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1083
1093
|
account: string;
|
|
1084
1094
|
vaultId: string;
|
|
1085
1095
|
/** @enum {string} */
|
|
@@ -1090,10 +1100,10 @@ export interface components {
|
|
|
1090
1100
|
poolId: string;
|
|
1091
1101
|
token0?: {
|
|
1092
1102
|
/**
|
|
1093
|
-
* @example
|
|
1103
|
+
* @example 4663
|
|
1094
1104
|
* @enum {integer}
|
|
1095
1105
|
*/
|
|
1096
|
-
chainId: 1 | 130 | 8453;
|
|
1106
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1097
1107
|
address: string;
|
|
1098
1108
|
symbol: string;
|
|
1099
1109
|
name: string;
|
|
@@ -1104,10 +1114,10 @@ export interface components {
|
|
|
1104
1114
|
} | null;
|
|
1105
1115
|
token1?: {
|
|
1106
1116
|
/**
|
|
1107
|
-
* @example
|
|
1117
|
+
* @example 4663
|
|
1108
1118
|
* @enum {integer}
|
|
1109
1119
|
*/
|
|
1110
|
-
chainId: 1 | 130 | 8453;
|
|
1120
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1111
1121
|
address: string;
|
|
1112
1122
|
symbol: string;
|
|
1113
1123
|
name: string;
|
|
@@ -1176,10 +1186,10 @@ export interface components {
|
|
|
1176
1186
|
/** @example engine-lend:1:0x… */
|
|
1177
1187
|
id: string;
|
|
1178
1188
|
/**
|
|
1179
|
-
* @example
|
|
1189
|
+
* @example 4663
|
|
1180
1190
|
* @enum {integer}
|
|
1181
1191
|
*/
|
|
1182
|
-
chainId: 1 | 130 | 8453;
|
|
1192
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1183
1193
|
account: string;
|
|
1184
1194
|
marketId: string | null;
|
|
1185
1195
|
marketName: string | null;
|
|
@@ -1187,10 +1197,10 @@ export interface components {
|
|
|
1187
1197
|
poolId: string;
|
|
1188
1198
|
token0: {
|
|
1189
1199
|
/**
|
|
1190
|
-
* @example
|
|
1200
|
+
* @example 4663
|
|
1191
1201
|
* @enum {integer}
|
|
1192
1202
|
*/
|
|
1193
|
-
chainId: 1 | 130 | 8453;
|
|
1203
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1194
1204
|
address: string;
|
|
1195
1205
|
symbol: string;
|
|
1196
1206
|
name: string;
|
|
@@ -1201,10 +1211,10 @@ export interface components {
|
|
|
1201
1211
|
} | null;
|
|
1202
1212
|
token1: {
|
|
1203
1213
|
/**
|
|
1204
|
-
* @example
|
|
1214
|
+
* @example 4663
|
|
1205
1215
|
* @enum {integer}
|
|
1206
1216
|
*/
|
|
1207
|
-
chainId: 1 | 130 | 8453;
|
|
1217
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1208
1218
|
address: string;
|
|
1209
1219
|
symbol: string;
|
|
1210
1220
|
name: string;
|
|
@@ -1226,10 +1236,10 @@ export interface components {
|
|
|
1226
1236
|
EnginePositionV2: {
|
|
1227
1237
|
id: string;
|
|
1228
1238
|
/**
|
|
1229
|
-
* @example
|
|
1239
|
+
* @example 4663
|
|
1230
1240
|
* @enum {integer}
|
|
1231
1241
|
*/
|
|
1232
|
-
chainId: 1 | 130 | 8453;
|
|
1242
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1233
1243
|
account: string;
|
|
1234
1244
|
vaultId: string;
|
|
1235
1245
|
/** @enum {string} */
|
|
@@ -1240,10 +1250,10 @@ export interface components {
|
|
|
1240
1250
|
poolId: string;
|
|
1241
1251
|
token0?: {
|
|
1242
1252
|
/**
|
|
1243
|
-
* @example
|
|
1253
|
+
* @example 4663
|
|
1244
1254
|
* @enum {integer}
|
|
1245
1255
|
*/
|
|
1246
|
-
chainId: 1 | 130 | 8453;
|
|
1256
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1247
1257
|
address: string;
|
|
1248
1258
|
symbol: string;
|
|
1249
1259
|
name: string;
|
|
@@ -1254,10 +1264,10 @@ export interface components {
|
|
|
1254
1264
|
} | null;
|
|
1255
1265
|
token1?: {
|
|
1256
1266
|
/**
|
|
1257
|
-
* @example
|
|
1267
|
+
* @example 4663
|
|
1258
1268
|
* @enum {integer}
|
|
1259
1269
|
*/
|
|
1260
|
-
chainId: 1 | 130 | 8453;
|
|
1270
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1261
1271
|
address: string;
|
|
1262
1272
|
symbol: string;
|
|
1263
1273
|
name: string;
|
|
@@ -1325,10 +1335,10 @@ export interface components {
|
|
|
1325
1335
|
/** @example engine-lend:1:0x… */
|
|
1326
1336
|
id: string;
|
|
1327
1337
|
/**
|
|
1328
|
-
* @example
|
|
1338
|
+
* @example 4663
|
|
1329
1339
|
* @enum {integer}
|
|
1330
1340
|
*/
|
|
1331
|
-
chainId: 1 | 130 | 8453;
|
|
1341
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1332
1342
|
account: string;
|
|
1333
1343
|
marketId: string | null;
|
|
1334
1344
|
marketName: string | null;
|
|
@@ -1336,10 +1346,10 @@ export interface components {
|
|
|
1336
1346
|
poolId: string;
|
|
1337
1347
|
token0: {
|
|
1338
1348
|
/**
|
|
1339
|
-
* @example
|
|
1349
|
+
* @example 4663
|
|
1340
1350
|
* @enum {integer}
|
|
1341
1351
|
*/
|
|
1342
|
-
chainId: 1 | 130 | 8453;
|
|
1352
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1343
1353
|
address: string;
|
|
1344
1354
|
symbol: string;
|
|
1345
1355
|
name: string;
|
|
@@ -1350,10 +1360,10 @@ export interface components {
|
|
|
1350
1360
|
} | null;
|
|
1351
1361
|
token1: {
|
|
1352
1362
|
/**
|
|
1353
|
-
* @example
|
|
1363
|
+
* @example 4663
|
|
1354
1364
|
* @enum {integer}
|
|
1355
1365
|
*/
|
|
1356
|
-
chainId: 1 | 130 | 8453;
|
|
1366
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1357
1367
|
address: string;
|
|
1358
1368
|
symbol: string;
|
|
1359
1369
|
name: string;
|
|
@@ -1376,18 +1386,18 @@ export interface components {
|
|
|
1376
1386
|
/** @enum {string} */
|
|
1377
1387
|
schemaVersion: "1";
|
|
1378
1388
|
/**
|
|
1379
|
-
* @example
|
|
1389
|
+
* @example 4663
|
|
1380
1390
|
* @enum {integer}
|
|
1381
1391
|
*/
|
|
1382
|
-
chainId: 1 | 130 | 8453;
|
|
1392
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1383
1393
|
account: string;
|
|
1384
1394
|
positions: {
|
|
1385
1395
|
id: string;
|
|
1386
1396
|
/**
|
|
1387
|
-
* @example
|
|
1397
|
+
* @example 4663
|
|
1388
1398
|
* @enum {integer}
|
|
1389
1399
|
*/
|
|
1390
|
-
chainId: 1 | 130 | 8453;
|
|
1400
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1391
1401
|
account: string;
|
|
1392
1402
|
vaultId: string;
|
|
1393
1403
|
/** @enum {string} */
|
|
@@ -1398,10 +1408,10 @@ export interface components {
|
|
|
1398
1408
|
poolId: string;
|
|
1399
1409
|
token0?: {
|
|
1400
1410
|
/**
|
|
1401
|
-
* @example
|
|
1411
|
+
* @example 4663
|
|
1402
1412
|
* @enum {integer}
|
|
1403
1413
|
*/
|
|
1404
|
-
chainId: 1 | 130 | 8453;
|
|
1414
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1405
1415
|
address: string;
|
|
1406
1416
|
symbol: string;
|
|
1407
1417
|
name: string;
|
|
@@ -1412,10 +1422,10 @@ export interface components {
|
|
|
1412
1422
|
} | null;
|
|
1413
1423
|
token1?: {
|
|
1414
1424
|
/**
|
|
1415
|
-
* @example
|
|
1425
|
+
* @example 4663
|
|
1416
1426
|
* @enum {integer}
|
|
1417
1427
|
*/
|
|
1418
|
-
chainId: 1 | 130 | 8453;
|
|
1428
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1419
1429
|
address: string;
|
|
1420
1430
|
symbol: string;
|
|
1421
1431
|
name: string;
|
|
@@ -1492,18 +1502,18 @@ export interface components {
|
|
|
1492
1502
|
/** @enum {string} */
|
|
1493
1503
|
schemaVersion: "2";
|
|
1494
1504
|
/**
|
|
1495
|
-
* @example
|
|
1505
|
+
* @example 4663
|
|
1496
1506
|
* @enum {integer}
|
|
1497
1507
|
*/
|
|
1498
|
-
chainId: 1 | 130 | 8453;
|
|
1508
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1499
1509
|
account: string;
|
|
1500
1510
|
positions: ({
|
|
1501
1511
|
id: string;
|
|
1502
1512
|
/**
|
|
1503
|
-
* @example
|
|
1513
|
+
* @example 4663
|
|
1504
1514
|
* @enum {integer}
|
|
1505
1515
|
*/
|
|
1506
|
-
chainId: 1 | 130 | 8453;
|
|
1516
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1507
1517
|
account: string;
|
|
1508
1518
|
vaultId: string;
|
|
1509
1519
|
/** @enum {string} */
|
|
@@ -1514,10 +1524,10 @@ export interface components {
|
|
|
1514
1524
|
poolId: string;
|
|
1515
1525
|
token0?: {
|
|
1516
1526
|
/**
|
|
1517
|
-
* @example
|
|
1527
|
+
* @example 4663
|
|
1518
1528
|
* @enum {integer}
|
|
1519
1529
|
*/
|
|
1520
|
-
chainId: 1 | 130 | 8453;
|
|
1530
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1521
1531
|
address: string;
|
|
1522
1532
|
symbol: string;
|
|
1523
1533
|
name: string;
|
|
@@ -1528,10 +1538,10 @@ export interface components {
|
|
|
1528
1538
|
} | null;
|
|
1529
1539
|
token1?: {
|
|
1530
1540
|
/**
|
|
1531
|
-
* @example
|
|
1541
|
+
* @example 4663
|
|
1532
1542
|
* @enum {integer}
|
|
1533
1543
|
*/
|
|
1534
|
-
chainId: 1 | 130 | 8453;
|
|
1544
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1535
1545
|
address: string;
|
|
1536
1546
|
symbol: string;
|
|
1537
1547
|
name: string;
|
|
@@ -1599,10 +1609,10 @@ export interface components {
|
|
|
1599
1609
|
/** @example engine-lend:1:0x… */
|
|
1600
1610
|
id: string;
|
|
1601
1611
|
/**
|
|
1602
|
-
* @example
|
|
1612
|
+
* @example 4663
|
|
1603
1613
|
* @enum {integer}
|
|
1604
1614
|
*/
|
|
1605
|
-
chainId: 1 | 130 | 8453;
|
|
1615
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1606
1616
|
account: string;
|
|
1607
1617
|
marketId: string | null;
|
|
1608
1618
|
marketName: string | null;
|
|
@@ -1610,10 +1620,10 @@ export interface components {
|
|
|
1610
1620
|
poolId: string;
|
|
1611
1621
|
token0: {
|
|
1612
1622
|
/**
|
|
1613
|
-
* @example
|
|
1623
|
+
* @example 4663
|
|
1614
1624
|
* @enum {integer}
|
|
1615
1625
|
*/
|
|
1616
|
-
chainId: 1 | 130 | 8453;
|
|
1626
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1617
1627
|
address: string;
|
|
1618
1628
|
symbol: string;
|
|
1619
1629
|
name: string;
|
|
@@ -1624,10 +1634,10 @@ export interface components {
|
|
|
1624
1634
|
} | null;
|
|
1625
1635
|
token1: {
|
|
1626
1636
|
/**
|
|
1627
|
-
* @example
|
|
1637
|
+
* @example 4663
|
|
1628
1638
|
* @enum {integer}
|
|
1629
1639
|
*/
|
|
1630
|
-
chainId: 1 | 130 | 8453;
|
|
1640
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
1631
1641
|
address: string;
|
|
1632
1642
|
symbol: string;
|
|
1633
1643
|
name: string;
|
|
@@ -2242,10 +2252,10 @@ export interface components {
|
|
|
2242
2252
|
/** @enum {string} */
|
|
2243
2253
|
schemaVersion: "1";
|
|
2244
2254
|
/**
|
|
2245
|
-
* @example
|
|
2255
|
+
* @example 4663
|
|
2246
2256
|
* @enum {integer}
|
|
2247
2257
|
*/
|
|
2248
|
-
chainId: 1 | 130 | 8453;
|
|
2258
|
+
chainId: 1 | 130 | 4663 | 8453;
|
|
2249
2259
|
account: string;
|
|
2250
2260
|
marketState: {
|
|
2251
2261
|
marketId: string | null;
|
|
@@ -2874,6 +2884,16 @@ export interface components {
|
|
|
2874
2884
|
* @example 130
|
|
2875
2885
|
*/
|
|
2876
2886
|
ChainIdQuery: components["schemas"]["ChainIdQuery"];
|
|
2887
|
+
/**
|
|
2888
|
+
* @description Engine/data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
2889
|
+
* @example 4663
|
|
2890
|
+
*/
|
|
2891
|
+
EngineChainIdQuery: components["schemas"]["EngineChainIdQuery"];
|
|
2892
|
+
/**
|
|
2893
|
+
* @description Curated-data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
2894
|
+
* @example 4663
|
|
2895
|
+
*/
|
|
2896
|
+
DataChainIdQuery: components["schemas"]["DataChainIdQuery"];
|
|
2877
2897
|
/**
|
|
2878
2898
|
* @description Comma-separated EVM token addresses.
|
|
2879
2899
|
* @example 0x078d782b760474a361dda0af3839290b0ef57ad6,0x83f31af747189c2fa9e5deb253200c505eff6ed2
|
|
@@ -2969,10 +2989,10 @@ export interface operations {
|
|
|
2969
2989
|
parameters: {
|
|
2970
2990
|
query: {
|
|
2971
2991
|
/**
|
|
2972
|
-
* @description
|
|
2973
|
-
* @example
|
|
2992
|
+
* @description Curated-data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
2993
|
+
* @example 4663
|
|
2974
2994
|
*/
|
|
2975
|
-
chainId: components["parameters"]["
|
|
2995
|
+
chainId: components["parameters"]["DataChainIdQuery"];
|
|
2976
2996
|
};
|
|
2977
2997
|
header?: never;
|
|
2978
2998
|
path?: never;
|
|
@@ -2997,10 +3017,10 @@ export interface operations {
|
|
|
2997
3017
|
parameters: {
|
|
2998
3018
|
query: {
|
|
2999
3019
|
/**
|
|
3000
|
-
* @description
|
|
3001
|
-
* @example
|
|
3020
|
+
* @description Curated-data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
3021
|
+
* @example 4663
|
|
3002
3022
|
*/
|
|
3003
|
-
chainId: components["parameters"]["
|
|
3023
|
+
chainId: components["parameters"]["DataChainIdQuery"];
|
|
3004
3024
|
/**
|
|
3005
3025
|
* @description Comma-separated EVM token addresses.
|
|
3006
3026
|
* @example 0x078d782b760474a361dda0af3839290b0ef57ad6,0x83f31af747189c2fa9e5deb253200c505eff6ed2
|
|
@@ -3131,10 +3151,10 @@ export interface operations {
|
|
|
3131
3151
|
parameters: {
|
|
3132
3152
|
query: {
|
|
3133
3153
|
/**
|
|
3134
|
-
* @description
|
|
3135
|
-
* @example
|
|
3154
|
+
* @description Engine/data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
3155
|
+
* @example 4663
|
|
3136
3156
|
*/
|
|
3137
|
-
chainId: components["parameters"]["
|
|
3157
|
+
chainId: components["parameters"]["EngineChainIdQuery"];
|
|
3138
3158
|
};
|
|
3139
3159
|
header?: never;
|
|
3140
3160
|
path?: never;
|
|
@@ -3159,10 +3179,10 @@ export interface operations {
|
|
|
3159
3179
|
parameters: {
|
|
3160
3180
|
query: {
|
|
3161
3181
|
/**
|
|
3162
|
-
* @description
|
|
3163
|
-
* @example
|
|
3182
|
+
* @description Engine/data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
3183
|
+
* @example 4663
|
|
3164
3184
|
*/
|
|
3165
|
-
chainId: components["parameters"]["
|
|
3185
|
+
chainId: components["parameters"]["EngineChainIdQuery"];
|
|
3166
3186
|
/**
|
|
3167
3187
|
* @description Wallet address whose Engine positions should be returned.
|
|
3168
3188
|
* @example 0x8a5c4fa037a583b057be7a46e7e94ec496702f25
|
|
@@ -3192,10 +3212,10 @@ export interface operations {
|
|
|
3192
3212
|
parameters: {
|
|
3193
3213
|
query: {
|
|
3194
3214
|
/**
|
|
3195
|
-
* @description
|
|
3196
|
-
* @example
|
|
3215
|
+
* @description Engine/data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
3216
|
+
* @example 4663
|
|
3197
3217
|
*/
|
|
3198
|
-
chainId: components["parameters"]["
|
|
3218
|
+
chainId: components["parameters"]["EngineChainIdQuery"];
|
|
3199
3219
|
/**
|
|
3200
3220
|
* @description Wallet address whose Engine positions should be returned.
|
|
3201
3221
|
* @example 0x8a5c4fa037a583b057be7a46e7e94ec496702f25
|
|
@@ -3225,10 +3245,10 @@ export interface operations {
|
|
|
3225
3245
|
parameters: {
|
|
3226
3246
|
query: {
|
|
3227
3247
|
/**
|
|
3228
|
-
* @description
|
|
3229
|
-
* @example
|
|
3248
|
+
* @description Engine/data chain ID as a string query parameter. JSON response bodies use numeric chainId values.
|
|
3249
|
+
* @example 4663
|
|
3230
3250
|
*/
|
|
3231
|
-
chainId: components["parameters"]["
|
|
3251
|
+
chainId: components["parameters"]["EngineChainIdQuery"];
|
|
3232
3252
|
/**
|
|
3233
3253
|
* @description Wallet address whose Engine activity ledger should be returned — every vault and lend action the account has made, including burned vaults and fully withdrawn lend positions.
|
|
3234
3254
|
* @example 0x8a5c4fa037a583b057be7a46e7e94ec496702f25
|
package/dist/engine/actions.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import { type Address, type Hex } from 'viem';
|
|
2
|
-
import
|
|
2
|
+
import { readPermit2RouterAllowance } from '../permit.js';
|
|
3
|
+
import type { AegisEngineActionCallbacks, AegisEngineApprovalInput, AegisEngineAuthorizationPlan, AegisEngineAuthorizationPlanInput, AegisEngineMarket, AegisEnginePositionTarget, AegisEngineSendInput, AegisEngineSignedPermitBatch, AegisEngineTransactionResult } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Mode-aware satisfaction for the ERC-20 → Permit2 grant. `exact` asks
|
|
6
|
+
* whether the current draft is covered; `max` asks whether the standing
|
|
7
|
+
* allowance is effectively unlimited — the check the "No limit" toggle
|
|
8
|
+
* reports, so it must not pass on a merely amount-covering grant.
|
|
9
|
+
*/
|
|
10
|
+
export declare function engineTokenGrantSatisfies(args: {
|
|
11
|
+
currentAmount: bigint;
|
|
12
|
+
spendAmount: bigint;
|
|
13
|
+
approvalMode: 'exact' | 'max';
|
|
14
|
+
}): boolean;
|
|
15
|
+
/** Mode-aware satisfaction for the Permit2 → router cap. `max` requires an
|
|
16
|
+
* effectively unlimited amount that is also not about to expire. */
|
|
17
|
+
export declare function enginePermit2GrantSatisfies(args: {
|
|
18
|
+
allowance: Awaited<ReturnType<typeof readPermit2RouterAllowance>>;
|
|
19
|
+
spendAmount: bigint;
|
|
20
|
+
approvalMode: 'exact' | 'max';
|
|
21
|
+
}): boolean;
|
|
3
22
|
export type AegisEnginePositionRouterAuthorizationInput = {
|
|
4
23
|
wallet: AegisEngineSendInput['wallet'];
|
|
5
24
|
publicClient: AegisEngineSendInput['publicClient'];
|
|
@@ -8,9 +27,35 @@ export type AegisEnginePositionRouterAuthorizationInput = {
|
|
|
8
27
|
target: AegisEnginePositionTarget;
|
|
9
28
|
/** Exact ERC-6909 share allowance required for a lender-position action. */
|
|
10
29
|
amount?: bigint;
|
|
30
|
+
/** Cancels preparation before the authorization transaction is broadcast. */
|
|
31
|
+
signal?: AegisEngineSendInput['signal'];
|
|
11
32
|
onStatus?: AegisEngineActionCallbacks['onStatus'];
|
|
12
33
|
onTxHash?: AegisEngineActionCallbacks['onTxHash'];
|
|
13
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Read the wallet actions required to open a fresh Long/Short position.
|
|
37
|
+
*
|
|
38
|
+
* Trade-open only. The plan always includes blanket vault-operator
|
|
39
|
+
* (`isApprovedForAll`, no `vaultId`) plus the final open. ERC-20→Permit2 and
|
|
40
|
+
* Permit2→router appear only for non-native collateral. This is not a borrow,
|
|
41
|
+
* lend-deposit, or lend-redeem plan: those operations have different
|
|
42
|
+
* on-chain gates and must not reuse this result.
|
|
43
|
+
*
|
|
44
|
+
* Amount 0 is a glance read: Access and already-granted token allowances are
|
|
45
|
+
* still reported. Exact-mode amount-sized grants are omitted until the deposit
|
|
46
|
+
* is known — never invented as a 0 exact allowance.
|
|
47
|
+
*
|
|
48
|
+
* Presentation-safe planning, not authorization evidence for a send.
|
|
49
|
+
* The submit boundary must still re-read every permission and obtain a fresh
|
|
50
|
+
* executable quote after prerequisite receipts are mined.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readEngineAuthorizationPlan(args: AegisEngineAuthorizationPlanInput): Promise<AegisEngineAuthorizationPlan>;
|
|
53
|
+
/** Grants only the ERC-20 allowance from the token to Permit2. */
|
|
54
|
+
export declare function approveEngineTokenToPermit2(args: AegisEngineApprovalInput): Promise<{
|
|
55
|
+
approvalHash: Hex | null;
|
|
56
|
+
}>;
|
|
57
|
+
/** Grants only the Permit2 spending cap from Permit2 to the Engine router. */
|
|
58
|
+
export declare function approveEnginePermit2ToRouter(args: AegisEngineApprovalInput): Promise<void>;
|
|
14
59
|
export declare function prepareEnginePermit(args: AegisEngineApprovalInput): Promise<{
|
|
15
60
|
approvalHash: Hex | null;
|
|
16
61
|
permit: AegisEngineSignedPermitBatch | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AegisEngineActivityLotDisplay, AegisEngineActivityMarketState, AegisEnginePositionActivitySnapshot, AegisEnginePositionVaultActivity } from './types.js';
|
|
2
|
+
/** Indexed lot facts from the account activity ledger already loaded for
|
|
3
|
+
* Long/Short identity. Interest uses the market's last-step borrow index,
|
|
4
|
+
* not a live RPC debt read. */
|
|
5
|
+
export declare function deriveEngineActivityLotDisplay(vault: AegisEnginePositionVaultActivity, market: AegisEngineActivityMarketState | null | undefined): AegisEngineActivityLotDisplay;
|
|
6
|
+
/** Attaches indexed lot display fields to every vault on a parsed REST
|
|
7
|
+
* snapshot. One walk of the ledger already in memory — no second fetch. */
|
|
8
|
+
export declare function attachEngineActivityLotDisplays(snapshot: AegisEnginePositionActivitySnapshot): AegisEnginePositionActivitySnapshot;
|
package/dist/engine/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export * from './types.js';
|
|
2
|
+
export * from './activityLotDisplay.js';
|
|
2
3
|
export * from './dataSource.js';
|
|
4
|
+
export * from './lendHistory.js';
|
|
5
|
+
export * from './simpleYield.js';
|
|
3
6
|
export * from './marketAdapter.js';
|
|
4
7
|
export * from './registry.js';
|
|
5
8
|
export * from './reads.js';
|
|
6
9
|
export * from './quotes.js';
|
|
7
10
|
export * from './actions.js';
|
|
8
11
|
export * from './positionAmounts.js';
|
|
12
|
+
export * from './positionStrategy.js';
|