@sonarwatch/portfolio-plugins 0.11.83 → 0.11.84

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +2 -2
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/accessprotocol/constants.js +2 -0
  6. package/src/plugins/accessprotocol/constants.js.map +1 -1
  7. package/src/plugins/aptin/constants.d.ts +5 -0
  8. package/src/plugins/aptin/constants.js +15 -0
  9. package/src/plugins/aptin/constants.js.map +1 -0
  10. package/src/plugins/aptin/depositsFetcher.d.ts +3 -0
  11. package/src/plugins/aptin/depositsFetcher.js +114 -0
  12. package/src/plugins/aptin/depositsFetcher.js.map +1 -0
  13. package/src/plugins/aptin/depositsJob.d.ts +3 -0
  14. package/src/plugins/aptin/depositsJob.js +43 -0
  15. package/src/plugins/aptin/depositsJob.js.map +1 -0
  16. package/src/plugins/aptin/helpers.d.ts +1 -0
  17. package/src/plugins/aptin/helpers.js +8 -0
  18. package/src/plugins/aptin/helpers.js.map +1 -0
  19. package/src/plugins/aptin/index.d.ts +6 -0
  20. package/src/plugins/aptin/index.js +13 -0
  21. package/src/plugins/aptin/index.js.map +1 -0
  22. package/src/plugins/aptin/types.d.ts +70 -0
  23. package/src/plugins/aptin/types.js +3 -0
  24. package/src/plugins/aptin/types.js.map +1 -0
  25. package/src/plugins/aries/constants.js +1 -1
  26. package/src/plugins/aries/constants.js.map +1 -1
  27. package/src/plugins/aries/depositsFetcher.js +1 -1
  28. package/src/plugins/aries/depositsFetcher.js.map +1 -1
  29. package/src/plugins/bonkrewards/constants.js +2 -0
  30. package/src/plugins/bonkrewards/constants.js.map +1 -1
  31. package/src/plugins/foo/constants.js +3 -1
  32. package/src/plugins/foo/constants.js.map +1 -1
  33. package/src/utils/aptos/getDecimals.d.ts +2 -0
  34. package/src/utils/aptos/getDecimals.js +23 -0
  35. package/src/utils/aptos/getDecimals.js.map +1 -0
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.11.84](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.83...plugins-0.11.84) (2024-02-26)
6
+
7
+
8
+
5
9
  ## [0.11.83](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.82...plugins-0.11.83) (2024-02-24)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.11.83",
3
+ "version": "0.11.84",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
@@ -41,7 +41,7 @@
41
41
  "web3-v1": "npm:web3@^1.5.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@sonarwatch/portfolio-core": "0.11.83"
44
+ "@sonarwatch/portfolio-core": "0.11.84"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/index.js CHANGED
@@ -85,6 +85,7 @@ const aries_1 = require("./plugins/aries");
85
85
  const flash_1 = require("./plugins/flash");
86
86
  const bonkrewards_1 = require("./plugins/bonkrewards");
87
87
  const accessprotocol_1 = require("./plugins/accessprotocol");
88
+ const aptin_1 = require("./plugins/aptin");
88
89
  var constants_1 = require("./plugins/tokens/constants");
89
90
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
90
91
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -160,6 +161,7 @@ exports.platforms = [
160
161
  ...flash_1.platforms,
161
162
  ...bonkrewards_1.platforms,
162
163
  ...accessprotocol_1.platforms,
164
+ ...aptin_1.platforms,
163
165
  ];
164
166
  // JOBS //
165
167
  exports.jobs = [
@@ -221,6 +223,7 @@ exports.jobs = [
221
223
  ...flash_1.jobs,
222
224
  ...bonkrewards_1.jobs,
223
225
  ...accessprotocol_1.jobs,
226
+ ...aptin_1.jobs,
224
227
  ];
225
228
  // FETCHERS //
226
229
  exports.fetchers = [
@@ -284,6 +287,7 @@ exports.fetchers = [
284
287
  ...flash_1.fetchers,
285
288
  ...bonkrewards_1.fetchers,
286
289
  ...accessprotocol_1.fetchers,
290
+ ...aptin_1.fetchers,
287
291
  ];
288
292
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
289
293
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;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,6CAI0B;AAC1B,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAG2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2C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;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;CAC1B,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;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,6CAI0B;AAC1B,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAG2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACz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AAG,eAAY;IACf,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,cAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;CACjB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
@@ -7,6 +7,8 @@ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Access Protocol',
9
9
  image: 'https://sonar.watch/img/platforms/accessprotocol.png',
10
+ twitter: 'https://twitter.com/AccessProtocol',
11
+ website: 'https://hub.accessprotocol.co',
10
12
  // defiLlamaId: 'nothing yet',
11
13
  };
12
14
  exports.stakePid = new web3_js_1.PublicKey('6HW8dXjtiTGkD4jzXs7igdFmZExPpmwUrRN5195xGup');
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/accessprotocol/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,gBAAgB,CAAC;AAC9B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,sDAAsD;IAC7D,8BAA8B;CAC/B,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/accessprotocol/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,gBAAgB,CAAC;AAC9B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,sDAAsD;IAC7D,OAAO,EAAE,oCAAoC;IAC7C,OAAO,EAAE,+BAA+B;IACxC,8BAA8B;CAC/B,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,WAAW,GAAG,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "aptin";
3
+ export declare const platform: Platform;
4
+ export declare const configStoresKey = "configStores";
5
+ export declare const poolPositionsType = "0x3c1d4a86594d681ff7e5d5a233965daeabdc6a15fe5672ceeda5260038857183::pool::Positions";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.poolPositionsType = exports.configStoresKey = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'aptin';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Aptin',
8
+ image: 'https://sonar.watch/img/platforms/aptin.png',
9
+ defiLlamaId: 'aptin-finance', // from https://defillama.com/docs/api
10
+ website: 'https://app.aptin.io/',
11
+ twitter: 'https://twitter.com/aptinlabs',
12
+ };
13
+ exports.configStoresKey = 'configStores';
14
+ exports.poolPositionsType = '0x3c1d4a86594d681ff7e5d5a233965daeabdc6a15fe5672ceeda5260038857183::pool::Positions';
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aptin/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,6CAA6C;IACpD,WAAW,EAAE,eAAe,EAAE,sCAAsC;IACpE,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,+BAA+B;CACzC,CAAC;AAEW,QAAA,eAAe,GAAG,cAAc,CAAC;AACjC,QAAA,iBAAiB,GAC5B,qFAAqF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,114 @@
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 constants_1 = require("./constants");
18
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
19
+ const clients_1 = require("../../utils/clients");
20
+ const aptos_1 = require("../../utils/aptos");
21
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ const client = (0, clients_1.getClientAptos)();
23
+ const poolPositions = yield (0, aptos_1.getAccountResource)(client, owner, constants_1.poolPositionsType);
24
+ if (!poolPositions)
25
+ return [];
26
+ if (poolPositions.data.supply_coins.length === 0 &&
27
+ poolPositions.data.borrow_coins.length === 0)
28
+ return [];
29
+ const configStores = yield cache.getItem(constants_1.configStoresKey, {
30
+ prefix: constants_1.platformId,
31
+ networkId: portfolio_core_1.NetworkId.aptos,
32
+ });
33
+ if (!configStores)
34
+ return [];
35
+ const supplyPositions = poolPositions.data.supply_coins.length === 0
36
+ ? []
37
+ : yield (0, aptos_1.getTableItemsByKeys)(client, poolPositions.data.supply_position.handle, poolPositions.data.supply_coins, '0x1::string::String', '0x3c1d4a86594d681ff7e5d5a233965daeabdc6a15fe5672ceeda5260038857183::pool::SupplyPosition');
38
+ const borrowPositions = poolPositions.data.borrow_coins.length === 0
39
+ ? []
40
+ : yield (0, aptos_1.getTableItemsByKeys)(client, poolPositions.data.borrow_position.handle, poolPositions.data.borrow_coins, '0x1::string::String', '0x3c1d4a86594d681ff7e5d5a233965daeabdc6a15fe5672ceeda5260038857183::pool::BorrowPosition');
41
+ const borrowedAssets = [];
42
+ const borrowedYields = [];
43
+ const suppliedAssets = [];
44
+ const suppliedYields = [];
45
+ const rewardAssets = [];
46
+ const suppliedLtvs = [];
47
+ // Token prices
48
+ const tokenPricesRes = yield cache.getTokenPrices([...poolPositions.data.supply_coins, ...poolPositions.data.borrow_coins], portfolio_core_1.NetworkId.aptos);
49
+ const tokenPrices = {};
50
+ tokenPricesRes.forEach((tp) => {
51
+ if (!tp)
52
+ return;
53
+ tokenPrices[tp === null || tp === void 0 ? void 0 : tp.address] = tp;
54
+ });
55
+ for (let i = 0; i < supplyPositions.length; i++) {
56
+ const supplyPosition = supplyPositions[i];
57
+ if (!supplyPosition)
58
+ continue;
59
+ if (supplyPosition.amount === '0')
60
+ continue;
61
+ const coinType = poolPositions.data.supply_coins[i];
62
+ const address = (0, portfolio_core_1.formatTokenAddress)(coinType, portfolio_core_1.NetworkId.aptos);
63
+ const { decimals, ltv } = configStores[coinType];
64
+ const amount = new bignumber_js_1.default(supplyPosition.amount)
65
+ .div(Math.pow(10, decimals))
66
+ .toNumber();
67
+ suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(coinType, amount, portfolio_core_1.NetworkId.aptos, tokenPrices[address] || undefined));
68
+ suppliedLtvs.push(ltv);
69
+ suppliedYields.push([]);
70
+ }
71
+ for (let i = 0; i < borrowPositions.length; i++) {
72
+ const borrowPosition = borrowPositions[i];
73
+ if (!borrowPosition)
74
+ continue;
75
+ if (borrowPosition.amount === '0')
76
+ continue;
77
+ const coinType = poolPositions.data.borrow_coins[i];
78
+ const address = (0, portfolio_core_1.formatTokenAddress)(coinType, portfolio_core_1.NetworkId.aptos);
79
+ const { decimals } = configStores[coinType];
80
+ const amount = new bignumber_js_1.default(borrowPosition.amount)
81
+ .div(Math.pow(10, decimals))
82
+ .toNumber();
83
+ borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(coinType, amount, portfolio_core_1.NetworkId.aptos, tokenPrices[address] || undefined));
84
+ borrowedYields.push([]);
85
+ }
86
+ const { borrowedValue, healthRatio, suppliedValue, value } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets, suppliedLtvs);
87
+ const element = {
88
+ type: portfolio_core_1.PortfolioElementType.borrowlend,
89
+ networkId: portfolio_core_1.NetworkId.solana,
90
+ platformId: constants_1.platformId,
91
+ label: 'Lending',
92
+ value,
93
+ data: {
94
+ borrowedAssets,
95
+ borrowedValue,
96
+ borrowedYields,
97
+ suppliedAssets,
98
+ suppliedValue,
99
+ suppliedYields,
100
+ collateralRatio: null,
101
+ healthRatio,
102
+ rewardAssets,
103
+ value,
104
+ },
105
+ };
106
+ return [element];
107
+ });
108
+ const fetcher = {
109
+ id: `${constants_1.platformId}-deposits`,
110
+ networkId: portfolio_core_1.NetworkId.aptos,
111
+ executor,
112
+ };
113
+ exports.default = fetcher;
114
+ //# sourceMappingURL=depositsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","s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AI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,EAAE,GACxD,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,CACb,CAAC;IAEJ,MAAM,OAAO,GAAqB;QAChC,IAAI,EAAE,qCAAoB,CAAC,UAAU;QACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAV,sBAAU;QACV,KAAK,EAAE,SAAS;QAChB,KAAK;QACL,IAAI,EAAE;YACJ,cAAc;YACd,aAAa;YACb,cAAc;YACd,cAAc;YACd,aAAa;YACb,cAAc;YACd,eAAe,EAAE,IAAI;YACrB,WAAW;YACX,YAAY;YACZ,KAAK;SACN;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,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,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ //
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const axios_1 = __importDefault(require("axios"));
18
+ const constants_1 = require("./constants");
19
+ const clients_1 = require("../../utils/clients");
20
+ const getDecimals_1 = require("../../utils/aptos/getDecimals");
21
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ const res = yield axios_1.default.get('https://data.aptin.io/api/config-v2');
23
+ const configStores = {};
24
+ const client = (0, clients_1.getClientAptos)();
25
+ for (let i = 0; i < res.data.configStores.length; i++) {
26
+ const configStore = res.data.configStores[i];
27
+ const decimals = yield (0, getDecimals_1.getDecimals)(client, configStore.coin_name);
28
+ if (!decimals)
29
+ continue;
30
+ configStores[configStore.coin_name] = Object.assign(Object.assign({}, configStore), { decimals });
31
+ }
32
+ yield cache.setItem(constants_1.configStoresKey, configStores, {
33
+ prefix: constants_1.platformId,
34
+ networkId: portfolio_core_1.NetworkId.aptos,
35
+ });
36
+ });
37
+ const job = {
38
+ id: `${constants_1.platformId}-deposits`,
39
+ executor,
40
+ label: 'normal',
41
+ };
42
+ exports.default = job;
43
+ //# sourceMappingURL=depositsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"depositsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aptin/depositsJob.ts"],"names":[],"mappings":";AAAA,EAAE;;;;;;;;;;;;;;AAEF,+DAAuD;AACvD,kDAA6C;AAG7C,2CAA0D;AAE1D,iDAAqD;AACrD,+DAA4D;AAE5D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CACzB,qCAAqC,CACtC,CAAC;IACF,MAAM,YAAY,GAAiB,EAAE,CAAC;IACtC,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAChC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtD,MAAM,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,QAAQ,GAAG,MAAM,IAAA,yBAAW,EAAC,MAAM,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,CAAC,QAAQ;YAAE,SAAS;QACxB,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,mCAC9B,WAAW,KACd,QAAQ,GACT,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,CAAC,OAAO,CAAC,2BAAe,EAAE,YAAY,EAAE;QACjD,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,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function getName(accountName: string): string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getName = void 0;
4
+ function getName(accountName) {
5
+ return accountName.replace('profile', '');
6
+ }
7
+ exports.getName = getName;
8
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aptin/helpers.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO,CAAC,WAAmB;IACzC,OAAO,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAFD,0BAEC"}
@@ -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 depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
9
+ const depositsJob_1 = __importDefault(require("./depositsJob"));
10
+ exports.platforms = [constants_1.platform];
11
+ exports.jobs = [depositsJob_1.default];
12
+ exports.fetchers = [depositsFetcher_1.default];
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aptin/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wEAAgD;AAChD,gEAAwC;AAE3B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,qBAAW,CAAC,CAAC;AAC5B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -0,0 +1,70 @@
1
+ export type PoolPositions = {
2
+ borrow_coins: string[];
3
+ borrow_position: {
4
+ handle: string;
5
+ };
6
+ registered: boolean;
7
+ slot: string;
8
+ supply_coins: string[];
9
+ supply_position: {
10
+ handle: string;
11
+ };
12
+ };
13
+ export type SupplyPosition = {
14
+ amount: string;
15
+ collateral: boolean;
16
+ index_interest: string;
17
+ interest: string;
18
+ last_update_time_interest: string;
19
+ last_update_time_reward: string;
20
+ reserve1: string;
21
+ reserve2: string;
22
+ reserve3: string;
23
+ reserve4: string;
24
+ reward: string;
25
+ };
26
+ export type BorrowPosition = {
27
+ amount: string;
28
+ index_interest: string;
29
+ interest: string;
30
+ last_update_time_interest: string;
31
+ last_update_time_reward: string;
32
+ reserve1: string;
33
+ reserve2: string;
34
+ reserve3: string;
35
+ reserve4: string;
36
+ reward: string;
37
+ };
38
+ export type PoolsConfig = {
39
+ poolHandle: string;
40
+ priceHandle: string;
41
+ configStores: ConfigStore[];
42
+ borrow_interest_rateVals: BorrowInterestRateVal[];
43
+ rewardHandle: string;
44
+ rewardTokenStart: RewardTokenStart[];
45
+ coins: string[];
46
+ };
47
+ export type BorrowInterestRateVal = {
48
+ a: string;
49
+ b: string;
50
+ c: string;
51
+ ct: string;
52
+ d: string;
53
+ k: string;
54
+ reserves: string;
55
+ };
56
+ export type ConfigStores = Record<string, ConfigStore & {
57
+ decimals: number;
58
+ }>;
59
+ export type ConfigStore = {
60
+ coin_name: string;
61
+ fees: number;
62
+ ltv: number;
63
+ max_deposit_limit: string;
64
+ min_deposit_limit: string;
65
+ weight: number;
66
+ };
67
+ export type RewardTokenStart = {
68
+ coin_name: string;
69
+ start: boolean;
70
+ };
@@ -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/aptin/types.ts"],"names":[],"mappings":""}
@@ -6,7 +6,7 @@ exports.platform = {
6
6
  id: exports.platformId,
7
7
  name: 'Aries',
8
8
  image: 'https://sonar.watch/img/platforms/aries.png',
9
- defiLlamaId: 'aries-markets', // from https://defillama.com/docs/api
9
+ defiLlamaId: 'aries-markets',
10
10
  website: 'https://app.ariesmarkets.xyz/',
11
11
  twitter: 'https://twitter.com/AriesMarkets',
12
12
  };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/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,6CAA6C;IACpD,WAAW,EAAE,eAAe,EAAE,sCAAsC;IACpE,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAE1D,QAAA,MAAM,GAAG,kCAAkC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/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,6CAA6C;IACpD,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAE1D,QAAA,MAAM,GAAG,kCAAkC,CAAC"}
@@ -100,7 +100,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
100
100
  suppliedValue,
101
101
  suppliedYields,
102
102
  collateralRatio: null,
103
- healthRatio: new bignumber_js_1.default(profile.riskFactor).toNumber(),
103
+ healthRatio: 1 - new bignumber_js_1.default(profile.riskFactor).toNumber(),
104
104
  rewardAssets,
105
105
  value,
106
106
  },
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,kDAA6C;AAC7C,gEAAqC;AAGrC,2CAAiD;AAEjD,uCAAoC;AACpC,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAA0C,MAAM,eAAK;SAClE,GAAG,CAAC,GAAG,kBAAM,gCAAgC,KAAK,IAAI,CAAC;SACvD,KAAK,CAAC,GAAG,EAAE,CAA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aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,IAAA,wCAAuB,EACrE,cAAc,EACd,cAAc,EACd,YAAY,CACb,CAAC;YAEF,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;gBACrC,SAAS,EAAE,0BAAS,CAAC,KAAK;gBAC1B,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,KAAK;gBACL,IAAI;gBACJ,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,eAAe,EAAE,IAAI;oBACrB,WAAW,EAAE,CAAC,GAAG,IAAI,sBAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;oBAC7D,YAAY;oBACZ,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,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"}
@@ -7,6 +7,8 @@ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Bonk Rewards',
9
9
  image: 'https://sonar.watch/img/platforms/bonk.png',
10
+ twitter: 'https://twitter.com/bonk_inu',
11
+ website: 'https://bonkrewards.com/',
10
12
  // defiLlamaId: 'nothing yet',
11
13
  };
12
14
  exports.stakePid = new web3_js_1.PublicKey('STAKEkKzbdeKkqzKpLkNQD3SUuLgshDKCD7U8duxAbB');
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bonkrewards/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,4CAA4C;IACnD,8BAA8B;CAC/B,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bonkrewards/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,0BAA0B;IACnC,8BAA8B;CAC/B,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,SAAS,GAAG,8CAA8C,CAAC;AAC3D,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC"}
@@ -4,8 +4,10 @@ exports.marketsCachePrefix = exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'foo';
5
5
  exports.platform = {
6
6
  id: exports.platformId,
7
- name: 'Foo Finanace',
7
+ name: 'Foo Finance',
8
8
  image: 'https://sonar.watch/img/platforms/foo.png',
9
+ website: 'https://foo.com/',
10
+ twitter: 'https://twitter.com/foo_finance',
9
11
  defiLlamaId: 'foo-finance', // from https://defillama.com/docs/api
10
12
  };
11
13
  exports.marketsCachePrefix = `${exports.platformId}-markets`;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/foo/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,2CAA2C;IAClD,WAAW,EAAE,aAAa,EAAE,sCAAsC;CACnE,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/foo/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,KAAK,CAAC;AACnB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,2CAA2C;IAClD,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,iCAAiC;IAC1C,WAAW,EAAE,aAAa,EAAE,sCAAsC;CACnE,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { AptosClient } from 'aptos';
2
+ export declare function getDecimals(client: AptosClient, coinType: string): Promise<number | null>;
@@ -0,0 +1,23 @@
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
+ exports.getDecimals = void 0;
13
+ const getCoinInfoResource_1 = require("./getCoinInfoResource");
14
+ function getDecimals(client, coinType) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ const coinInfoResource = yield (0, getCoinInfoResource_1.getCoinInfoResource)(client, coinType);
17
+ if (!coinInfoResource)
18
+ return null;
19
+ return coinInfoResource.data.decimals;
20
+ });
21
+ }
22
+ exports.getDecimals = getDecimals;
23
+ //# sourceMappingURL=getDecimals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDecimals.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/aptos/getDecimals.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,+DAA4D;AAE5D,SAAsB,WAAW,CAAC,MAAmB,EAAE,QAAgB;;QACrE,MAAM,gBAAgB,GAAG,MAAM,IAAA,yCAAmB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACrE,IAAI,CAAC,gBAAgB;YAAE,OAAO,IAAI,CAAC;QACnC,OAAO,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC;IACxC,CAAC;CAAA;AAJD,kCAIC"}