@sonarwatch/portfolio-plugins 0.12.178 → 0.12.179

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/src/index.js +8 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/joule/constants.d.ts +6 -0
  6. package/src/plugins/joule/constants.js +16 -0
  7. package/src/plugins/joule/constants.js.map +1 -0
  8. package/src/plugins/joule/depositFetcher.d.ts +3 -0
  9. package/src/plugins/joule/depositFetcher.js +71 -0
  10. package/src/plugins/joule/depositFetcher.js.map +1 -0
  11. package/src/plugins/joule/index.d.ts +6 -0
  12. package/src/plugins/joule/index.js +13 -0
  13. package/src/plugins/joule/index.js.map +1 -0
  14. package/src/plugins/joule/marketsJob.d.ts +3 -0
  15. package/src/plugins/joule/marketsJob.js +33 -0
  16. package/src/plugins/joule/marketsJob.js.map +1 -0
  17. package/src/plugins/joule/structs.d.ts +19 -0
  18. package/src/plugins/joule/structs.js +22 -0
  19. package/src/plugins/joule/structs.js.map +1 -0
  20. package/src/plugins/joule/types.d.ts +50 -0
  21. package/src/plugins/joule/types.js +3 -0
  22. package/src/plugins/joule/types.js.map +1 -0
  23. package/src/plugins/meso/constants.d.ts +7 -0
  24. package/src/plugins/meso/constants.js +17 -0
  25. package/src/plugins/meso/constants.js.map +1 -0
  26. package/src/plugins/meso/depositFetcher.d.ts +3 -0
  27. package/src/plugins/meso/depositFetcher.js +93 -0
  28. package/src/plugins/meso/depositFetcher.js.map +1 -0
  29. package/src/plugins/meso/index.d.ts +6 -0
  30. package/src/plugins/meso/index.js +13 -0
  31. package/src/plugins/meso/index.js.map +1 -0
  32. package/src/plugins/meso/marketsJob.d.ts +3 -0
  33. package/src/plugins/meso/marketsJob.js +37 -0
  34. package/src/plugins/meso/marketsJob.js.map +1 -0
  35. package/src/plugins/meso/structs.d.ts +19 -0
  36. package/src/plugins/meso/structs.js +22 -0
  37. package/src/plugins/meso/structs.js.map +1 -0
  38. package/src/plugins/meso/types.d.ts +100 -0
  39. package/src/plugins/meso/types.js +9 -0
  40. package/src/plugins/meso/types.js.map +1 -0
  41. package/src/plugins/orca/getWhirlpoolPositions.js +4 -0
  42. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.179](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.178...plugins-0.12.179) (2024-10-04)
6
+
7
+
8
+
5
9
  ## [0.12.178](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.177...plugins-0.12.178) (2024-10-04)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.178",
3
+ "version": "0.12.179",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -144,6 +144,8 @@ const francium_1 = require("./plugins/francium");
144
144
  const adrastea_1 = require("./plugins/adrastea");
145
145
  const elemental_1 = require("./plugins/elemental");
146
146
  const adrena_1 = require("./plugins/adrena");
147
+ const joule_1 = require("./plugins/joule");
148
+ const meso_1 = require("./plugins/meso");
147
149
  var constants_1 = require("./plugins/tokens/constants");
148
150
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
149
151
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -281,6 +283,8 @@ exports.platforms = [
281
283
  ...adrastea_1.platforms,
282
284
  ...elemental_1.platforms,
283
285
  ...adrena_1.platforms,
286
+ ...joule_1.platforms,
287
+ ...meso_1.platforms,
284
288
  ];
285
289
  // JOBS //
286
290
  exports.jobs = [
@@ -401,6 +405,8 @@ exports.jobs = [
401
405
  ...adrastea_1.jobs,
402
406
  ...elemental_1.jobs,
403
407
  ...adrena_1.jobs,
408
+ ...joule_1.jobs,
409
+ ...meso_1.jobs,
404
410
  ];
405
411
  // FETCHERS //
406
412
  exports.fetchers = [
@@ -523,6 +529,8 @@ exports.fetchers = [
523
529
  ...adrastea_1.fetchers,
524
530
  ...elemental_1.fetchers,
525
531
  ...adrena_1.fetchers,
532
+ ...joule_1.fetchers,
533
+ ...meso_1.fetchers,
526
534
  ];
527
535
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
528
536
  exports.airdropFetchers = [
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,yCAIwB;AACxB,iDAI4B;AAC5B,+CAK2B;AAC3B,y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AA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,yCAIwB;AACxB,iDAI4B;AAC5B,+CAK2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAKyB;AACzB,yCAIwB;AACxB,iFAI4C;AAC5C,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;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;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,eAAY;CAChB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "joule";
3
+ export declare const platform: Platform;
4
+ export declare const marketsCacheKey = "markets";
5
+ export declare const api = "https://app.joule.finance/api/market";
6
+ export declare const userPositionMapType = "0x2fe576faa841347a9b1b32c869685deb75a15e3f62dfe37cbd6d52cc403a16f6::pool::UserPositionsMap";
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userPositionMapType = exports.api = exports.marketsCacheKey = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'joule';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Joule',
8
+ image: 'https://sonar.watch/img/platforms/joule.webp',
9
+ website: 'https://app.joule.finance/',
10
+ twitter: 'https://twitter.com/JouleFinance',
11
+ defiLlamaId: 'joule-finance', // from https://defillama.com/docs/api
12
+ };
13
+ exports.marketsCacheKey = `markets`;
14
+ exports.api = 'https://app.joule.finance/api/market';
15
+ exports.userPositionMapType = '0x2fe576faa841347a9b1b32c869685deb75a15e3f62dfe37cbd6d52cc403a16f6::pool::UserPositionsMap';
16
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;IAC3C,WAAW,EAAE,eAAe,EAAE,sCAAsC;CACrE,CAAC;AAEW,QAAA,eAAe,GAAG,SAAS,CAAC;AAC5B,QAAA,GAAG,GAAG,sCAAsC,CAAC;AAC7C,QAAA,mBAAmB,GAC9B,4FAA4F,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,71 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const aptos_1 = require("../../utils/aptos");
15
+ const clients_1 = require("../../utils/clients");
16
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
17
+ const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
18
+ const marketsMemo = new MemoizedCache_1.MemoizedCache(constants_1.marketsCacheKey, {
19
+ prefix: constants_1.platformId,
20
+ networkId: portfolio_core_1.NetworkId.aptos,
21
+ });
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientAptos)();
24
+ const positionMap = yield (0, aptos_1.getAccountResource)(client, owner, constants_1.userPositionMapType);
25
+ const markets = yield marketsMemo.getItem(cache);
26
+ if (!positionMap)
27
+ return [];
28
+ const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.aptos, constants_1.platformId);
29
+ for (const position of positionMap.positions_map.data) {
30
+ const element = registry.addElementBorrowlend({
31
+ label: 'Lending',
32
+ name: position.value.position_name,
33
+ });
34
+ for (const lendingPos of position.value.lend_positions.data) {
35
+ const market = markets.find((m) => lendingPos.key.includes(m.assetsName));
36
+ element.addSuppliedAsset({
37
+ address: lendingPos.key,
38
+ amount: Number(lendingPos.value),
39
+ });
40
+ if (market)
41
+ element.addSuppliedYield([
42
+ {
43
+ apr: (0, portfolio_core_1.apyToApr)(market.depositApy / 100),
44
+ apy: market.depositApy / 100,
45
+ },
46
+ ]);
47
+ }
48
+ for (const borrowPos of position.value.borrow_positions.data) {
49
+ const market = markets.find((m) => borrowPos.key.includes(m.assetsName));
50
+ element.addBorrowedAsset({
51
+ address: borrowPos.key,
52
+ amount: Number(borrowPos.value.borrow_amount),
53
+ });
54
+ if (market)
55
+ element.addBorrowedYield([
56
+ {
57
+ apr: (0, portfolio_core_1.apyToApr)(market.borrowApy / 100),
58
+ apy: market.borrowApy / 100,
59
+ },
60
+ ]);
61
+ }
62
+ }
63
+ return registry.getElements(cache);
64
+ });
65
+ const fetcher = {
66
+ id: `${constants_1.platformId}-deposits`,
67
+ networkId: portfolio_core_1.NetworkId.aptos,
68
+ executor,
69
+ };
70
+ exports.default = fetcher;
71
+ //# sourceMappingURL=depositFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAiE;AAGjE,2CAA+E;AAE/E,6CAAuD;AACvD,iDAAqD;AACrD,gFAA6E;AAC7E,kEAA+D;AAE/D,MAAM,WAAW,GAAG,IAAI,6BAAa,CAAW,2BAAe,EAAE;IAC/D,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;CAC3B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEhC,MAAM,WAAW,GAAG,MAAM,IAAA,0BAAkB,EAC1C,MAAM,EACN,KAAK,EACL,+BAAmB,CACpB,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEjD,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,QAAQ,GAAG,IAAI,iCAAe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,aAAa,CAAC;aAC9C,CAAC,CAAC;YACH,IAAI,MAAM;gBACR,OAAO,CAAC,gBAAgB,CAAC;oBACvB;wBACE,GAAG,EAAE,IAAA,yBAAQ,EAAC,MAAM,CAAC,SAAS,GAAG,GAAG,CAAC;wBACrC,GAAG,EAAE,MAAM,CAAC,SAAS,GAAG,GAAG;qBAC5B;iBACF,CAAC,CAAC;QACP,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const marketsJob_1 = __importDefault(require("./marketsJob"));
9
+ const depositFetcher_1 = __importDefault(require("./depositFetcher"));
10
+ exports.platforms = [constants_1.platform];
11
+ exports.jobs = [marketsJob_1.default];
12
+ exports.fetchers = [depositFetcher_1.default];
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AACtC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,33 @@
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 axios_1 = __importDefault(require("axios"));
17
+ const constants_1 = require("./constants");
18
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const markets = yield axios_1.default.get(constants_1.api);
20
+ if (!markets.data)
21
+ return;
22
+ yield cache.setItem(constants_1.marketsCacheKey, markets.data.res, {
23
+ prefix: constants_1.platformId,
24
+ networkId: portfolio_core_1.NetworkId.aptos,
25
+ });
26
+ });
27
+ const job = {
28
+ id: `${constants_1.platformId}-markets`,
29
+ executor,
30
+ label: 'normal',
31
+ };
32
+ exports.default = job;
33
+ //# sourceMappingURL=marketsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,2CAA+D;AAG/D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,OAAO,GAAmC,MAAM,eAAK,CAAC,GAAG,CAAC,eAAG,CAAC,CAAC;IAErE,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAO;IAE1B,MAAM,KAAK,CAAC,OAAO,CAAC,2BAAe,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE;QACrD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;KAC3B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export declare enum State {
6
+ Uninitialized = 0,
7
+ StakePool = 1,
8
+ InactiveStakePool = 2,
9
+ StakeAccount = 3
10
+ }
11
+ export type Liquidity = {
12
+ buffer: Buffer;
13
+ state: State;
14
+ mint: PublicKey;
15
+ owner: PublicKey;
16
+ amountDeposited: BigNumber;
17
+ space: number[];
18
+ };
19
+ export declare const liquidityStruct: BeetStruct<Liquidity, Partial<Liquidity>>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liquidityStruct = exports.State = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ var State;
8
+ (function (State) {
9
+ State[State["Uninitialized"] = 0] = "Uninitialized";
10
+ State[State["StakePool"] = 1] = "StakePool";
11
+ State[State["InactiveStakePool"] = 2] = "InactiveStakePool";
12
+ State[State["StakeAccount"] = 3] = "StakeAccount";
13
+ })(State || (exports.State = State = {}));
14
+ exports.liquidityStruct = new beet_1.BeetStruct([
15
+ ['buffer', (0, solana_1.blob)(8)],
16
+ ['state', beet_1.u8],
17
+ ['mint', beet_solana_1.publicKey],
18
+ ['owner', beet_solana_1.publicKey],
19
+ ['amountDeposited', solana_1.u64],
20
+ ['space', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
21
+ ], (args) => args);
22
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,KAKX;AALD,WAAY,KAAK;IACf,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,2DAAiB,CAAA;IACjB,iDAAY,CAAA;AACd,CAAC,EALW,KAAK,qBAAL,KAAK,QAKhB;AAWY,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,OAAO,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
@@ -0,0 +1,50 @@
1
+ export type UserPositionMap = {
2
+ positions_map: PositionsMap;
3
+ user_position_ids: string[];
4
+ };
5
+ export type PositionsMap = {
6
+ data: PositionsMapData[];
7
+ };
8
+ export type PositionsMapData = {
9
+ key: string;
10
+ value: PurpleValue;
11
+ };
12
+ export type PurpleValue = {
13
+ borrow_positions: BorrowPositions;
14
+ lend_positions: LendPositions;
15
+ position_name: string;
16
+ };
17
+ export type BorrowPositions = {
18
+ data: BorrowPositionsDatum[];
19
+ };
20
+ export type BorrowPositionsDatum = {
21
+ key: string;
22
+ value: FluffyValue;
23
+ };
24
+ export type FluffyValue = {
25
+ borrow_amount: string;
26
+ coin_name: string;
27
+ interest_accumulated: string;
28
+ last_interest_rate_index: LastInterestRateIndex;
29
+ };
30
+ export type LastInterestRateIndex = {
31
+ v: string;
32
+ };
33
+ export type LendPositions = {
34
+ data: LendPositionsDatum[];
35
+ };
36
+ export type LendPositionsDatum = {
37
+ key: string;
38
+ value: string;
39
+ };
40
+ export type MarketsResponse = {
41
+ res: Market[];
42
+ };
43
+ export type Market = {
44
+ assetsName: string;
45
+ ltv: string;
46
+ marketSize: string;
47
+ totalBorrowed: string;
48
+ depositApy: number;
49
+ borrowApy: number;
50
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/joule/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "meso";
3
+ export declare const platform: Platform;
4
+ export declare const marketsCacheKey = "markets";
5
+ export declare const userPositionType = "0x68476f9d437e3f32fd262ba898b5e3ee0a23a1d586a6cf29a28add35f253f6f7::lending_pool::UserPosition";
6
+ export declare const lendingPoolType = "0x68476f9d437e3f32fd262ba898b5e3ee0a23a1d586a6cf29a28add35f253f6f7::lending_pool::LendingPool";
7
+ export declare const poolsApi = "https://api.meso.finance/api/v1/pool?page=1&limit=1000";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.poolsApi = exports.lendingPoolType = exports.userPositionType = exports.marketsCacheKey = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'meso';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Meso',
8
+ image: 'https://sonar.watch/img/platforms/meso.webp',
9
+ website: 'https://app.meso.finance/',
10
+ twitter: 'https://x.com/Meso_Finance',
11
+ defiLlamaId: 'meso-finance', // from https://defillama.com/docs/api
12
+ };
13
+ exports.marketsCacheKey = `markets`;
14
+ exports.userPositionType = '0x68476f9d437e3f32fd262ba898b5e3ee0a23a1d586a6cf29a28add35f253f6f7::lending_pool::UserPosition';
15
+ exports.lendingPoolType = '0x68476f9d437e3f32fd262ba898b5e3ee0a23a1d586a6cf29a28add35f253f6f7::lending_pool::LendingPool';
16
+ exports.poolsApi = 'https://api.meso.finance/api/v1/pool?page=1&limit=1000';
17
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,4BAA4B;IACrC,WAAW,EAAE,cAAc,EAAE,sCAAsC;CACpE,CAAC;AAEW,QAAA,eAAe,GAAG,SAAS,CAAC;AAC5B,QAAA,gBAAgB,GAC3B,gGAAgG,CAAC;AACtF,QAAA,eAAe,GAC1B,+FAA+F,CAAC;AACrF,QAAA,QAAQ,GACnB,wDAAwD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,93 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const aptos_1 = require("../../utils/aptos");
15
+ const clients_1 = require("../../utils/clients");
16
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
17
+ const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
18
+ const poolsMemo = new MemoizedCache_1.MemoizedCache(constants_1.marketsCacheKey, {
19
+ prefix: constants_1.platformId,
20
+ networkId: portfolio_core_1.NetworkId.aptos,
21
+ });
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientAptos)();
24
+ const userPosition = yield (0, aptos_1.getAccountResource)(client, owner, constants_1.userPositionType);
25
+ if (!userPosition)
26
+ return [];
27
+ const poolsData = yield poolsMemo.getItem(cache);
28
+ let lendingPools;
29
+ const tokenByInner = new Map();
30
+ const poolDataByInner = new Map();
31
+ if (!poolsData) {
32
+ lendingPools = yield Promise.all([
33
+ ...userPosition.debt_shares.data.map((debt) => (0, aptos_1.getAccountResource)(client, debt.key.inner, constants_1.lendingPoolType)),
34
+ ...userPosition.deposit_shares.data.map((dep) => (0, aptos_1.getAccountResource)(client, dep.key.inner, constants_1.lendingPoolType)),
35
+ ]);
36
+ lendingPools.forEach((lP) => {
37
+ if (lP) {
38
+ tokenByInner.set(lP.extend_ref.self, lP.token);
39
+ }
40
+ });
41
+ }
42
+ else {
43
+ poolsData.forEach((pD) => poolDataByInner.set(pD.poolAddress, pD));
44
+ }
45
+ const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.aptos, constants_1.platformId);
46
+ const element = registry.addElementBorrowlend({
47
+ label: 'Lending',
48
+ });
49
+ for (const lendingPos of userPosition.deposit_shares.data) {
50
+ const poolData = poolDataByInner.get(lendingPos.key.inner);
51
+ const address = (poolData === null || poolData === void 0 ? void 0 : poolData.token) || tokenByInner.get(lendingPos.key.inner);
52
+ if (!address)
53
+ continue;
54
+ element.addSuppliedAsset({
55
+ address,
56
+ amount: Number(lendingPos.value),
57
+ });
58
+ if (!poolData)
59
+ continue;
60
+ element.addSuppliedYield([
61
+ {
62
+ apr: (0, portfolio_core_1.apyToApr)(poolData.depositApy / 100),
63
+ apy: poolData.depositApy / 100,
64
+ },
65
+ ]);
66
+ }
67
+ for (const borrowPos of userPosition.debt_shares.data) {
68
+ const poolData = poolDataByInner.get(borrowPos.key.inner);
69
+ const address = (poolData === null || poolData === void 0 ? void 0 : poolData.token) || tokenByInner.get(borrowPos.key.inner);
70
+ if (!address)
71
+ continue;
72
+ element.addBorrowedAsset({
73
+ address,
74
+ amount: Number(borrowPos.value),
75
+ });
76
+ if (!poolData)
77
+ continue;
78
+ element.addBorrowedYield([
79
+ {
80
+ apr: (0, portfolio_core_1.apyToApr)(poolData.borrowApy / 100),
81
+ apy: poolData.borrowApy / 100,
82
+ },
83
+ ]);
84
+ }
85
+ return registry.getElements(cache);
86
+ });
87
+ const fetcher = {
88
+ id: `${constants_1.platformId}-deposits`,
89
+ networkId: portfolio_core_1.NetworkId.aptos,
90
+ executor,
91
+ };
92
+ exports.default = fetcher;
93
+ //# sourceMappingURL=depositFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAiE;AAGjE,2CAKqB;AAErB,6CAAuD;AACvD,iDAAqD;AACrD,gFAA6E;AAC7E,kEAA+D;AAE/D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CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,KAAI,YAAY,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACzE,IAAI,CAAC,OAAO;YAAE,SAAS;QAEvB,OAAO,CAAC,gBAAgB,CAAC;YACvB,OAAO;YACP,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ;YAAE,SAAS;QAExB,OAAO,CAAC,gBAAgB,CAAC;YACvB;gBACE,GAAG,EAAE,IAAA,yBAAQ,EAAC,QAAQ,CAAC,SAAS,GAAG,GAAG,CAAC;gBACvC,GAAG,EAAE,QAAQ,CAAC,SAAS,GAAG,GAAG;aAC9B;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const marketsJob_1 = __importDefault(require("./marketsJob"));
9
+ const depositFetcher_1 = __importDefault(require("./depositFetcher"));
10
+ exports.platforms = [constants_1.platform];
11
+ exports.jobs = [marketsJob_1.default];
12
+ exports.fetchers = [depositFetcher_1.default];
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,8DAAsC;AACtC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,37 @@
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 axios_1 = __importDefault(require("axios"));
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const constants_1 = require("./constants");
18
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const pools = yield axios_1.default.get(constants_1.poolsApi);
20
+ const poolsData = pools.data.datas.map((pool) => ({
21
+ borrowApy: pool.borrowApy,
22
+ depositApy: pool.supplyApy,
23
+ poolAddress: pool.poolAddress,
24
+ token: pool.tokenAddress,
25
+ }));
26
+ yield cache.setItem(constants_1.marketsCacheKey, poolsData, {
27
+ prefix: constants_1.platformId,
28
+ networkId: portfolio_core_1.NetworkId.aptos,
29
+ });
30
+ });
31
+ const job = {
32
+ id: `${constants_1.platformId}-markets`,
33
+ executor,
34
+ label: 'normal',
35
+ };
36
+ exports.default = job;
37
+ //# sourceMappingURL=marketsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAAoE;AAGpE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,GAAmC,MAAM,eAAK,CAAC,GAAG,CAAC,oBAAQ,CAAC,CAAC;IAExE,MAAM,SAAS,GAAe,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC5D,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,UAAU,EAAE,IAAI,CAAC,SAAS;QAC1B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,KAAK,EAAE,IAAI,CAAC,YAAY;KACzB,CAAC,CAAC,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,2BAAe,EAAE,SAAS,EAAE;QAC9C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;KAC3B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export declare enum State {
6
+ Uninitialized = 0,
7
+ StakePool = 1,
8
+ InactiveStakePool = 2,
9
+ StakeAccount = 3
10
+ }
11
+ export type Liquidity = {
12
+ buffer: Buffer;
13
+ state: State;
14
+ mint: PublicKey;
15
+ owner: PublicKey;
16
+ amountDeposited: BigNumber;
17
+ space: number[];
18
+ };
19
+ export declare const liquidityStruct: BeetStruct<Liquidity, Partial<Liquidity>>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.liquidityStruct = exports.State = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ var State;
8
+ (function (State) {
9
+ State[State["Uninitialized"] = 0] = "Uninitialized";
10
+ State[State["StakePool"] = 1] = "StakePool";
11
+ State[State["InactiveStakePool"] = 2] = "InactiveStakePool";
12
+ State[State["StakeAccount"] = 3] = "StakeAccount";
13
+ })(State || (exports.State = State = {}));
14
+ exports.liquidityStruct = new beet_1.BeetStruct([
15
+ ['buffer', (0, solana_1.blob)(8)],
16
+ ['state', beet_1.u8],
17
+ ['mint', beet_solana_1.publicKey],
18
+ ['owner', beet_solana_1.publicKey],
19
+ ['amountDeposited', solana_1.u64],
20
+ ['space', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 128)],
21
+ ], (args) => args);
22
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,KAKX;AALD,WAAY,KAAK;IACf,mDAAa,CAAA;IACb,2CAAS,CAAA;IACT,2DAAiB,CAAA;IACjB,iDAAY,CAAA;AACd,CAAC,EALW,KAAK,qBAAL,KAAK,QAKhB;AAWY,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,OAAO,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC1C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
@@ -0,0 +1,100 @@
1
+ export type UserPosition = {
2
+ debt_shares: ShareData;
3
+ deposit_shares: ShareData;
4
+ emode_id: string;
5
+ };
6
+ export type ShareData = {
7
+ data: ShareInfo[];
8
+ };
9
+ export type ShareInfo = {
10
+ key: Key;
11
+ value: string;
12
+ };
13
+ export type Key = {
14
+ inner: string;
15
+ };
16
+ export type LendingPool = {
17
+ borrow_rewards_pool: BorrowRewardsPool;
18
+ emode_id: string;
19
+ extend_ref: ExtendRef;
20
+ fungible_asset: BorrowRewardsPool;
21
+ supply_rewards_pool: BorrowRewardsPool;
22
+ token: string;
23
+ };
24
+ export type BorrowRewardsPool = {
25
+ inner: string;
26
+ };
27
+ export type ExtendRef = {
28
+ self: string;
29
+ };
30
+ export type PoolApiResponse = {
31
+ datas: Pool[];
32
+ total: number;
33
+ totalPages: number;
34
+ };
35
+ export type Pool = {
36
+ _id: string;
37
+ poolAddress: string;
38
+ __v: number;
39
+ baseBps: number;
40
+ borrowApy: number;
41
+ borrowCap: number;
42
+ borrowFeeBps: number;
43
+ borrowRewardsPool: string;
44
+ closeFactorBps: number;
45
+ createdAt: Date;
46
+ emodeBps: number;
47
+ emodeId: string;
48
+ emodeLiquidationThresholdBps: number;
49
+ fungibleAsset: string;
50
+ incentiveBorrowApy: number;
51
+ incentiveSupplyApy: number;
52
+ isPaused: boolean;
53
+ liquidationFeeBps: number;
54
+ liquidationThresholdBps: number;
55
+ maxBps: number;
56
+ normaBps: number;
57
+ optimalBps: number;
58
+ optimalUtilizationBps: number;
59
+ poolSupply: number;
60
+ protocolInterestFeeBps: number;
61
+ protocolLiquidationFeeBps: number;
62
+ supplyApy: number;
63
+ supplyCap: number;
64
+ supplyRewardsPool: string;
65
+ token: Token;
66
+ tokenAddress: string;
67
+ totalDebt: number;
68
+ totalDebtShares: number;
69
+ totalFees: number;
70
+ totalReserves: number;
71
+ totalSupplyShares: number;
72
+ updatedAt: Date;
73
+ stakingApr: number;
74
+ orderValue?: number;
75
+ };
76
+ export type Token = {
77
+ _id: string;
78
+ symbol: string;
79
+ name: string;
80
+ address: string;
81
+ decimals: number;
82
+ type: Type;
83
+ wrapAddress: string;
84
+ createdAt: Date;
85
+ updatedAt: Date;
86
+ __v: number;
87
+ price: number;
88
+ icon_uri?: string;
89
+ project_uri?: string;
90
+ };
91
+ export declare enum Type {
92
+ Coin = "COIN",
93
+ FungibleAsset = "FUNGIBLE_ASSET"
94
+ }
95
+ export type PoolData = {
96
+ borrowApy: number;
97
+ depositApy: number;
98
+ poolAddress: string;
99
+ token: string;
100
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Type = void 0;
4
+ var Type;
5
+ (function (Type) {
6
+ Type["Coin"] = "COIN";
7
+ Type["FungibleAsset"] = "FUNGIBLE_ASSET";
8
+ })(Type || (exports.Type = Type = {}));
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meso/types.ts"],"names":[],"mappings":";;;AAoGA,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,qBAAa,CAAA;IACb,wCAAgC,CAAA;AAClC,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf"}
@@ -96,6 +96,9 @@ function getOrcaNftFetcher(platformId, programId) {
96
96
  continue;
97
97
  const assetTokenA = (0, tokenPriceToAssetToken_1.default)(whirlpoolInfo.tokenMintA.toString(), tokenAmountA.dividedBy(Math.pow(10, tokenPriceA.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceA);
98
98
  const assetTokenB = (0, tokenPriceToAssetToken_1.default)(whirlpoolInfo.tokenMintB.toString(), tokenAmountB.dividedBy(Math.pow(10, tokenPriceB.decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPriceB);
99
+ const tags = [];
100
+ if (tokenAmountA.isZero() || tokenAmountB.isZero())
101
+ tags.push('Out Of Range');
99
102
  /* const feesAndRewards = calcFeesAndRewards(
100
103
  whirlpoolInfo,
101
104
  positionInfo,
@@ -209,6 +212,7 @@ function getOrcaNftFetcher(platformId, programId) {
209
212
  },
210
213
  ],
211
214
  },
215
+ tags,
212
216
  });
213
217
  }
214
218
  return elements;
@@ -1 +1 @@
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,CAA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,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AAhPD,8CAgPC"}
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,aA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