@1delta/lender-registry 0.0.22 → 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 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, } 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 */];
@@ -375,7 +377,7 @@ function getLenderGroup(lender) {
375
377
  if (SILO_V3_LENDERS.includes(lender) || lender.startsWith("SILO_V3")) {
376
378
  return 7 /* SiloV3 */;
377
379
  }
378
- if (SILO_V2_LENDERS.includes(lender)) {
380
+ if (SILO_V2_LENDERS.includes(lender) || lender.startsWith("SILO_V2")) {
379
381
  return 6 /* SiloV2 */;
380
382
  }
381
383
  if (lender.startsWith("AAVE_V4")) {
@@ -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
  }
@@ -439,6 +444,9 @@ function isSiloV2Type(lender) {
439
444
  function isSiloV3Type(lender) {
440
445
  return lender?.startsWith("SILO_V3");
441
446
  }
447
+ function isSiloType(lender) {
448
+ return isSiloV2Type(lender) || isSiloV3Type(lender);
449
+ }
442
450
  function lenderHasSubAccounts(lender) {
443
451
  return isInit(lender);
444
452
  }
@@ -474,7 +482,7 @@ function isCompoundV2PerTimestamp(lender) {
474
482
  return isMoonwellType(lender);
475
483
  }
476
484
  function isMultiMarket(lender) {
477
- return isMorphoBlue(lender) || isListaDao(lender);
485
+ return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
478
486
  }
479
487
  function isAave(lender) {
480
488
  return isAaveType(lender);
@@ -490,6 +498,7 @@ exports.AAVE_V3_LENDERS = AAVE_V3_LENDERS;
490
498
  exports.BENQI_LENDERS = BENQI_LENDERS;
491
499
  exports.COMPOUND_V2_LENDERS = COMPOUND_V2_LENDERS;
492
500
  exports.COMPOUND_V3_LENDERS = COMPOUND_V3_LENDERS;
501
+ exports.FLUID_LENDERS = FLUID_LENDERS;
493
502
  exports.Lender = Lender;
494
503
  exports.LenderGroups = LenderGroups;
495
504
  exports.LenderIds = LenderIds;
@@ -516,6 +525,7 @@ exports.isCompoundV2Type = isCompoundV2Type;
516
525
  exports.isCompoundV3 = isCompoundV3;
517
526
  exports.isCompoundV3Type = isCompoundV3Type;
518
527
  exports.isEulerType = isEulerType;
528
+ exports.isFluid = isFluid;
519
529
  exports.isInit = isInit;
520
530
  exports.isLista = isLista;
521
531
  exports.isListaDao = isListaDao;
@@ -523,6 +533,7 @@ exports.isMoonwellType = isMoonwellType;
523
533
  exports.isMorphoBlue = isMorphoBlue;
524
534
  exports.isMorphoType = isMorphoType;
525
535
  exports.isMultiMarket = isMultiMarket;
536
+ exports.isSiloType = isSiloType;
526
537
  exports.isSiloV2Type = isSiloV2Type;
527
538
  exports.isSiloV3Type = isSiloV3Type;
528
539
  exports.isSumerType = isSumerType;
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 */];
@@ -373,7 +375,7 @@ function getLenderGroup(lender) {
373
375
  if (SILO_V3_LENDERS.includes(lender) || lender.startsWith("SILO_V3")) {
374
376
  return 7 /* SiloV3 */;
375
377
  }
376
- if (SILO_V2_LENDERS.includes(lender)) {
378
+ if (SILO_V2_LENDERS.includes(lender) || lender.startsWith("SILO_V2")) {
377
379
  return 6 /* SiloV2 */;
378
380
  }
379
381
  if (lender.startsWith("AAVE_V4")) {
@@ -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
  }
@@ -437,6 +442,9 @@ function isSiloV2Type(lender) {
437
442
  function isSiloV3Type(lender) {
438
443
  return lender?.startsWith("SILO_V3");
439
444
  }
445
+ function isSiloType(lender) {
446
+ return isSiloV2Type(lender) || isSiloV3Type(lender);
447
+ }
440
448
  function lenderHasSubAccounts(lender) {
441
449
  return isInit(lender);
442
450
  }
@@ -472,7 +480,7 @@ function isCompoundV2PerTimestamp(lender) {
472
480
  return isMoonwellType(lender);
473
481
  }
474
482
  function isMultiMarket(lender) {
475
- return isMorphoBlue(lender) || isListaDao(lender);
483
+ return isMorphoBlue(lender) || isListaDao(lender) || isFluid(lender);
476
484
  }
477
485
  function isAave(lender) {
478
486
  return isAaveType(lender);
@@ -481,4 +489,4 @@ function isCompoundV2(lender) {
481
489
  return isCompoundV2Type(lender);
482
490
  }
483
491
 
484
- 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, 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
- "name": "@1delta/lender-registry",
3
- "license": "MIT",
4
- "publishConfig": {
5
- "access": "public"
6
- },
7
- "version": "0.0.22",
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
- }
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
+ }