@sonarwatch/portfolio-plugins 0.14.9 → 0.14.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/cetus/clmmsFetcher.js +59 -55
  6. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  7. package/src/plugins/cetus/farmsFetcher.js +66 -37
  8. package/src/plugins/cetus/farmsFetcher.js.map +1 -1
  9. package/src/plugins/cetus/helpers.d.ts +3 -1
  10. package/src/plugins/cetus/helpers.js +102 -1
  11. package/src/plugins/cetus/helpers.js.map +1 -1
  12. package/src/plugins/cetus/types.d.ts +28 -0
  13. package/src/plugins/cetus/types.js.map +1 -1
  14. package/src/plugins/jupiter/governance/asrAirdropFetcher.d.ts +3 -3
  15. package/src/plugins/jupiter/governance/asrAirdropFetcher.js +50 -71
  16. package/src/plugins/jupiter/governance/asrAirdropFetcher.js.map +1 -1
  17. package/src/plugins/jupiter/governance/constants.d.ts +12 -1
  18. package/src/plugins/jupiter/governance/constants.js +46 -2
  19. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  20. package/src/plugins/jupiter/governance/index.d.ts +5 -0
  21. package/src/plugins/jupiter/governance/index.js +20 -0
  22. package/src/plugins/jupiter/governance/index.js.map +1 -0
  23. package/src/plugins/jupiter/index.js +5 -3
  24. package/src/plugins/jupiter/index.js.map +1 -1
  25. package/src/plugins/loverflow/airdropClaimFetcher.d.ts +3 -0
  26. package/src/plugins/loverflow/airdropClaimFetcher.js +42 -0
  27. package/src/plugins/loverflow/airdropClaimFetcher.js.map +1 -0
  28. package/src/plugins/loverflow/constants.d.ts +6 -0
  29. package/src/plugins/loverflow/constants.js +16 -0
  30. package/src/plugins/loverflow/constants.js.map +1 -0
  31. package/src/plugins/loverflow/helpers.d.ts +2 -0
  32. package/src/plugins/loverflow/helpers.js +9 -0
  33. package/src/plugins/loverflow/helpers.js.map +1 -0
  34. package/src/plugins/loverflow/index.d.ts +6 -0
  35. package/src/plugins/loverflow/index.js +12 -0
  36. package/src/plugins/loverflow/index.js.map +1 -0
  37. package/src/plugins/loverflow/structs.d.ts +16 -0
  38. package/src/plugins/loverflow/structs.js +18 -0
  39. package/src/plugins/loverflow/structs.js.map +1 -0
  40. package/src/plugins/loverflow/types.d.ts +5 -0
  41. package/src/plugins/loverflow/types.js +3 -0
  42. package/src/plugins/loverflow/types.js.map +1 -0
  43. package/src/utils/elementbuilder/AssetBuilder.d.ts +1 -1
  44. package/src/utils/elementbuilder/AssetBuilder.js +2 -2
  45. package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
  46. package/src/utils/elementbuilder/ElementBuilder.d.ts +2 -1
  47. package/src/utils/elementbuilder/ElementBuilder.js +5 -0
  48. package/src/utils/elementbuilder/ElementBuilder.js.map +1 -1
  49. package/src/utils/elementbuilder/LiquidityBuilder.js +1 -1
  50. package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AssetBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/AssetBuilder.ts"],"names":[],"mappings":";;;;;;AAKA,gEAAqC;AAErC,4FAAoE;AAGpE,MAAa,YAAY;IAMvB,YAAY,MAA4B;QACtC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,KAAK,CAAC;IACvD,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;QAE1B,IAAI,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,IAAI,CAAC;QACjC,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,cAAc;YACtB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC,CAAC;QAEvD,OAAO,IAAA,gCAAsB,EAC3B,UAAU,CAAC,OAAO,EAClB,MAAM,CAAC,QAAQ,EAAE,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;CACF;AAlCD,oCAkCC"}
1
+ {"version":3,"file":"AssetBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/AssetBuilder.ts"],"names":[],"mappings":";;;;;;AAKA,gEAAqC;AAErC,4FAAoE;AAGpE,MAAa,YAAY;IAMvB,YAAY,MAA4B;QACtC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC1C,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,KAAK,CAAC;IACvD,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B,EAC1B,UAAoB;QAEpB,IAAI,MAAM,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE;YAAE,OAAO,IAAI,CAAC;QAChD,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAE7B,IAAI,CAAC,IAAI,CAAC,cAAc;YACtB,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC,CAAC;QAEvD,OAAO,IAAA,gCAAsB,EAC3B,UAAU,CAAC,OAAO,EAClB,MAAM,CAAC,QAAQ,EAAE,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,CAAC;CACF;AAnCD,oCAmCC"}
@@ -5,8 +5,9 @@ export declare abstract class ElementBuilder {
5
5
  readonly type: PortfolioElementTypeType;
6
6
  readonly label: PortfolioElementLabel;
7
7
  readonly name?: string;
8
- readonly tags?: string[];
8
+ tags?: string[];
9
9
  protected constructor(params: ElementParams);
10
+ addTag(tag: string): void;
10
11
  abstract mints(): string[];
11
12
  abstract get(networkId: NetworkIdType, platformId: string, tokenPrices: TokenPriceMap): PortfolioElement | null;
12
13
  }
@@ -8,6 +8,11 @@ class ElementBuilder {
8
8
  this.name = params.name;
9
9
  this.tags = params.tags;
10
10
  }
11
+ addTag(tag) {
12
+ if (!this.tags)
13
+ this.tags = [];
14
+ this.tags.push(tag);
15
+ }
11
16
  }
12
17
  exports.ElementBuilder = ElementBuilder;
13
18
  //# sourceMappingURL=ElementBuilder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAMlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;CASF;AApBD,wCAoBC"}
1
+ {"version":3,"file":"ElementBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBuilder.ts"],"names":[],"mappings":";;;AASA,MAAsB,cAAc;IAMlC,YAAsB,MAAqB;QACzC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,GAAW;QAChB,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QAC/B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;CASF;AAzBD,wCAyBC"}
@@ -26,7 +26,7 @@ class LiquidityBuilder {
26
26
  }
27
27
  get(networkId, tokenPrices) {
28
28
  const assets = this.assets
29
- .map((a) => a.get(networkId, tokenPrices))
29
+ .map((a) => a.get(networkId, tokenPrices, true))
30
30
  .filter((a) => a !== null);
31
31
  const rewardAssets = this.rewardAssets
32
32
  .map((a) => a.get(networkId, tokenPrices))
@@ -1 +1 @@
1
- {"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;AAG9C,MAAa,gBAAgB;IAK3B;QACE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,QAAQ,CAAC,MAA4B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,C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iB,GAAG,IAAA,+BAAc,EACtC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CACzC,CAAC;QACF,MAAM,KAAK,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC,CAAC;QAE5D,IAAI,KAAK,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAE7B,OAAO;YACL,MAAM;YACN,WAAW;YACX,YAAY;YACZ,iBAAiB;YACjB,KAAK;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;SACE,CAAC;IAC1B,CAAC;CACF;AA5DD,4CA4DC"}
1
+ {"version":3,"file":"LiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AAEpC,iDAA8C;AAG9C,MAAa,gBAAgB;IAK3B;QACE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,CAAC;IAED,QAAQ,CAAC,MAA4B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,cAAc,CAAC,MAA4B;QACzC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,2BAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;IAED,QAAQ,CAAC,MAAa;QACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK;QACH,OAAO;YACL,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACpC,GAAG,IAAI,CAAC,YAAY,CAAC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