@1delta/lender-registry 0.0.20 → 0.0.21

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/index.js CHANGED
@@ -150,9 +150,6 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
150
150
  Lender2["LISTA_DAO"] = "LISTA_DAO";
151
151
  Lender2["SILO_V2"] = "SILO_V2";
152
152
  Lender2["EULER_V2"] = "EULER_V2";
153
- Lender2["AAVE_V4_CORE"] = "AAVE_V4_CORE";
154
- Lender2["AAVE_V4_PLUS"] = "AAVE_V4_PLUS";
155
- Lender2["AAVE_V4_PRIME"] = "AAVE_V4_PRIME";
156
153
  Lender2["SWAYLEND_USDC"] = "SWAYLEND_USDC";
157
154
  return Lender2;
158
155
  })(Lender || {});
@@ -316,11 +313,6 @@ var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA
316
313
  var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
317
314
  var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
318
315
  var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
319
- var AAVE_V4_LENDERS = [
320
- "AAVE_V4_CORE" /* AAVE_V4_CORE */,
321
- "AAVE_V4_PLUS" /* AAVE_V4_PLUS */,
322
- "AAVE_V4_PRIME" /* AAVE_V4_PRIME */
323
- ];
324
316
  var LenderGroups = /* @__PURE__ */ ((LenderGroups2) => {
325
317
  LenderGroups2[LenderGroups2["AaveV2"] = 0] = "AaveV2";
326
318
  LenderGroups2[LenderGroups2["AaveV3"] = 1] = "AaveV3";
@@ -377,7 +369,7 @@ function getLenderGroup(lender) {
377
369
  if (SILO_V2_LENDERS.includes(lender)) {
378
370
  return 6 /* SiloV2 */;
379
371
  }
380
- if (AAVE_V4_LENDERS.includes(lender)) {
372
+ if (lender.startsWith("AAVE_V4")) {
381
373
  return 2 /* AaveV4 */;
382
374
  }
383
375
  throw new Error(`getLenderGroup: Unsupported lender ${lender}`);
@@ -480,7 +472,6 @@ exports.AAVE_LENDERS = AAVE_LENDERS;
480
472
  exports.AAVE_V2_LENDERS = AAVE_V2_LENDERS;
481
473
  exports.AAVE_V32_LENDERS = AAVE_V32_LENDERS;
482
474
  exports.AAVE_V3_LENDERS = AAVE_V3_LENDERS;
483
- exports.AAVE_V4_LENDERS = AAVE_V4_LENDERS;
484
475
  exports.BENQI_LENDERS = BENQI_LENDERS;
485
476
  exports.COMPOUND_V2_LENDERS = COMPOUND_V2_LENDERS;
486
477
  exports.COMPOUND_V3_LENDERS = COMPOUND_V3_LENDERS;
package/dist/index.mjs CHANGED
@@ -148,9 +148,6 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
148
148
  Lender2["LISTA_DAO"] = "LISTA_DAO";
149
149
  Lender2["SILO_V2"] = "SILO_V2";
150
150
  Lender2["EULER_V2"] = "EULER_V2";
151
- Lender2["AAVE_V4_CORE"] = "AAVE_V4_CORE";
152
- Lender2["AAVE_V4_PLUS"] = "AAVE_V4_PLUS";
153
- Lender2["AAVE_V4_PRIME"] = "AAVE_V4_PRIME";
154
151
  Lender2["SWAYLEND_USDC"] = "SWAYLEND_USDC";
155
152
  return Lender2;
156
153
  })(Lender || {});
@@ -314,11 +311,6 @@ var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA
314
311
  var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
315
312
  var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
316
313
  var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
317
- var AAVE_V4_LENDERS = [
318
- "AAVE_V4_CORE" /* AAVE_V4_CORE */,
319
- "AAVE_V4_PLUS" /* AAVE_V4_PLUS */,
320
- "AAVE_V4_PRIME" /* AAVE_V4_PRIME */
321
- ];
322
314
  var LenderGroups = /* @__PURE__ */ ((LenderGroups2) => {
323
315
  LenderGroups2[LenderGroups2["AaveV2"] = 0] = "AaveV2";
324
316
  LenderGroups2[LenderGroups2["AaveV3"] = 1] = "AaveV3";
@@ -375,7 +367,7 @@ function getLenderGroup(lender) {
375
367
  if (SILO_V2_LENDERS.includes(lender)) {
376
368
  return 6 /* SiloV2 */;
377
369
  }
378
- if (AAVE_V4_LENDERS.includes(lender)) {
370
+ if (lender.startsWith("AAVE_V4")) {
379
371
  return 2 /* AaveV4 */;
380
372
  }
381
373
  throw new Error(`getLenderGroup: Unsupported lender ${lender}`);
@@ -474,4 +466,4 @@ function isCompoundV2(lender) {
474
466
  return isCompoundV2Type(lender);
475
467
  }
476
468
 
477
- export { AAVE_LENDERS, AAVE_V2_LENDERS, AAVE_V32_LENDERS, AAVE_V3_LENDERS, AAVE_V4_LENDERS, BENQI_LENDERS, COMPOUND_V2_LENDERS, COMPOUND_V3_LENDERS, Lender, LenderGroups, LenderIds, MORPHO_BLUE_LENDERS, SILO_V2_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, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
469
+ 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, 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, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
package/dist/lenders.d.ts CHANGED
@@ -150,9 +150,6 @@ export declare enum Lender {
150
150
  LISTA_DAO = "LISTA_DAO",
151
151
  SILO_V2 = "SILO_V2",
152
152
  EULER_V2 = "EULER_V2",
153
- AAVE_V4_CORE = "AAVE_V4_CORE",
154
- AAVE_V4_PLUS = "AAVE_V4_PLUS",
155
- AAVE_V4_PRIME = "AAVE_V4_PRIME",
156
153
  SWAYLEND_USDC = "SWAYLEND_USDC"
157
154
  }
158
155
  export declare const AAVE_V32_LENDERS: Lender[];
@@ -176,8 +173,11 @@ export declare const TECTONIC_LENDERS: Lender[];
176
173
  export declare const BENQI_LENDERS: Lender[];
177
174
  /** Silo lenders */
178
175
  export declare const SILO_V2_LENDERS: Lender[];
179
- /** Aave V4 lenders */
180
- export declare const AAVE_V4_LENDERS: Lender[];
176
+ /**
177
+ * Aave V4 has no enum-level lenders; per-spoke lender keys are synthesized
178
+ * at runtime as `AAVE_V4_<SPOKE_HEX>`. Use `lender.startsWith('AAVE_V4')`
179
+ * (via `isAaveV4Type`) for membership tests.
180
+ */
181
181
  export declare enum LenderGroups {
182
182
  AaveV2 = 0,
183
183
  AaveV3 = 1,
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.20",
7
+ "version": "0.0.21",
8
8
  "description": "Lenders as Enums for convenience",
9
9
  "files": [
10
10
  "dist"