@sonarwatch/portfolio-plugins 0.14.32 → 0.14.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/alphafi/positionsFetcher.js +1 -1
  4. package/src/plugins/alphafi/positionsFetcher.js.map +1 -1
  5. package/src/plugins/cetus/vaultsJob.js +1 -0
  6. package/src/plugins/cetus/vaultsJob.js.map +1 -1
  7. package/src/plugins/elixir/positionsFetcher.js +29 -51
  8. package/src/plugins/elixir/positionsFetcher.js.map +1 -1
  9. package/src/plugins/flash/helpers.d.ts +1 -1
  10. package/src/plugins/flash/helpers.js +2 -2
  11. package/src/plugins/flash/helpers.js.map +1 -1
  12. package/src/plugins/flash/poolJob.js +25 -5
  13. package/src/plugins/flash/poolJob.js.map +1 -1
  14. package/src/plugins/flash/structs.d.ts +4 -0
  15. package/src/plugins/flash/structs.js +4 -0
  16. package/src/plugins/flash/structs.js.map +1 -1
  17. package/src/plugins/flash/types.d.ts +1 -0
  18. package/src/plugins/haedal/vaultFetcher.js +1 -2
  19. package/src/plugins/haedal/vaultFetcher.js.map +1 -1
  20. package/src/plugins/kai/vaultsJob.js +1 -2
  21. package/src/plugins/kai/vaultsJob.js.map +1 -1
  22. package/src/plugins/kriya/vaultsFetcher.js +1 -2
  23. package/src/plugins/kriya/vaultsFetcher.js.map +1 -1
  24. package/src/plugins/metaplex/resizableNftFetcher.js +3 -1
  25. package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -1
  26. package/src/plugins/mole/depositsFetcher.js +1 -1
  27. package/src/plugins/mole/depositsFetcher.js.map +1 -1
  28. package/src/plugins/tensor/airdropPowerUsersFetcher.js +25 -21
  29. package/src/plugins/tensor/airdropPowerUsersFetcher.js.map +1 -1
  30. package/src/plugins/tensor/constants.d.ts +1 -3
  31. package/src/plugins/tensor/constants.js +2 -4
  32. package/src/plugins/tensor/constants.js.map +1 -1
  33. package/src/plugins/tensor/filters.d.ts +1 -1
  34. package/src/plugins/tensor/filters.js +5 -5
  35. package/src/plugins/tensor/filters.js.map +1 -1
  36. package/src/plugins/tensor/helpers.d.ts +1 -1
  37. package/src/plugins/tensor/helpers.js +4 -7
  38. package/src/plugins/tensor/helpers.js.map +1 -1
  39. package/src/plugins/tensor/sharedEscrowFetcher.js +14 -18
  40. package/src/plugins/tensor/sharedEscrowFetcher.js.map +1 -1
  41. package/src/plugins/tensor/struct.d.ts +5 -0
  42. package/src/plugins/tensor/struct.js +5 -1
  43. package/src/plugins/tensor/struct.js.map +1 -1
  44. package/src/plugins/thala/farmingPoolsFetcher.js +14 -50
  45. package/src/plugins/thala/farmingPoolsFetcher.js.map +1 -1
  46. package/src/plugins/tokens/fetchers/sui.js +3 -3
  47. package/src/plugins/tokens/fetchers/sui.js.map +1 -1
  48. package/src/plugins/tokens/helpers.d.ts +3 -2
  49. package/src/plugins/tokens/helpers.js +5 -4
  50. package/src/plugins/tokens/helpers.js.map +1 -1
  51. package/src/plugins/turbos/clmmVaultFetcher.js +1 -2
  52. package/src/plugins/turbos/clmmVaultFetcher.js.map +1 -1
  53. package/src/plugins/typus/safuFetcher.js +2 -2
  54. package/src/plugins/typus/safuFetcher.js.map +1 -1
  55. package/src/plugins/typus/vaultsFetcher.js +1 -1
  56. package/src/plugins/typus/vaultsFetcher.js.map +1 -1
  57. package/src/utils/elementbuilder/AssetBuilder.d.ts +2 -1
  58. package/src/utils/elementbuilder/AssetBuilder.js +14 -2
  59. package/src/utils/elementbuilder/AssetBuilder.js.map +1 -1
  60. package/src/utils/elementbuilder/ElementLiquidityBuilder.d.ts +2 -1
  61. package/src/utils/elementbuilder/ElementLiquidityBuilder.js +2 -2
  62. package/src/utils/elementbuilder/ElementLiquidityBuilder.js.map +1 -1
  63. package/src/utils/elementbuilder/LiquidityBuilder.d.ts +3 -1
  64. package/src/utils/elementbuilder/LiquidityBuilder.js +5 -2
  65. package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -1
  66. package/src/utils/elementbuilder/LiquidityParams.d.ts +3 -0
  67. package/src/utils/elementbuilder/LiquidityParams.js +3 -0
  68. package/src/utils/elementbuilder/LiquidityParams.js.map +1 -0
  69. package/src/plugins/elixir/helpers.d.ts +0 -2
  70. package/src/plugins/elixir/helpers.js +0 -40
  71. package/src/plugins/elixir/helpers.js.map +0 -1
@@ -97,7 +97,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
97
97
  if (assets.length > 0)
98
98
  elements.push({
99
99
  networkId: portfolio_core_1.NetworkId.sui,
100
- label: 'Deposit',
100
+ label: 'Vault',
101
101
  platformId: constants_1.platformId,
102
102
  name: vault.metadata,
103
103
  type: portfolio_core_1.PortfolioElementType.multiple,
@@ -1 +1 @@
1
- {"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAA6D;AAC7D,iDAAmD;AACnD,qEAAkE;AAElE,uCAA6C;AAC7C,qEAAkE;AAClE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAe,EAC5C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAkB,EAAE;KAC3C,CACF,CAAC;IACF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IACzC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;;QAClC,IAAI,MAAA,MAAM,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC;YACzB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,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C,QAAQ;gBACpB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;gBACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACzD,IAAI,EAAE;oBACJ,MAAM;iBACP;aACF,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAA6D;AAC7D,iDAAmD;AACnD,qEAAkE;AAElE,uCAA6C;AAC7C,qEAAkE;AAClE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAe,EAC5C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAkB,EAAE;KAC3C,CACF,CAAC;IACF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IACzC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;;QAClC,IAAI,MAAA,MAAM,CAAC,IAAI,0CAAE,OAAO,EAAE,CAAC;YACzB,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,IAA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AQ;gBACpB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;gBACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACzD,IAAI,EAAE;oBACJ,MAAM;iBACP;aACF,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -8,5 +8,6 @@ export declare class AssetBuilder {
8
8
  attributes: PortfolioAssetAttributes;
9
9
  alreadyShifted: boolean;
10
10
  constructor(params: PortfolioAssetParams);
11
- get(networkId: NetworkIdType, tokenPrices: TokenPriceMap, keepIfZero?: boolean): PortfolioAsset | null;
11
+ getUnderlyings(networkId: NetworkIdType, tokenPrices: TokenPriceMap): PortfolioAsset[];
12
+ get(networkId: NetworkIdType, tokenPrices: TokenPriceMap): PortfolioAsset | null;
12
13
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AssetBuilder = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  const tokenPriceToAssetToken_1 = __importDefault(require("../misc/tokenPriceToAssetToken"));
9
+ const tokenPriceToAssetTokens_1 = __importDefault(require("../misc/tokenPriceToAssetTokens"));
9
10
  class AssetBuilder {
10
11
  constructor(params) {
11
12
  this.address = params.address.toString();
@@ -13,9 +14,20 @@ class AssetBuilder {
13
14
  this.attributes = params.attributes || {};
14
15
  this.alreadyShifted = params.alreadyShifted || false;
15
16
  }
16
- get(networkId, tokenPrices, keepIfZero) {
17
+ getUnderlyings(networkId, tokenPrices) {
17
18
  let amount = new bignumber_js_1.default(this.amount);
18
- if (!keepIfZero && amount.isZero())
19
+ if (amount.isZero())
20
+ return [];
21
+ const tokenPrice = tokenPrices.get(this.address);
22
+ if (!tokenPrice)
23
+ return [];
24
+ if (!this.alreadyShifted)
25
+ amount = amount.dividedBy(Math.pow(10, tokenPrice.decimals));
26
+ return (0, tokenPriceToAssetTokens_1.default)(tokenPrice.address, amount.toNumber(), networkId, tokenPrice, undefined, this.attributes);
27
+ }
28
+ get(networkId, tokenPrices) {
29
+ let amount = new bignumber_js_1.default(this.amount);
30
+ if (amount.isZero())
19
31
  return null;
20
32
  const tokenPrice = tokenPrices.get(this.address);
21
33
  if (!tokenPrice)
@@ -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,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,M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CAAC,QAAQ,EAAE,EACjB,SAAS,EACT,UAAU,EACV,SAAS,EACT,IAAI,CAAC,UAAU,CAChB,CAAC;IACJ,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;AAxDD,oCAwDC"}
@@ -3,10 +3,11 @@ import { ElementBuilder } from './ElementBuilder';
3
3
  import { ElementParams } from './ElementParams';
4
4
  import { TokenPriceMap } from '../../TokenPriceMap';
5
5
  import { LiquidityBuilder } from './LiquidityBuilder';
6
+ import { LiquidityParams } from './LiquidityParams';
6
7
  export declare class ElementLiquidityBuilder extends ElementBuilder {
7
8
  liquidities: LiquidityBuilder[];
8
9
  constructor(params: ElementParams);
9
- addLiquidity(): LiquidityBuilder;
10
+ addLiquidity(params?: LiquidityParams): LiquidityBuilder;
10
11
  mints(): string[];
11
12
  get(networkId: NetworkIdType, platformId: string, tokenPrices: TokenPriceMap): PortfolioElement | null;
12
13
  }
@@ -9,8 +9,8 @@ class ElementLiquidityBuilder extends ElementBuilder_1.ElementBuilder {
9
9
  super(params);
10
10
  this.liquidities = [];
11
11
  }
12
- addLiquidity() {
13
- const liquidityBuilder = new LiquidityBuilder_1.LiquidityBuilder();
12
+ addLiquidity(params) {
13
+ const liquidityBuilder = new LiquidityBuilder_1.LiquidityBuilder(params);
14
14
  this.liquidities.push(liquidityBuilder);
15
15
  return liquidityBuilder;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ElementLiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementLiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAGlD,yDAAsD;AAEtD,MAAa,uBAAwB,SAAQ,+BAAc;IAGzD,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,YAAY;QACV,MAAM,gBAAgB,GAAG,IAAI,mCAAgB,EAAE,CAAC;QAChD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACxC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;IAEQ,GAAG,CACV,SAAwB,EACxB,UAAkB,EAClB,WAA0B;QAE1B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAyB,CAAC;QAErD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAE1C,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU;YACV,IAAI,EAAE;gBACJ,WAAW;aACZ;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9D,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAAoC,CAAC;IAC9C,CAAC;CACF;AA5CD,0DA4CC"}
1
+ {"version":3,"file":"ElementLiquidityBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementLiquidityBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAMoC;AACpC,qDAAkD;AAGlD,yDAAsD;AAGtD,MAAa,uBAAwB,SAAQ,+BAAc;IAGzD,YAAY,MAAqB;QAC/B,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;IAED,YAAY,CAAC,MAAwB;QACnC,MAAM,gBAAgB,GAAG,IAAI,mCAAgB,CAAC,MAAM,CAAC,CAAC;QACtD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACxC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACvE,CAAC;IAEQ,GAAG,CACV,SAAwB,EACxB,UAAkB,EAClB,WAA0B;QAE1B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAyB,CAAC;QAErD,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAE1C,MAAM,OAAO,GAAG;YACd,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU;YACV,IAAI,EAAE;gBACJ,WAAW;aACZ;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC9D,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;QAEF,OAAO,OAAoC,CAAC;IAC9C,CAAC;CACF;AA5CD,0DA4CC"}
@@ -2,11 +2,13 @@ import { NetworkIdType, PortfolioLiquidity, Yield } from '@sonarwatch/portfolio-
2
2
  import { TokenPriceMap } from '../../TokenPriceMap';
3
3
  import { AssetBuilder } from './AssetBuilder';
4
4
  import { PortfolioAssetParams } from './PortfolioAssetParams';
5
+ import { LiquidityParams } from './LiquidityParams';
5
6
  export declare class LiquidityBuilder {
7
+ private readonly params?;
6
8
  assets: AssetBuilder[];
7
9
  rewardAssets: AssetBuilder[];
8
10
  yields: Yield[];
9
- constructor();
11
+ constructor(params?: LiquidityParams);
10
12
  addAsset(params: PortfolioAssetParams): void;
11
13
  addRewardAsset(params: PortfolioAssetParams): void;
12
14
  addYield(ayield: Yield): void;
@@ -4,10 +4,11 @@ exports.LiquidityBuilder = void 0;
4
4
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
5
5
  const AssetBuilder_1 = require("./AssetBuilder");
6
6
  class LiquidityBuilder {
7
- constructor() {
7
+ constructor(params) {
8
8
  this.assets = [];
9
9
  this.rewardAssets = [];
10
10
  this.yields = [];
11
+ this.params = params;
11
12
  }
12
13
  addAsset(params) {
13
14
  this.assets.push(new AssetBuilder_1.AssetBuilder(params));
@@ -26,7 +27,8 @@ class LiquidityBuilder {
26
27
  }
27
28
  get(networkId, tokenPrices) {
28
29
  const assets = this.assets
29
- .map((a) => a.get(networkId, tokenPrices, true))
30
+ .map((a) => a.getUnderlyings(networkId, tokenPrices))
31
+ .flat()
30
32
  .filter((a) => a !== null);
31
33
  const rewardAssets = this.rewardAssets
32
34
  .map((a) => a.get(networkId, tokenPrices))
@@ -45,6 +47,7 @@ class LiquidityBuilder {
45
47
  rewardAssetsValue,
46
48
  value,
47
49
  yields: this.yields,
50
+ name: this.params ? this.params.name : undefined,
48
51
  };
49
52
  }
50
53
  }
@@ -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,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B,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;AAI9C,MAAa,gBAAgB;IAM3B,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,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,cAAc,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;aACpD,IAAI,EAAE;aACN,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAqB,CAAC;QACjD,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY;aACnC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAqB,CAAC;QAEjD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAElE,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACvE,MAAM,iBAAiB,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,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAE5B,OAAO;YACL,MAAM;YACN,WAAW;YACX,YAAY;YACZ,iBAAiB;YACjB,KAAK;YACL,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SAC3B,CAAC;IAC1B,CAAC;CACF;AAhED,4CAgEC"}
@@ -0,0 +1,3 @@
1
+ export type LiquidityParams = {
2
+ name?: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=LiquidityParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiquidityParams.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/LiquidityParams.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export declare function convertDecimalStringToScaledBigInt(e: string, t?: number): bigint;
2
- export declare function formatAndCleanBigInt(e: bigint, t?: number): string;
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.formatAndCleanBigInt = exports.convertDecimalStringToScaledBigInt = void 0;
4
- function convertDecimalStringToScaledBigInt(e, t = 18) {
5
- const n = e.split('.');
6
- if (n.length === 2) {
7
- const [r, i] = n;
8
- if (BigInt(r) > BigInt(0))
9
- return BigInt(`${r}${i}${'0'.repeat(t - i.length)}`);
10
- return i.length < t
11
- ? BigInt(`${i}${'0'.repeat(t - i.length)}`)
12
- : BigInt(`${i}`.substring(0, t));
13
- }
14
- return BigInt(`${e}${'0'.repeat(t)}`);
15
- }
16
- exports.convertDecimalStringToScaledBigInt = convertDecimalStringToScaledBigInt;
17
- function cleanNumericString(e) {
18
- return e
19
- .replace(/0+$/, '')
20
- .replace(/\.$/, '')
21
- .replace(/^0+/, '')
22
- .replace(/^\./, '0.')
23
- .replace(/^$/, '0');
24
- }
25
- function formatBigIntWithDecimals(e, t = 0) {
26
- const n = e.toString();
27
- const r = n.length;
28
- if (r <= t)
29
- return `0.${'0'.repeat(t - r)}${n}`;
30
- {
31
- const i = n.slice(0, r - t);
32
- const s = n.slice(r - t);
33
- return `${i}.${s}`;
34
- }
35
- }
36
- function formatAndCleanBigInt(e, t = 0) {
37
- return cleanNumericString(formatBigIntWithDecimals(e, t));
38
- }
39
- exports.formatAndCleanBigInt = formatAndCleanBigInt;
40
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/elixir/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,kCAAkC,CAAC,CAAS,EAAE,C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