@1delta/lender-registry 0.0.23 → 0.0.24
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/dist/getters.d.ts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -1
- package/dist/index.mjs +7 -2
- package/dist/lenders.d.ts +3 -0
- package/package.json +45 -45
package/dist/getters.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare function extractLenderBeforeLastUnderscore(str: string): string;
|
|
|
9
9
|
export declare function isMorphoBlue(lender: string): boolean;
|
|
10
10
|
export declare function isListaDao(lender: string): boolean;
|
|
11
11
|
export declare function isMorphoType(lender: string): boolean;
|
|
12
|
+
/** Matches the bare `FLUID` key AND synthesized per-vault keys `FLUID_<vaultId>`. */
|
|
13
|
+
export declare function isFluid(lender: string): boolean;
|
|
12
14
|
export declare function isVenusType(lender: string): boolean;
|
|
13
15
|
export declare function isCompoundV2Type(lender: string): boolean;
|
|
14
16
|
export declare function isCompoundV3Type(lender: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './lenders.js';
|
|
2
|
-
export { isAaveV2Type, isAaveV3Type, isAaveV32Type, isAaveType, isCompoundV3, extractLenderBeforeLastUnderscore, isMorphoBlue, isListaDao, isMorphoType, isVenusType, isCompoundV2Type, isCompoundV3Type, isInit, isEulerType, lenderHasSubAccounts, aaveForkCannotPermit, supportsSameAsset, isLista, isYLDR, isSumerType, isCompoundV2PerSecond, isTectonicType, isBenqiType, isMoonwellType, isCompoundV2PerTimestamp, isMultiMarket, isAave, isCompoundV2, isAaveV4Type, isSiloV2Type, isSiloV3Type, isSiloType, } from './getters.js';
|
|
2
|
+
export { isAaveV2Type, isAaveV3Type, isAaveV32Type, isAaveType, isCompoundV3, extractLenderBeforeLastUnderscore, isMorphoBlue, isListaDao, isMorphoType, isVenusType, isCompoundV2Type, isCompoundV3Type, isInit, isEulerType, lenderHasSubAccounts, aaveForkCannotPermit, supportsSameAsset, isLista, isYLDR, isSumerType, isCompoundV2PerSecond, isTectonicType, isBenqiType, isMoonwellType, isCompoundV2PerTimestamp, isMultiMarket, isAave, isCompoundV2, isAaveV4Type, isSiloV2Type, isSiloV3Type, isSiloType, isFluid, } from './getters.js';
|
package/dist/index.js
CHANGED
|
@@ -148,6 +148,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
|
|
|
148
148
|
Lender2["INIT"] = "INIT";
|
|
149
149
|
Lender2["MORPHO_BLUE"] = "MORPHO_BLUE";
|
|
150
150
|
Lender2["LISTA_DAO"] = "LISTA_DAO";
|
|
151
|
+
Lender2["FLUID"] = "FLUID";
|
|
151
152
|
Lender2["SILO_V2"] = "SILO_V2";
|
|
152
153
|
Lender2["SILO_V3"] = "SILO_V3";
|
|
153
154
|
Lender2["EULER_V2"] = "EULER_V2";
|
|
@@ -311,6 +312,7 @@ var COMPOUND_V3_LENDERS = [
|
|
|
311
312
|
"COMPOUND_V3_WRON" /* COMPOUND_V3_WRON */
|
|
312
313
|
];
|
|
313
314
|
var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
|
|
315
|
+
var FLUID_LENDERS = ["FLUID" /* FLUID */];
|
|
314
316
|
var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
|
|
315
317
|
var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
|
|
316
318
|
var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
|
|
@@ -415,6 +417,9 @@ function isListaDao(lender) {
|
|
|
415
417
|
function isMorphoType(lender) {
|
|
416
418
|
return isMorphoBlue(lender) || isListaDao(lender);
|
|
417
419
|
}
|
|
420
|
+
function isFluid(lender) {
|
|
421
|
+
return lender?.startsWith("FLUID");
|
|
422
|
+
}
|
|
418
423
|
function isVenusType(lender) {
|
|
419
424
|
return VENUS_LENDERS.includes(lender);
|
|
420
425
|
}
|
|
@@ -477,7 +482,7 @@ function isCompoundV2PerTimestamp(lender) {
|
|
|
477
482
|
return isMoonwellType(lender);
|
|
478
483
|
}
|
|
479
484
|
function isMultiMarket(lender) {
|
|
480
|
-
return isMorphoBlue(lender) || isListaDao(lender);
|
|
485
|
+
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
|
|
481
486
|
}
|
|
482
487
|
function isAave(lender) {
|
|
483
488
|
return isAaveType(lender);
|
|
@@ -493,6 +498,7 @@ exports.AAVE_V3_LENDERS = AAVE_V3_LENDERS;
|
|
|
493
498
|
exports.BENQI_LENDERS = BENQI_LENDERS;
|
|
494
499
|
exports.COMPOUND_V2_LENDERS = COMPOUND_V2_LENDERS;
|
|
495
500
|
exports.COMPOUND_V3_LENDERS = COMPOUND_V3_LENDERS;
|
|
501
|
+
exports.FLUID_LENDERS = FLUID_LENDERS;
|
|
496
502
|
exports.Lender = Lender;
|
|
497
503
|
exports.LenderGroups = LenderGroups;
|
|
498
504
|
exports.LenderIds = LenderIds;
|
|
@@ -519,6 +525,7 @@ exports.isCompoundV2Type = isCompoundV2Type;
|
|
|
519
525
|
exports.isCompoundV3 = isCompoundV3;
|
|
520
526
|
exports.isCompoundV3Type = isCompoundV3Type;
|
|
521
527
|
exports.isEulerType = isEulerType;
|
|
528
|
+
exports.isFluid = isFluid;
|
|
522
529
|
exports.isInit = isInit;
|
|
523
530
|
exports.isLista = isLista;
|
|
524
531
|
exports.isListaDao = isListaDao;
|
package/dist/index.mjs
CHANGED
|
@@ -146,6 +146,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
|
|
|
146
146
|
Lender2["INIT"] = "INIT";
|
|
147
147
|
Lender2["MORPHO_BLUE"] = "MORPHO_BLUE";
|
|
148
148
|
Lender2["LISTA_DAO"] = "LISTA_DAO";
|
|
149
|
+
Lender2["FLUID"] = "FLUID";
|
|
149
150
|
Lender2["SILO_V2"] = "SILO_V2";
|
|
150
151
|
Lender2["SILO_V3"] = "SILO_V3";
|
|
151
152
|
Lender2["EULER_V2"] = "EULER_V2";
|
|
@@ -309,6 +310,7 @@ var COMPOUND_V3_LENDERS = [
|
|
|
309
310
|
"COMPOUND_V3_WRON" /* COMPOUND_V3_WRON */
|
|
310
311
|
];
|
|
311
312
|
var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
|
|
313
|
+
var FLUID_LENDERS = ["FLUID" /* FLUID */];
|
|
312
314
|
var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
|
|
313
315
|
var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
|
|
314
316
|
var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
|
|
@@ -413,6 +415,9 @@ function isListaDao(lender) {
|
|
|
413
415
|
function isMorphoType(lender) {
|
|
414
416
|
return isMorphoBlue(lender) || isListaDao(lender);
|
|
415
417
|
}
|
|
418
|
+
function isFluid(lender) {
|
|
419
|
+
return lender?.startsWith("FLUID");
|
|
420
|
+
}
|
|
416
421
|
function isVenusType(lender) {
|
|
417
422
|
return VENUS_LENDERS.includes(lender);
|
|
418
423
|
}
|
|
@@ -475,7 +480,7 @@ function isCompoundV2PerTimestamp(lender) {
|
|
|
475
480
|
return isMoonwellType(lender);
|
|
476
481
|
}
|
|
477
482
|
function isMultiMarket(lender) {
|
|
478
|
-
return isMorphoBlue(lender) || isListaDao(lender);
|
|
483
|
+
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
|
|
479
484
|
}
|
|
480
485
|
function isAave(lender) {
|
|
481
486
|
return isAaveType(lender);
|
|
@@ -484,4 +489,4 @@ function isCompoundV2(lender) {
|
|
|
484
489
|
return isCompoundV2Type(lender);
|
|
485
490
|
}
|
|
486
491
|
|
|
487
|
-
export { AAVE_LENDERS, AAVE_V2_LENDERS, AAVE_V32_LENDERS, AAVE_V3_LENDERS, BENQI_LENDERS, COMPOUND_V2_LENDERS, COMPOUND_V3_LENDERS, Lender, LenderGroups, LenderIds, MORPHO_BLUE_LENDERS, SILO_V2_LENDERS, SILO_V3_LENDERS, TECTONIC_LENDERS, VENUS_LENDERS, aaveForkCannotPermit, extractLenderBeforeLastUnderscore, getLenderGroup, getLenderId, isAave, isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isAaveV4Type, isBenqiType, isCompoundV2, isCompoundV2PerSecond, isCompoundV2PerTimestamp, isCompoundV2Type, isCompoundV3, isCompoundV3Type, isEulerType, isInit, isLista, isListaDao, isMoonwellType, isMorphoBlue, isMorphoType, isMultiMarket, isSiloType, isSiloV2Type, isSiloV3Type, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
|
|
492
|
+
export { AAVE_LENDERS, AAVE_V2_LENDERS, AAVE_V32_LENDERS, AAVE_V3_LENDERS, BENQI_LENDERS, COMPOUND_V2_LENDERS, COMPOUND_V3_LENDERS, FLUID_LENDERS, Lender, LenderGroups, LenderIds, MORPHO_BLUE_LENDERS, SILO_V2_LENDERS, SILO_V3_LENDERS, TECTONIC_LENDERS, VENUS_LENDERS, aaveForkCannotPermit, extractLenderBeforeLastUnderscore, getLenderGroup, getLenderId, isAave, isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isAaveV4Type, isBenqiType, isCompoundV2, isCompoundV2PerSecond, isCompoundV2PerTimestamp, isCompoundV2Type, isCompoundV3, isCompoundV3Type, isEulerType, isFluid, isInit, isLista, isListaDao, isMoonwellType, isMorphoBlue, isMorphoType, isMultiMarket, isSiloType, isSiloV2Type, isSiloV3Type, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
|
package/dist/lenders.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export declare enum Lender {
|
|
|
148
148
|
INIT = "INIT",
|
|
149
149
|
MORPHO_BLUE = "MORPHO_BLUE",
|
|
150
150
|
LISTA_DAO = "LISTA_DAO",
|
|
151
|
+
FLUID = "FLUID",
|
|
151
152
|
SILO_V2 = "SILO_V2",
|
|
152
153
|
SILO_V3 = "SILO_V3",
|
|
153
154
|
EULER_V2 = "EULER_V2",
|
|
@@ -168,6 +169,8 @@ export declare const COMPOUND_V2_LENDERS: Lender[];
|
|
|
168
169
|
export declare const COMPOUND_V3_LENDERS: Lender[];
|
|
169
170
|
/** Morpho Blue lenders */
|
|
170
171
|
export declare const MORPHO_BLUE_LENDERS: Lender[];
|
|
172
|
+
/** Fluid — single entity. Per-vault keys `FLUID_<vaultId>` are synthesized at runtime. */
|
|
173
|
+
export declare const FLUID_LENDERS: Lender[];
|
|
171
174
|
/** Tectonic lenders */
|
|
172
175
|
export declare const TECTONIC_LENDERS: Lender[];
|
|
173
176
|
/** Benqi lenders */
|
package/package.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
2
|
+
"name": "@1delta/lender-registry",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"version": "0.0.24",
|
|
8
|
+
"description": "Lenders as Enums for convenience",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [
|
|
13
|
+
"dex"
|
|
14
|
+
],
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"module": "dist/index.mjs",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsup",
|
|
21
|
+
"dev": "tsup --watch",
|
|
22
|
+
"test": "vitest --run",
|
|
23
|
+
"coverage": "vitest run --coverage",
|
|
24
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"tsup": "^8.5.1",
|
|
28
|
+
"typescript": "^5.9.3"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20"
|
|
32
|
+
},
|
|
33
|
+
"prettier": {
|
|
34
|
+
"printWidth": 120,
|
|
35
|
+
"semi": false,
|
|
36
|
+
"singleQuote": true
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
"./package.json": "./package.json",
|
|
40
|
+
".": {
|
|
41
|
+
"types": "./dist/index.d.ts",
|
|
42
|
+
"import": "./dist/index.mjs",
|
|
43
|
+
"require": "./dist/index.js"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|