@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.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/cetus/clmmsFetcher.js +59 -55
- package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
- package/src/plugins/cetus/farmsFetcher.js +66 -37
- package/src/plugins/cetus/farmsFetcher.js.map +1 -1
- package/src/plugins/cetus/helpers.d.ts +3 -1
- package/src/plugins/cetus/helpers.js +102 -1
- package/src/plugins/cetus/helpers.js.map +1 -1
- package/src/plugins/cetus/types.d.ts +28 -0
- package/src/plugins/cetus/types.js.map +1 -1
- package/src/plugins/jupiter/governance/asrAirdropFetcher.d.ts +3 -3
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js +50 -71
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js.map +1 -1
- package/src/plugins/jupiter/governance/constants.d.ts +12 -1
- package/src/plugins/jupiter/governance/constants.js +46 -2
- package/src/plugins/jupiter/governance/constants.js.map +1 -1
- package/src/plugins/jupiter/governance/index.d.ts +5 -0
- package/src/plugins/jupiter/governance/index.js +20 -0
- package/src/plugins/jupiter/governance/index.js.map +1 -0
- package/src/plugins/jupiter/index.js +5 -3
- package/src/plugins/jupiter/index.js.map +1 -1
- package/src/plugins/loverflow/airdropClaimFetcher.d.ts +3 -0
- package/src/plugins/loverflow/airdropClaimFetcher.js +42 -0
- package/src/plugins/loverflow/airdropClaimFetcher.js.map +1 -0
- package/src/plugins/loverflow/constants.d.ts +6 -0
- package/src/plugins/loverflow/constants.js +16 -0
- package/src/plugins/loverflow/constants.js.map +1 -0
- package/src/plugins/loverflow/helpers.d.ts +2 -0
- package/src/plugins/loverflow/helpers.js +9 -0
- package/src/plugins/loverflow/helpers.js.map +1 -0
- package/src/plugins/loverflow/index.d.ts +6 -0
- package/src/plugins/loverflow/index.js +12 -0
- package/src/plugins/loverflow/index.js.map +1 -0
- package/src/plugins/loverflow/structs.d.ts +16 -0
- package/src/plugins/loverflow/structs.js +18 -0
- package/src/plugins/loverflow/structs.js.map +1 -0
- package/src/plugins/loverflow/types.d.ts +5 -0
- package/src/plugins/loverflow/types.js +3 -0
- package/src/plugins/loverflow/types.js.map +1 -0
- package/src/utils/elementbuilder/AssetBuilder.d.ts +1 -1
- package/src/utils/elementbuilder/AssetBuilder.js +2 -2
- package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
- package/src/utils/elementbuilder/ElementBuilder.d.ts +2 -1
- package/src/utils/elementbuilder/ElementBuilder.js +5 -0
- package/src/utils/elementbuilder/ElementBuilder.js.map +1 -1
- package/src/utils/elementbuilder/LiquidityBuilder.js +1 -1
- 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;
|
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
|
-
|
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;
|
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,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,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC3C,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;QAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;aACvB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;
|
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,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC3C,CAAC;IACJ,CAAC;IAED,GAAG,CACD,SAAwB,EACxB,WAA0B;QAE1B,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM;aACvB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;aAC/C,MAAM,CAAC,CAAC,CAAC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