@1delta/lender-registry 0.0.18 → 0.0.19

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 CHANGED
@@ -21,8 +21,25 @@ export declare function supportsSameAsset(lender: string): boolean;
21
21
  export declare function isLista(lender: string): boolean;
22
22
  export declare function isYLDR(lender: string): lender is Lender.YLDR;
23
23
  export declare function isSumerType(lender: string): lender is Lender.SUMER;
24
+ /**
25
+ * Returns true for Compound V2 forks that store interest rates per-second
26
+ * (instead of per-block). These use `*PerSecond` getters in the IRM contract
27
+ * and are stored with blockTimeSeconds=1.
28
+ *
29
+ * Known per-second forks: Sumer
30
+ * Known per-block forks (for reference): Venus (`isVenusType`), Moonwell, Benqi, …
31
+ */
32
+ export declare function isCompoundV2PerSecond(lender: string): lender is Lender.SUMER;
24
33
  export declare function isTectonicType(lender: string): boolean;
25
34
  export declare function isBenqiType(lender: string): boolean;
35
+ export declare function isMoonwellType(lender: string): lender is Lender.MOONWELL;
36
+ /**
37
+ * Returns true for Compound V2 forks that store interest rates per-timestamp
38
+ * (instead of per-block or per-second). These use `*PerTimestamp` getters.
39
+ *
40
+ * Known per-timestamp forks: Moonwell
41
+ */
42
+ export declare function isCompoundV2PerTimestamp(lender: string): lender is Lender.MOONWELL;
26
43
  export declare function isMultiMarket(lender: string): boolean;
27
44
  /** Alias for isAaveType */
28
45
  export declare function isAave(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, isTectonicType, isBenqiType, isMultiMarket, isAave, isCompoundV2, } 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, } from './getters.js';
package/dist/index.js CHANGED
@@ -115,7 +115,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
115
115
  Lender2["TAKARA"] = "TAKARA";
116
116
  Lender2["UNITUS"] = "UNITUS";
117
117
  Lender2["BENQI"] = "BENQI";
118
- Lender2["BENQI_AVALANCE_ECOSYSTEM"] = "BENQI_AVALANCE_ECOSYSTEM";
118
+ Lender2["BENQI_AVALANCHE_ECOSYSTEM"] = "BENQI_AVALANCHE_ECOSYSTEM";
119
119
  Lender2["KEOM"] = "KEOM";
120
120
  Lender2["OVIX"] = "OVIX";
121
121
  Lender2["MOONWELL"] = "MOONWELL";
@@ -279,7 +279,7 @@ var COMPOUND_V2_LENDERS = [
279
279
  "COMPOUND_V2" /* COMPOUND_V2 */,
280
280
  "OVIX" /* OVIX */,
281
281
  "BENQI" /* BENQI */,
282
- "BENQI_AVALANCE_ECOSYSTEM" /* BENQI_AVALANCE_ECOSYSTEM */,
282
+ "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */,
283
283
  "MENDI" /* MENDI */,
284
284
  "LODESTAR" /* LODESTAR */,
285
285
  "SUMER" /* SUMER */,
@@ -311,7 +311,7 @@ var COMPOUND_V3_LENDERS = [
311
311
  ];
312
312
  var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
313
313
  var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
314
- var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCE_ECOSYSTEM" /* BENQI_AVALANCE_ECOSYSTEM */];
314
+ var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
315
315
  var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
316
316
  var LenderGroups = /* @__PURE__ */ ((LenderGroups2) => {
317
317
  LenderGroups2[LenderGroups2["AaveV2"] = 0] = "AaveV2";
@@ -433,12 +433,21 @@ function isYLDR(lender) {
433
433
  function isSumerType(lender) {
434
434
  return lender === "SUMER" /* SUMER */;
435
435
  }
436
+ function isCompoundV2PerSecond(lender) {
437
+ return isSumerType(lender);
438
+ }
436
439
  function isTectonicType(lender) {
437
440
  return TECTONIC_LENDERS.includes(lender);
438
441
  }
439
442
  function isBenqiType(lender) {
440
443
  return BENQI_LENDERS.includes(lender);
441
444
  }
445
+ function isMoonwellType(lender) {
446
+ return lender === "MOONWELL" /* MOONWELL */;
447
+ }
448
+ function isCompoundV2PerTimestamp(lender) {
449
+ return isMoonwellType(lender);
450
+ }
442
451
  function isMultiMarket(lender) {
443
452
  return isMorphoBlue(lender) || isListaDao(lender);
444
453
  }
@@ -474,6 +483,8 @@ exports.isAaveV32Type = isAaveV32Type;
474
483
  exports.isAaveV3Type = isAaveV3Type;
475
484
  exports.isBenqiType = isBenqiType;
476
485
  exports.isCompoundV2 = isCompoundV2;
486
+ exports.isCompoundV2PerSecond = isCompoundV2PerSecond;
487
+ exports.isCompoundV2PerTimestamp = isCompoundV2PerTimestamp;
477
488
  exports.isCompoundV2Type = isCompoundV2Type;
478
489
  exports.isCompoundV3 = isCompoundV3;
479
490
  exports.isCompoundV3Type = isCompoundV3Type;
@@ -481,6 +492,7 @@ exports.isEulerType = isEulerType;
481
492
  exports.isInit = isInit;
482
493
  exports.isLista = isLista;
483
494
  exports.isListaDao = isListaDao;
495
+ exports.isMoonwellType = isMoonwellType;
484
496
  exports.isMorphoBlue = isMorphoBlue;
485
497
  exports.isMorphoType = isMorphoType;
486
498
  exports.isMultiMarket = isMultiMarket;
package/dist/index.mjs CHANGED
@@ -113,7 +113,7 @@ var Lender = /* @__PURE__ */ ((Lender2) => {
113
113
  Lender2["TAKARA"] = "TAKARA";
114
114
  Lender2["UNITUS"] = "UNITUS";
115
115
  Lender2["BENQI"] = "BENQI";
116
- Lender2["BENQI_AVALANCE_ECOSYSTEM"] = "BENQI_AVALANCE_ECOSYSTEM";
116
+ Lender2["BENQI_AVALANCHE_ECOSYSTEM"] = "BENQI_AVALANCHE_ECOSYSTEM";
117
117
  Lender2["KEOM"] = "KEOM";
118
118
  Lender2["OVIX"] = "OVIX";
119
119
  Lender2["MOONWELL"] = "MOONWELL";
@@ -277,7 +277,7 @@ var COMPOUND_V2_LENDERS = [
277
277
  "COMPOUND_V2" /* COMPOUND_V2 */,
278
278
  "OVIX" /* OVIX */,
279
279
  "BENQI" /* BENQI */,
280
- "BENQI_AVALANCE_ECOSYSTEM" /* BENQI_AVALANCE_ECOSYSTEM */,
280
+ "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */,
281
281
  "MENDI" /* MENDI */,
282
282
  "LODESTAR" /* LODESTAR */,
283
283
  "SUMER" /* SUMER */,
@@ -309,7 +309,7 @@ var COMPOUND_V3_LENDERS = [
309
309
  ];
310
310
  var MORPHO_BLUE_LENDERS = ["MORPHO_BLUE" /* MORPHO_BLUE */, "LISTA_DAO" /* LISTA_DAO */];
311
311
  var TECTONIC_LENDERS = ["TECTONIC" /* TECTONIC */, "TECTONIC_VENO" /* TECTONIC_VENO */, "TECTONIC_DEFI" /* TECTONIC_DEFI */];
312
- var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCE_ECOSYSTEM" /* BENQI_AVALANCE_ECOSYSTEM */];
312
+ var BENQI_LENDERS = ["BENQI" /* BENQI */, "BENQI_AVALANCHE_ECOSYSTEM" /* BENQI_AVALANCHE_ECOSYSTEM */];
313
313
  var SILO_V2_LENDERS = ["SILO_V2" /* SILO_V2 */];
314
314
  var LenderGroups = /* @__PURE__ */ ((LenderGroups2) => {
315
315
  LenderGroups2[LenderGroups2["AaveV2"] = 0] = "AaveV2";
@@ -431,12 +431,21 @@ function isYLDR(lender) {
431
431
  function isSumerType(lender) {
432
432
  return lender === "SUMER" /* SUMER */;
433
433
  }
434
+ function isCompoundV2PerSecond(lender) {
435
+ return isSumerType(lender);
436
+ }
434
437
  function isTectonicType(lender) {
435
438
  return TECTONIC_LENDERS.includes(lender);
436
439
  }
437
440
  function isBenqiType(lender) {
438
441
  return BENQI_LENDERS.includes(lender);
439
442
  }
443
+ function isMoonwellType(lender) {
444
+ return lender === "MOONWELL" /* MOONWELL */;
445
+ }
446
+ function isCompoundV2PerTimestamp(lender) {
447
+ return isMoonwellType(lender);
448
+ }
440
449
  function isMultiMarket(lender) {
441
450
  return isMorphoBlue(lender) || isListaDao(lender);
442
451
  }
@@ -447,4 +456,4 @@ function isCompoundV2(lender) {
447
456
  return isCompoundV2Type(lender);
448
457
  }
449
458
 
450
- 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, isBenqiType, isCompoundV2, isCompoundV2Type, isCompoundV3, isCompoundV3Type, isEulerType, isInit, isLista, isListaDao, isMorphoBlue, isMorphoType, isMultiMarket, isSumerType, isTectonicType, isVenusType, isYLDR, lenderHasSubAccounts, supportsSameAsset };
459
+ 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, 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
@@ -114,7 +114,7 @@ export declare enum Lender {
114
114
  TAKARA = "TAKARA",
115
115
  UNITUS = "UNITUS",
116
116
  BENQI = "BENQI",
117
- BENQI_AVALANCE_ECOSYSTEM = "BENQI_AVALANCE_ECOSYSTEM",
117
+ BENQI_AVALANCHE_ECOSYSTEM = "BENQI_AVALANCHE_ECOSYSTEM",
118
118
  KEOM = "KEOM",
119
119
  OVIX = "OVIX",
120
120
  MOONWELL = "MOONWELL",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.18",
7
+ "version": "0.0.19",
8
8
  "description": "Lenders as Enums for convenience",
9
9
  "files": [
10
10
  "dist"