@sonarwatch/portfolio-plugins 0.12.163 → 0.12.165

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +4 -4
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/abex/types.d.ts +5 -12
  6. package/src/plugins/aftermath/types.d.ts +2 -6
  7. package/src/plugins/alphafi/types.d.ts +1 -3
  8. package/src/plugins/bucket/types.d.ts +2 -3
  9. package/src/plugins/cetus/clmmsFetcher.js +3 -3
  10. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  11. package/src/plugins/cetus/constants.d.ts +2 -0
  12. package/src/plugins/cetus/constants.js +5 -1
  13. package/src/plugins/cetus/constants.js.map +1 -1
  14. package/src/plugins/cetus/farmsFetcher.js +118 -0
  15. package/src/plugins/cetus/farmsFetcher.js.map +1 -0
  16. package/src/plugins/cetus/helpers.js +3 -2
  17. package/src/plugins/cetus/helpers.js.map +1 -1
  18. package/src/plugins/cetus/index.js +4 -2
  19. package/src/plugins/cetus/index.js.map +1 -1
  20. package/src/plugins/cetus/types.d.ts +92 -3
  21. package/src/plugins/cetus/types.js.map +1 -1
  22. package/src/plugins/cetus/vaultsJob.d.ts +3 -0
  23. package/src/plugins/cetus/vaultsJob.js +101 -0
  24. package/src/plugins/cetus/vaultsJob.js.map +1 -0
  25. package/src/plugins/drift/index.js +2 -1
  26. package/src/plugins/drift/index.js.map +1 -1
  27. package/src/plugins/flowx/stakingPoolV3Fetcher.js +2 -2
  28. package/src/plugins/flowx/stakingPoolV3Fetcher.js.map +1 -1
  29. package/src/plugins/flowx/types.d.ts +2 -3
  30. package/src/plugins/haedal/types.d.ts +1 -3
  31. package/src/plugins/jewel/types.d.ts +1 -3
  32. package/src/plugins/kai/types.d.ts +3 -6
  33. package/src/plugins/kriya/types.d.ts +1 -3
  34. package/src/plugins/kriya/types.js.map +1 -1
  35. package/src/plugins/{flexlend → lulo}/constants.d.ts +1 -1
  36. package/src/plugins/{flexlend → lulo}/constants.js +2 -2
  37. package/src/plugins/lulo/constants.js.map +1 -0
  38. package/src/plugins/lulo/depositsFetcher.js.map +1 -0
  39. package/src/plugins/{flexlend → lulo}/helpers.js +1 -1
  40. package/src/plugins/lulo/helpers.js.map +1 -0
  41. package/src/plugins/{flexlend → lulo}/index.js +6 -1
  42. package/src/plugins/lulo/index.js.map +1 -0
  43. package/src/plugins/lulo/liftFetcher.d.ts +3 -0
  44. package/src/plugins/{flexlend → lulo}/liftFetcher.js +1 -1
  45. package/src/plugins/lulo/liftFetcher.js.map +1 -0
  46. package/src/plugins/lulo/rewardsFetcher.d.ts +3 -0
  47. package/src/plugins/lulo/rewardsFetcher.js +38 -0
  48. package/src/plugins/lulo/rewardsFetcher.js.map +1 -0
  49. package/src/plugins/lulo/struct.js.map +1 -0
  50. package/src/plugins/navi/types.d.ts +4 -9
  51. package/src/plugins/orca/getWhirlpoolPositions.js +17 -20
  52. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  53. package/src/plugins/raydium/getRaydiumCLMMPositions.js +21 -11
  54. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  55. package/src/plugins/raydium/helpers.d.ts +5 -1
  56. package/src/plugins/raydium/helpers.js +59 -11
  57. package/src/plugins/raydium/helpers.js.map +1 -1
  58. package/src/plugins/scallop/types/basic.d.ts +2 -3
  59. package/src/plugins/scallop/types/data.d.ts +1 -3
  60. package/src/plugins/tokens/fetchers/sui.js +1 -8
  61. package/src/plugins/tokens/fetchers/sui.js.map +1 -1
  62. package/src/plugins/tradeport/types.d.ts +1 -4
  63. package/src/plugins/turbos/clmmVaultFetcher.js +2 -2
  64. package/src/plugins/turbos/clmmVaultFetcher.js.map +1 -1
  65. package/src/plugins/turbos/clmmsPositionsFetcher.js +2 -1
  66. package/src/plugins/turbos/clmmsPositionsFetcher.js.map +1 -1
  67. package/src/plugins/turbos/helper.d.ts +0 -1
  68. package/src/plugins/turbos/helper.js +1 -6
  69. package/src/plugins/turbos/helper.js.map +1 -1
  70. package/src/plugins/turbos/types.d.ts +2 -6
  71. package/src/plugins/typus/constants.d.ts +8 -0
  72. package/src/plugins/typus/constants.js +12 -1
  73. package/src/plugins/typus/constants.js.map +1 -1
  74. package/src/plugins/typus/index.js +4 -2
  75. package/src/plugins/typus/index.js.map +1 -1
  76. package/src/plugins/typus/safuFetcher.d.ts +3 -0
  77. package/src/plugins/typus/safuFetcher.js +97 -0
  78. package/src/plugins/typus/safuFetcher.js.map +1 -0
  79. package/src/plugins/typus/safuVaultsJob.d.ts +3 -0
  80. package/src/plugins/typus/safuVaultsJob.js +30 -0
  81. package/src/plugins/typus/safuVaultsJob.js.map +1 -0
  82. package/src/plugins/typus/safu_helpers.d.ts +8 -0
  83. package/src/plugins/typus/safu_helpers.js +205 -0
  84. package/src/plugins/typus/safu_helpers.js.map +1 -0
  85. package/src/plugins/typus/safu_types.d.ts +55 -0
  86. package/src/plugins/typus/safu_types.js +3 -0
  87. package/src/plugins/typus/safu_types.js.map +1 -0
  88. package/src/plugins/typus/types.d.ts +1 -3
  89. package/src/utils/sui/bitsToNumber.d.ts +1 -0
  90. package/src/utils/sui/bitsToNumber.js +11 -0
  91. package/src/utils/sui/bitsToNumber.js.map +1 -0
  92. package/src/utils/sui/structs/id.d.ts +3 -0
  93. package/src/utils/sui/structs/id.js +3 -0
  94. package/src/utils/sui/structs/id.js.map +1 -0
  95. package/src/utils/sui/structs/nft.d.ts +2 -3
  96. package/src/utils/sui/types.d.ts +2 -3
  97. package/src/plugins/flexlend/constants.js.map +0 -1
  98. package/src/plugins/flexlend/depositsFetcher.js.map +0 -1
  99. package/src/plugins/flexlend/helpers.js.map +0 -1
  100. package/src/plugins/flexlend/index.js.map +0 -1
  101. package/src/plugins/flexlend/liftFetcher.js.map +0 -1
  102. package/src/plugins/flexlend/struct.js.map +0 -1
  103. /package/src/plugins/{flexlend/depositsFetcher.d.ts → cetus/farmsFetcher.d.ts} +0 -0
  104. /package/src/plugins/{flexlend/liftFetcher.d.ts → lulo/depositsFetcher.d.ts} +0 -0
  105. /package/src/plugins/{flexlend → lulo}/depositsFetcher.js +0 -0
  106. /package/src/plugins/{flexlend → lulo}/helpers.d.ts +0 -0
  107. /package/src/plugins/{flexlend → lulo}/index.d.ts +0 -0
  108. /package/src/plugins/{flexlend → lulo}/struct.d.ts +0 -0
  109. /package/src/plugins/{flexlend → lulo}/struct.js +0 -0
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const clients_1 = require("../../utils/clients");
18
+ const constants_1 = require("./constants");
19
+ const helpers_1 = require("./helpers");
20
+ const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
21
+ const getDynamicFieldObjects_1 = require("../../utils/sui/getDynamicFieldObjects");
22
+ const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
23
+ const bitsToNumber_1 = require("../../utils/sui/bitsToNumber");
24
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
25
+ var _a;
26
+ const client = (0, clients_1.getClientSui)();
27
+ const vaultToPoolMapItems = yield (0, getDynamicFieldObjects_1.getDynamicFieldObjects)(client, constants_1.vaultManagerMap);
28
+ const vaults = yield (0, multiGetObjects_1.multiGetObjects)(client, vaultToPoolMapItems
29
+ .map((vaultToPoolMapItem) => { var _a, _b; return (_b = (_a = vaultToPoolMapItem.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.name; })
30
+ .filter((v) => v !== null));
31
+ const pools = (yield cache.getItems(vaults
32
+ .map((v) => { var _a, _b; return (_b = (_a = v.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.pool; })
33
+ .filter((s) => s !== null), {
34
+ prefix: constants_1.clmmPoolsPrefix,
35
+ networkId: portfolio_core_1.NetworkId.sui,
36
+ })).filter((p) => p !== null);
37
+ const tokenPriceSources = [];
38
+ for (const vault of vaults) {
39
+ if (!((_a = vault.data) === null || _a === void 0 ? void 0 : _a.content))
40
+ continue;
41
+ const pool = pools.find((p) => { var _a, _b; return p.poolAddress === ((_b = (_a = vault.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.pool); });
42
+ if (!pool)
43
+ continue;
44
+ const { type_arguments: typeArgs } = (0, helpers_1.extractStructTagFromType)(vault.data.type);
45
+ const [lpToken] = typeArgs;
46
+ const totalSupply = new bignumber_js_1.default(vault.data.content.fields.lp_token_treasury.fields.total_supply.fields.value);
47
+ const balances = {};
48
+ vault.data.content.fields.positions.forEach((position) => {
49
+ const { tokenAmountA, tokenAmountB } = (0, tokenAmountFromLiquidity_1.getTokenAmountsFromLiquidity)(new bignumber_js_1.default(position.fields.clmm_postion.fields.liquidity), pool.current_tick_index, (0, bitsToNumber_1.bitsToNumber)(position.fields.clmm_postion.fields.tick_lower_index.fields.bits), (0, bitsToNumber_1.bitsToNumber)(position.fields.clmm_postion.fields.tick_upper_index.fields.bits), false);
50
+ const coinTypeA = (0, portfolio_core_1.formatMoveTokenAddress)(pool.coinTypeA);
51
+ const coinTypeB = (0, portfolio_core_1.formatMoveTokenAddress)(pool.coinTypeB);
52
+ if (tokenAmountA.isGreaterThan(0)) {
53
+ balances[coinTypeA] = (balances[coinTypeA] || new bignumber_js_1.default(0)).plus(tokenAmountA);
54
+ }
55
+ if (tokenAmountB.isGreaterThan(0)) {
56
+ balances[coinTypeB] = (balances[coinTypeB] || new bignumber_js_1.default(0)).plus(tokenAmountB);
57
+ }
58
+ });
59
+ const coinMetadata = yield client.getCoinMetadata({ coinType: lpToken });
60
+ if (!coinMetadata)
61
+ continue;
62
+ const tokenPrices = yield cache.getTokenPricesAsMap(Object.keys(balances).map((c) => c), portfolio_core_1.NetworkId.sui);
63
+ const underlyings = Object.keys(balances)
64
+ .map((address) => {
65
+ const balance = balances[address];
66
+ const tokenPrice = tokenPrices.get(address);
67
+ if (!tokenPrice)
68
+ return null;
69
+ const amountPerLp = balance
70
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
71
+ .dividedBy(totalSupply.dividedBy(Math.pow(10, coinMetadata.decimals)));
72
+ return {
73
+ networkId: portfolio_core_1.NetworkId.sui,
74
+ address: tokenPrice.address,
75
+ price: tokenPrice.price,
76
+ decimals: tokenPrice.decimals,
77
+ amountPerLp: amountPerLp.toNumber(),
78
+ };
79
+ })
80
+ .filter((u) => u !== null);
81
+ tokenPriceSources.push({
82
+ id: vault.data.content.fields.id.id,
83
+ weight: 1,
84
+ address: (0, portfolio_core_1.formatMoveTokenAddress)(lpToken),
85
+ networkId: portfolio_core_1.NetworkId.sui,
86
+ platformId: constants_1.platformId,
87
+ decimals: coinMetadata.decimals,
88
+ price: underlyings.reduce((acc, u) => u.price * u.amountPerLp + acc, 0),
89
+ underlyings,
90
+ timestamp: Date.now(),
91
+ });
92
+ }
93
+ yield cache.setTokenPriceSources(tokenPriceSources);
94
+ });
95
+ const job = {
96
+ id: `${constants_1.platformId}-vaults`,
97
+ executor,
98
+ label: 'normal',
99
+ };
100
+ exports.default = job;
101
+ //# sourceMappingURL=vaultsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultsJ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"}
@@ -10,9 +10,10 @@ const prepMarketsJob_1 = __importDefault(require("./prepMarketsJob"));
10
10
  const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
11
11
  const premarketJob_1 = __importDefault(require("./premarketJob"));
12
12
  // import airdropFetcher from './airdropFetcher';
13
+ const airdropFetcher_1 = __importDefault(require("./airdropFetcher"));
13
14
  exports.platforms = [constants_1.platform];
14
15
  exports.jobs = [spotMarketsJob_1.default, premarketJob_1.default, prepMarketsJob_1.default];
15
- exports.fetchers = [depositsFetcher_1.default];
16
+ exports.fetchers = [depositsFetcher_1.default, airdropFetcher_1.default];
16
17
  var helpersAirdrop_1 = require("./helpersAirdrop");
17
18
  Object.defineProperty(exports, "airdropFetcher", { enumerable: true, get: function () { return helpersAirdrop_1.airdropFetcher; } });
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAC9C,sEAA8C;AAC9C,wEAAgD;AAChD,kEAA0C;AAC1C,iDAAiD;AAEpC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,wBAAc,EAAE,sBAAY,EAAE,wBAAc,CAAC,CAAC;AAC7D,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC;AACrD,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAC9C,sEAA8C;AAC9C,wEAAgD;AAChD,kEAA0C;AAC1C,iDAAiD;AACjD,sEAAmD;AAEtC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,wBAAc,EAAE,sBAAY,EAAE,wBAAc,CAAC,CAAC;AAC7D,QAAA,QAAQ,GAAc,CAAC,yBAAe,EAAE,wBAAmB,CAAC,CAAC;AAC1E,mDAAkD;AAAzC,gHAAA,cAAc,OAAA"}
@@ -20,7 +20,7 @@ const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
20
20
  const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
21
21
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
22
  const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
23
- const helpers_1 = require("../cetus/helpers");
23
+ const bitsToNumber_1 = require("../../utils/sui/bitsToNumber");
24
24
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
25
  const client = (0, clients_1.getClientSui)();
26
26
  const positions = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
@@ -59,7 +59,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
59
59
  const tokenPriceY = tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(position.data.content.fields.coin_type_y.fields.name));
60
60
  if (!tokenPriceX || !tokenPriceY)
61
61
  return;
62
- const tokenAmounts = (0, tokenAmountFromLiquidity_1.getTokenAmountsFromLiquidity)(new bignumber_js_1.default((_h = (_g = position.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.fields.liquidity), (0, helpers_1.asIntN)(BigInt((_k = (_j = pool === null || pool === void 0 ? void 0 : pool.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.tick_index.fields.bits)), (0, helpers_1.asIntN)(BigInt((_m = (_l = position.data) === null || _l === void 0 ? void 0 : _l.content) === null || _m === void 0 ? void 0 : _m.fields.tick_lower_index.fields.bits)), (0, helpers_1.asIntN)(BigInt((_p = (_o = position.data) === null || _o === void 0 ? void 0 : _o.content) === null || _p === void 0 ? void 0 : _p.fields.tick_upper_index.fields.bits)), false);
62
+ const tokenAmounts = (0, tokenAmountFromLiquidity_1.getTokenAmountsFromLiquidity)(new bignumber_js_1.default((_h = (_g = position.data) === null || _g === void 0 ? void 0 : _g.content) === null || _h === void 0 ? void 0 : _h.fields.liquidity), (0, bitsToNumber_1.bitsToNumber)((_k = (_j = pool === null || pool === void 0 ? void 0 : pool.data) === null || _j === void 0 ? void 0 : _j.content) === null || _k === void 0 ? void 0 : _k.fields.tick_index.fields.bits), (0, bitsToNumber_1.bitsToNumber)((_m = (_l = position.data) === null || _l === void 0 ? void 0 : _l.content) === null || _m === void 0 ? void 0 : _m.fields.tick_lower_index.fields.bits), (0, bitsToNumber_1.bitsToNumber)((_p = (_o = position.data) === null || _o === void 0 ? void 0 : _o.content) === null || _p === void 0 ? void 0 : _p.fields.tick_upper_index.fields.bits), false);
63
63
  const assetX = (0, tokenPriceToAssetToken_1.default)(tokenPriceX.address, tokenAmounts.tokenAmountA
64
64
  .dividedBy(Math.pow(10, tokenPriceX.decimals))
65
65
  .toNumber(), portfolio_core_1.NetworkId.sui, tokenPriceX);
@@ -1 +1 @@
1
- {"version":3,"file":"stakingPoolV3Fetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/stakingPoolV3Fetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AAEnD,qEAAkE;AAClE,wFAAyF;AACzF,qGAA6E;AAC7E,qEAAkE;AAClE,8CAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAe,EAAmB,MAAM,EAAE,KAAK,EAAE;QACvE,MAAM,EAAE;YACN,UAAU,EAAE,GAAG,uBAAW,sBAAsB;SACjD;KACF,CAAC,CAAC;IACH,IAAI,SAAS,CAAC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CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,eAAe;YACtB,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,kBAAkB;IACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"stakingPoolV3Fetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flowx/stakingPoolV3Fetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAGrC,2CAAsD;AACtD,iDAAmD;AAEnD,qEAAkE;AAClE,wFAAyF;AACzF,qGAA6E;AAC7E,qEAAkE;AAClE,+DAA4D;AAE5D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAe,EAAmB,MAAM,EAAE,KAAK,EAAE;QACvE,MAAM,EAAE;YACN,UAAU,EAAE,GAAG,uBAAW,sBAAsB;SACjD;KACF,CAAC,CAAC;IACH,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAA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B,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,EAAE;gBACJ,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,kBAAkB;IACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type StakingPosition = {
2
3
  id: {
3
4
  id: string;
@@ -20,9 +21,7 @@ export type UnstakingPositionObject = {
20
21
  export type PositionObject = {
21
22
  amount: string;
22
23
  flx_reward_debt: string;
23
- id: {
24
- id: string;
25
- };
24
+ id: ID;
26
25
  pool_idx: string;
27
26
  token_reward_debt: string;
28
27
  };
@@ -1,11 +1,9 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type UserInfo = {
2
3
  id: ID;
3
4
  name: string;
4
5
  value: Value;
5
6
  };
6
- export type ID = {
7
- id: string;
8
- };
9
7
  export type Value = {
10
8
  fields: Fields;
11
9
  type: string;
@@ -1,11 +1,9 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type UserInfo = {
2
3
  id: ID;
3
4
  name: string;
4
5
  value: UserInfoValueV1;
5
6
  };
6
- export type ID = {
7
- id: string;
8
- };
9
7
  export type UserInfoValueV1 = {
10
8
  fields: UserInfoFieldsV1;
11
9
  type: string;
@@ -1,14 +1,11 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export interface Vault {
2
3
  free_balance: string;
3
- id: {
4
- id: string;
5
- };
4
+ id: ID;
6
5
  lp_treasury: {
7
6
  type: string;
8
7
  fields: {
9
- id: {
10
- id: string;
11
- };
8
+ id: ID;
12
9
  total_supply: {
13
10
  type: string;
14
11
  fields: {
@@ -1,3 +1,4 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type VaultInfo = {
2
3
  id: string;
3
4
  underlyingPool: string;
@@ -30,9 +31,6 @@ export type Vault = {
30
31
  upper_trigger_price: string;
31
32
  upper_trigger_price_scalling: string;
32
33
  };
33
- export type ID = {
34
- id: string;
35
- };
36
34
  export type RewardsBag = {
37
35
  fields: RewardsBagFields;
38
36
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/types.ts"],"names":[],"mappings":";;;AAgJA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,wBAAU,CAAA;IACV,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,wCAA0B,CAAA;IAC1B,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/types.ts"],"names":[],"mappings":";;;AA8IA,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,wBAAU,CAAA;IACV,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,wCAA0B,CAAA;IAC1B,6BAAe,CAAA;AACjB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB"}
@@ -2,5 +2,5 @@ import { PublicKey } from '@solana/web3.js';
2
2
  import { Platform } from '@sonarwatch/portfolio-core';
3
3
  export declare const platformId = "flexlend";
4
4
  export declare const platform: Platform;
5
- export declare const flexProgramId: PublicKey;
5
+ export declare const luloProgramId: PublicKey;
6
6
  export declare const AUTOMATION_PUBLIC_KEY: PublicKey;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AUTOMATION_PUBLIC_KEY = exports.flexProgramId = exports.platform = exports.platformId = void 0;
3
+ exports.AUTOMATION_PUBLIC_KEY = exports.luloProgramId = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'flexlend';
6
6
  exports.platform = {
@@ -11,6 +11,6 @@ exports.platform = {
11
11
  website: 'https://www.lulo.fi',
12
12
  twitter: 'https://twitter.com/uselulo',
13
13
  };
14
- exports.flexProgramId = new web3_js_1.PublicKey('FL3X2pRsQ9zHENpZSKDRREtccwJuei8yg9fwDu9UN69Q');
14
+ exports.luloProgramId = new web3_js_1.PublicKey('FL3X2pRsQ9zHENpZSKDRREtccwJuei8yg9fwDu9UN69Q');
15
15
  exports.AUTOMATION_PUBLIC_KEY = new web3_js_1.PublicKey('8PWR75ppAGonv9dXStjficjXmdsuDKmDoVNcy4oYhAMs');
16
16
  //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,8CAA8C,CAC/C,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/deposit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C,UAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACrC,UAAU,CAAC,UAAU,GAAG,sBAAU,CAAC;QACnC,QAAQ,CAAC,IAAI,mBACR,UAAU,EACb,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -4,7 +4,7 @@ exports.isLiftEmpty = exports.getDerivedAccount = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const constants_1 = require("./constants");
6
6
  function getDerivedAccount(owner) {
7
- return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('flexlend', 'utf8'), new web3_js_1.PublicKey(owner).toBuffer()], constants_1.flexProgramId)[0].toString();
7
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('flexlend', 'utf8'), new web3_js_1.PublicKey(owner).toBuffer()], constants_1.luloProgramId)[0].toString();
8
8
  }
9
9
  exports.getDerivedAccount = getDerivedAccount;
10
10
  function isLiftEmpty(authoritySeed) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA4C;AAE5C,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EAClE,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClB,CAAC;AALD,8CAKC;AAED,SAAgB,WAAW,CAAC,aAAuB;IACjD,OAAO,CACL,aAAa,CAAC,QAAQ,EAAE;QACxB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CACrE,CAAC;AACJ,CAAC;AALD,kCAKC"}
@@ -7,7 +7,12 @@ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
8
8
  const liftFetcher_1 = __importDefault(require("./liftFetcher"));
9
9
  const constants_1 = require("./constants");
10
+ const rewardsFetcher_1 = __importDefault(require("./rewardsFetcher"));
10
11
  exports.platforms = [constants_1.platform];
11
12
  exports.jobs = [];
12
- exports.fetchers = [depositsFetcher_1.default, liftFetcher_1.default];
13
+ exports.fetchers = [
14
+ depositsFetcher_1.default,
15
+ liftFetcher_1.default,
16
+ rewardsFetcher_1.default,
17
+ ];
13
18
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,gEAAwC;AACxC,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,qBAAW;IACX,wBAAc;CACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -31,7 +31,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
31
  if (!validAuthoritySeed)
32
32
  return [];
33
33
  const seedValue = Buffer.from(validAuthoritySeed.authoritySeed).toString('utf8');
34
- const authorityAddress = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('promotion_authority'), Buffer.from(seedValue.toString())], constants_1.flexProgramId)[0];
34
+ const authorityAddress = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('promotion_authority'), Buffer.from(seedValue.toString())], constants_1.luloProgramId)[0];
35
35
  const promotionAuthority = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, struct_1.promotionAuthorityStruct, authorityAddress);
36
36
  if (!promotionAuthority)
37
37
  return [];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liftFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/liftFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2CAAwD;AACxD,uCAA2D;AAC3D,kFAA+E;AAC/E,iDAAsD;AACtD,qCAAuE;AACvE,qGAA6E;AAC7E,+CAAoD;AAEpD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,WAAW,GAAG,IAAA,2BAAiB,EAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAM,IAAA,2CAAoB,EACzC,MAAM,EACN,0BAAiB,EACjB,IAAI,mBAAS,CAAC,WAAW,CAAC,CAC3B,CAAC;IACF,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CACrD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAA,qBAAW,EAAC,CAAC,CAAC,aAAa,CAAC,CACrC,CAAC;IACF,IAAI,CAAC,kBAAkB;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,SAAS,GAAG,MAAM,CAAC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AE;YACJ,MAAM,EAAE,CAAC,KAAK,CAAC;SAChB;QACD,IAAI,EAAE,aAAa;KACpB,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const constants_1 = require("./constants");
17
+ const airdropFetcher_1 = __importDefault(require("../drift/airdropFetcher"));
18
+ const rewardsFetcher_1 = __importDefault(require("../save/rewardsFetcher"));
19
+ const helpers_1 = require("./helpers");
20
+ const launchpad_1 = require("../jupiter/launchpad");
21
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ const pda = (0, helpers_1.getDerivedAccount)(owner);
23
+ const res = (yield Promise.all([
24
+ airdropFetcher_1.default.executor(pda, cache),
25
+ rewardsFetcher_1.default.executor(pda, cache),
26
+ ...launchpad_1.lfgFetchers
27
+ .filter((fetcher) => fetcher.id.includes('kamino'))
28
+ .map((fetcher) => fetcher.executor(pda, cache)),
29
+ ])).flat();
30
+ return res.map((element) => (Object.assign(Object.assign({}, element), { platformId: constants_1.platform.id, label: 'Rewards' })));
31
+ });
32
+ const fetcher = {
33
+ id: `${constants_1.platformId}-rewards`,
34
+ networkId: portfolio_core_1.NetworkId.solana,
35
+ executor,
36
+ };
37
+ exports.default = fetcher;
38
+ //# sourceMappingURL=rewardsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rewardsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/rewardsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,2CAAmD;AACnD,6EAA0D;AAC1D,4EAA0D;AAC1D,uCAA8C;AAG9C,oDAAmD;AAEnD,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACiB,EAAE;IAC/B,MAAM,GAAG,GAAG,IAAA,2BAAiB,EAAC,KAAK,CAAC,CAAC;IAErC,MAAM,GAAG,GAAG,CACV,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,wBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC;QACxC,wBAAoB,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC;QACzC,GAAG,uBAAW;aACX,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;aAClD,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;KAClD,CAAC,CACH,CAAC,IAAI,EAAE,CAAC;IAET,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,iCACvB,OAAO,KACV,UAAU,EAAE,oBAAQ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pD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,eAAe,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,CAAC,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC"}
@@ -1,7 +1,6 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type ReserveData = {
2
- id: {
3
- id: string;
4
- };
3
+ id: ID;
5
4
  name: number;
6
5
  value: {
7
6
  type: string;
@@ -53,18 +52,14 @@ export type Balance = {
53
52
  user_state: {
54
53
  type: string;
55
54
  fields: {
56
- id: {
57
- id: string;
58
- };
55
+ id: ID;
59
56
  size: string;
60
57
  };
61
58
  };
62
59
  };
63
60
  };
64
61
  export type BalanceData = {
65
- id: {
66
- id: string;
67
- };
62
+ id: ID;
68
63
  name: string;
69
64
  value: string;
70
65
  };
@@ -74,8 +74,7 @@ function getOrcaNftFetcher(platformId, programId) {
74
74
  cache.getTokenPricesAsMap([...tokensMints], portfolio_core_1.NetworkId.solana),
75
75
  (0, helpers_fees_1.getTickArraysAsMap)(positionsInfo, whirlpoolMap),
76
76
  ]);
77
- const assets = [];
78
- let totalLiquidityValue = 0;
77
+ const elements = [];
79
78
  for (let index = 0; index < positionsInfo.length; index++) {
80
79
  const positionInfo = positionsInfo[index];
81
80
  if (!positionInfo)
@@ -140,31 +139,29 @@ function getOrcaNftFetcher(platformId, programId) {
140
139
  assetTokenB.value === null)
141
140
  continue;
142
141
  const value = assetTokenA.value + assetTokenB.value;
143
- assets.push({
144
- assets: [assetTokenA, assetTokenB],
145
- assetsValue: value,
146
- rewardAssets,
147
- rewardAssetsValue: (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value)),
148
- value,
149
- yields: [],
150
- });
151
- totalLiquidityValue += value;
152
- }
153
- if (assets.length === 0)
154
- return [];
155
- return [
156
- {
142
+ const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
143
+ elements.push({
157
144
  type: portfolio_core_1.PortfolioElementType.liquidity,
158
145
  networkId: portfolio_core_1.NetworkId.solana,
159
146
  platformId,
160
147
  label: 'LiquidityPool',
161
148
  name: 'Concentrated',
162
- value: totalLiquidityValue,
149
+ value: value + (rewardAssetsValue || 0),
163
150
  data: {
164
- liquidities: assets,
151
+ liquidities: [
152
+ {
153
+ assets: [assetTokenA, assetTokenB],
154
+ assetsValue: value,
155
+ rewardAssets,
156
+ rewardAssetsValue,
157
+ value: value + (rewardAssetsValue || 0),
158
+ yields: [],
159
+ },
160
+ ],
165
161
  },
166
- },
167
- ];
162
+ });
163
+ }
164
+ return elements;
168
165
  });
169
166
  }
170
167
  exports.getOrcaNftFetcher = getOrcaNftFetcher;
@@ -1 +1 @@
1
- {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EA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,CAAC;AACJ,CAAC;AA/OD,8CA+OC"}
1
+ {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,0BAAc,EACd,uBAAuB,CACxB,CAAC;QACF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE5D,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3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBACvC,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;4BAClC,WAAW,EAAE,KAAK;4BAClB,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;4BACvC,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AAhPD,8CAgPC"}
@@ -99,17 +99,27 @@ function getRaydiumCLMMPositions(cache, nfts) {
99
99
  if (tokenAmountB.isZero())
100
100
  assetTokenB.attributes.tags = ['Out Of Range'];
101
101
  const rewardAssets = [];
102
- const rewardBalances = (0, helpers_1.getRewardBalance)(personalPositionInfo, poolStateInfo, tickArrays[index]);
103
- rewardBalances.forEach((rewardBalance, i) => {
104
- if (rewardBalance.isZero() ||
105
- poolStateInfo.rewardInfos[i].tokenMint.toString() ===
106
- '11111111111111111111111111111111')
107
- return;
108
- const rewardTokenPrice = tokenPrices.get(poolStateInfo.rewardInfos[i].tokenMint.toString());
109
- if (!rewardTokenPrice)
110
- return;
111
- rewardAssets.push((0, tokenPriceToAssetToken_1.default)(poolStateInfo.rewardInfos[i].tokenMint.toString(), rewardBalance.dividedBy(Math.pow(10, rewardTokenPrice.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, rewardTokenPrice));
112
- });
102
+ const feesAndRewardsBalances = (0, helpers_1.getFeesAndRewardsBalance)(personalPositionInfo, poolStateInfo, tickArrays[index]);
103
+ if (feesAndRewardsBalances) {
104
+ if (feesAndRewardsBalances.tokenFeeAmountA.isGreaterThan(0))
105
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceA.address, feesAndRewardsBalances.tokenFeeAmountA
106
+ .dividedBy(Math.pow(10, tokenPriceA.decimals))
107
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceA));
108
+ if (feesAndRewardsBalances.tokenFeeAmountB.isGreaterThan(0))
109
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(tokenPriceB.address, feesAndRewardsBalances.tokenFeeAmountB
110
+ .dividedBy(Math.pow(10, tokenPriceB.decimals))
111
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceB));
112
+ feesAndRewardsBalances.rewards.forEach((rewardBalance, i) => {
113
+ if (rewardBalance.isZero() ||
114
+ poolStateInfo.rewardInfos[i].tokenMint.toString() ===
115
+ '11111111111111111111111111111111')
116
+ return;
117
+ const rewardTokenPrice = tokenPrices.get(poolStateInfo.rewardInfos[i].tokenMint.toString());
118
+ if (!rewardTokenPrice)
119
+ return;
120
+ rewardAssets.push((0, tokenPriceToAssetToken_1.default)(poolStateInfo.rewardInfos[i].tokenMint.toString(), rewardBalance.dividedBy(Math.pow(10, rewardTokenPrice.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, rewardTokenPrice));
121
+ });
122
+ }
113
123
  const assets = [assetTokenA, assetTokenB];
114
124
  const assetsValue = (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value));
115
125
  const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
@@ -1 +1 @@
1
- {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,6CAA4C;AAC5C,2CAAyD;AACzD,qGAA6E;AAC7E,+CAAmE;AACnE,iDAAsD;AACtD,2CAIyB;AAEzB,wFAAyF;AACzF,uCAAkE;AAElE,SAAsB,uBAAuB,CAC3C,KAAY,EACZ,IAAiC;;QAEjC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;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AApMD,0DAoMC"}
1
+ {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,6CAA4C;AAC5C,2CAAyD;AACzD,qGAA6E;AAC7E,+CAAmE;AACnE,iDAAsD;AACtD,2CAIyB;AAEzB,wFAAyF;AACzF,uCAA0E;AAE1E,SAAsB,uBAAuB,CAC3C,KAAY,EACZ,IAAiC;;QAEjC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QAEjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,0BAAc,CACf,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,qBAAqB,GAAG,MAAM,IAAA,sCAA6B,EAC/D,MAAM,EACN,mCAA2B,EAC3B,uBAAuB,CACxB,CAAC;QACF,IAAI,CAAC,qBAAqB,IAAI,qBAAqB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE5E,MAAM,QAAQ,GAAgB,qBAAqB,CAAC,OAAO,CAAC,CAAC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