@1delta/lender-registry 0.0.24 → 0.0.25
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
|
@@ -11,6 +11,8 @@ export declare function isListaDao(lender: string): boolean;
|
|
|
11
11
|
export declare function isMorphoType(lender: string): boolean;
|
|
12
12
|
/** Matches the bare `FLUID` key AND synthesized per-vault keys `FLUID_<vaultId>`. */
|
|
13
13
|
export declare function isFluid(lender: string): boolean;
|
|
14
|
+
/** Matches the bare `GEARBOX_V3` key AND synthesized per-CreditManager keys `GEARBOX_V3_<HEX>`. */
|
|
15
|
+
export declare function isGearboxV3(lender: string): boolean;
|
|
14
16
|
export declare function isVenusType(lender: string): boolean;
|
|
15
17
|
export declare function isCompoundV2Type(lender: string): boolean;
|
|
16
18
|
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, isFluid, } 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, isGearboxV3, } from './getters.js';
|
package/dist/index.js
CHANGED
|
@@ -149,6 +149,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
|
|
|
149
149
|
Lender2["MORPHO_BLUE"] = "MORPHO_BLUE";
|
|
150
150
|
Lender2["LISTA_DAO"] = "LISTA_DAO";
|
|
151
151
|
Lender2["FLUID"] = "FLUID";
|
|
152
|
+
Lender2["GEARBOX_V3"] = "GEARBOX_V3";
|
|
152
153
|
Lender2["SILO_V2"] = "SILO_V2";
|
|
153
154
|
Lender2["SILO_V3"] = "SILO_V3";
|
|
154
155
|
Lender2["EULER_V2"] = "EULER_V2";
|
|
@@ -313,6 +314,7 @@ var COMPOUND_V3_LENDERS = [
|
|
|
313
314
|
];
|
|
314
315
|
var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
|
|
315
316
|
var FLUID_LENDERS = ["FLUID" /* FLUID */];
|
|
317
|
+
var GEARBOX_V3_LENDERS = ["GEARBOX_V3" /* GEARBOX_V3 */];
|
|
316
318
|
var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
|
|
317
319
|
var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
|
|
318
320
|
var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
|
|
@@ -420,6 +422,9 @@ function isMorphoType(lender) {
|
|
|
420
422
|
function isFluid(lender) {
|
|
421
423
|
return lender?.startsWith("FLUID");
|
|
422
424
|
}
|
|
425
|
+
function isGearboxV3(lender) {
|
|
426
|
+
return lender?.startsWith("GEARBOX_V3");
|
|
427
|
+
}
|
|
423
428
|
function isVenusType(lender) {
|
|
424
429
|
return VENUS_LENDERS.includes(lender);
|
|
425
430
|
}
|
|
@@ -482,7 +487,7 @@ function isCompoundV2PerTimestamp(lender) {
|
|
|
482
487
|
return isMoonwellType(lender);
|
|
483
488
|
}
|
|
484
489
|
function isMultiMarket(lender) {
|
|
485
|
-
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
|
|
490
|
+
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender) || isGearboxV3(lender);
|
|
486
491
|
}
|
|
487
492
|
function isAave(lender) {
|
|
488
493
|
return isAaveType(lender);
|
|
@@ -499,6 +504,7 @@ exports.BENQI_LENDERS = BENQI_LENDERS;
|
|
|
499
504
|
exports.COMPOUND_V2_LENDERS = COMPOUND_V2_LENDERS;
|
|
500
505
|
exports.COMPOUND_V3_LENDERS = COMPOUND_V3_LENDERS;
|
|
501
506
|
exports.FLUID_LENDERS = FLUID_LENDERS;
|
|
507
|
+
exports.GEARBOX_V3_LENDERS = GEARBOX_V3_LENDERS;
|
|
502
508
|
exports.Lender = Lender;
|
|
503
509
|
exports.LenderGroups = LenderGroups;
|
|
504
510
|
exports.LenderIds = LenderIds;
|
|
@@ -526,6 +532,7 @@ exports.isCompoundV3 = isCompoundV3;
|
|
|
526
532
|
exports.isCompoundV3Type = isCompoundV3Type;
|
|
527
533
|
exports.isEulerType = isEulerType;
|
|
528
534
|
exports.isFluid = isFluid;
|
|
535
|
+
exports.isGearboxV3 = isGearboxV3;
|
|
529
536
|
exports.isInit = isInit;
|
|
530
537
|
exports.isLista = isLista;
|
|
531
538
|
exports.isListaDao = isListaDao;
|
package/dist/index.mjs
CHANGED
|
@@ -147,6 +147,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
|
|
|
147
147
|
Lender2["MORPHO_BLUE"] = "MORPHO_BLUE";
|
|
148
148
|
Lender2["LISTA_DAO"] = "LISTA_DAO";
|
|
149
149
|
Lender2["FLUID"] = "FLUID";
|
|
150
|
+
Lender2["GEARBOX_V3"] = "GEARBOX_V3";
|
|
150
151
|
Lender2["SILO_V2"] = "SILO_V2";
|
|
151
152
|
Lender2["SILO_V3"] = "SILO_V3";
|
|
152
153
|
Lender2["EULER_V2"] = "EULER_V2";
|
|
@@ -311,6 +312,7 @@ var COMPOUND_V3_LENDERS = [
|
|
|
311
312
|
];
|
|
312
313
|
var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
|
|
313
314
|
var FLUID_LENDERS = ["FLUID" /* FLUID */];
|
|
315
|
+
var GEARBOX_V3_LENDERS = ["GEARBOX_V3" /* GEARBOX_V3 */];
|
|
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 */];
|
|
@@ -418,6 +420,9 @@ function isMorphoType(lender) {
|
|
|
418
420
|
function isFluid(lender) {
|
|
419
421
|
return lender?.startsWith("FLUID");
|
|
420
422
|
}
|
|
423
|
+
function isGearboxV3(lender) {
|
|
424
|
+
return lender?.startsWith("GEARBOX_V3");
|
|
425
|
+
}
|
|
421
426
|
function isVenusType(lender) {
|
|
422
427
|
return VENUS_LENDERS.includes(lender);
|
|
423
428
|
}
|
|
@@ -480,7 +485,7 @@ function isCompoundV2PerTimestamp(lender) {
|
|
|
480
485
|
return isMoonwellType(lender);
|
|
481
486
|
}
|
|
482
487
|
function isMultiMarket(lender) {
|
|
483
|
-
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
|
|
488
|
+
return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender) || isGearboxV3(lender);
|
|
484
489
|
}
|
|
485
490
|
function isAave(lender) {
|
|
486
491
|
return isAaveType(lender);
|
|
@@ -489,4 +494,4 @@ function isCompoundV2(lender) {
|
|
|
489
494
|
return isCompoundV2Type(lender);
|
|
490
495
|
}
|
|
491
496
|
|
|
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 };
|
|
497
|
+
export { AAVE_LENDERS, AAVE_V2_LENDERS, AAVE_V32_LENDERS, AAVE_V3_LENDERS, BENQI_LENDERS, COMPOUND_V2_LENDERS, COMPOUND_V3_LENDERS, FLUID_LENDERS, GEARBOX_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, isFluid, isGearboxV3, isInit, isLista, isListaDao, isMoonwellType, isMorphoBlue, isMorphoType, isMultiMarket, isSiloType, isSiloV2Type, isSiloV3Type, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
|
package/dist/lenders.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ export declare enum Lender {
|
|
|
149
149
|
MORPHO_BLUE = "MORPHO_BLUE",
|
|
150
150
|
LISTA_DAO = "LISTA_DAO",
|
|
151
151
|
FLUID = "FLUID",
|
|
152
|
+
GEARBOX_V3 = "GEARBOX_V3",
|
|
152
153
|
SILO_V2 = "SILO_V2",
|
|
153
154
|
SILO_V3 = "SILO_V3",
|
|
154
155
|
EULER_V2 = "EULER_V2",
|
|
@@ -171,6 +172,8 @@ export declare const COMPOUND_V3_LENDERS: Lender[];
|
|
|
171
172
|
export declare const MORPHO_BLUE_LENDERS: Lender[];
|
|
172
173
|
/** Fluid — single entity. Per-vault keys `FLUID_<vaultId>` are synthesized at runtime. */
|
|
173
174
|
export declare const FLUID_LENDERS: Lender[];
|
|
175
|
+
/** Gearbox V3 — single entity. Per-CreditManager keys `GEARBOX_V3_<HEX>` are synthesized at runtime. */
|
|
176
|
+
export declare const GEARBOX_V3_LENDERS: Lender[];
|
|
174
177
|
/** Tectonic lenders */
|
|
175
178
|
export declare const TECTONIC_LENDERS: Lender[];
|
|
176
179
|
/** 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.25",
|
|
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
|
+
"devDependencies": {
|
|
20
|
+
"tsup": "^8.5.1",
|
|
21
|
+
"typescript": "^5.9.3"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20"
|
|
25
|
+
},
|
|
26
|
+
"prettier": {
|
|
27
|
+
"printWidth": 120,
|
|
28
|
+
"semi": false,
|
|
29
|
+
"singleQuote": true
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
"./package.json": "./package.json",
|
|
33
|
+
".": {
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"import": "./dist/index.mjs",
|
|
36
|
+
"require": "./dist/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsup",
|
|
41
|
+
"dev": "tsup --watch",
|
|
42
|
+
"test": "vitest --run",
|
|
43
|
+
"coverage": "vitest run --coverage",
|
|
44
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
|
45
|
+
}
|
|
46
|
+
}
|