@sonarwatch/portfolio-plugins 0.11.194 → 0.11.196

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/CHANGELOG.md +1525 -1517
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +8 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/haedal/constants.d.ts +5 -0
  8. package/src/plugins/haedal/constants.js +15 -0
  9. package/src/plugins/haedal/constants.js.map +1 -0
  10. package/src/plugins/haedal/index.d.ts +6 -0
  11. package/src/plugins/haedal/index.js +12 -0
  12. package/src/plugins/haedal/index.js.map +1 -0
  13. package/src/plugins/haedal/types.d.ts +19 -0
  14. package/src/plugins/haedal/types.js +3 -0
  15. package/src/plugins/haedal/types.js.map +1 -0
  16. package/src/plugins/haedal/vaultFetcher.d.ts +3 -0
  17. package/src/plugins/haedal/vaultFetcher.js +58 -0
  18. package/src/plugins/haedal/vaultFetcher.js.map +1 -0
  19. package/src/plugins/kriya/constants.d.ts +13 -0
  20. package/src/plugins/kriya/constants.js +30 -0
  21. package/src/plugins/kriya/constants.js.map +1 -0
  22. package/src/plugins/kriya/farmsFetcher.d.ts +3 -0
  23. package/src/plugins/kriya/farmsFetcher.js +104 -0
  24. package/src/plugins/kriya/farmsFetcher.js.map +1 -0
  25. package/src/plugins/kriya/farmsJob.d.ts +3 -0
  26. package/src/plugins/kriya/farmsJob.js +47 -0
  27. package/src/plugins/kriya/farmsJob.js.map +1 -0
  28. package/src/plugins/kriya/index.d.ts +6 -0
  29. package/src/plugins/kriya/index.js +15 -0
  30. package/src/plugins/kriya/index.js.map +1 -0
  31. package/src/plugins/kriya/types.d.ts +155 -0
  32. package/src/plugins/kriya/types.js +16 -0
  33. package/src/plugins/kriya/types.js.map +1 -0
  34. package/src/plugins/kriya/vaultsFetcher.d.ts +3 -0
  35. package/src/plugins/kriya/vaultsFetcher.js +94 -0
  36. package/src/plugins/kriya/vaultsFetcher.js.map +1 -0
  37. package/src/plugins/kriya/vaultsJob.d.ts +3 -0
  38. package/src/plugins/kriya/vaultsJob.js +57 -0
  39. package/src/plugins/kriya/vaultsJob.js.map +1 -0
  40. package/src/plugins/sushiswap/helpers.js +24 -24
  41. package/src/plugins/uniswap-v2/helpers.js +22 -22
  42. package/src/utils/sei/constants.js +8 -8
  43. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  44. package/src/utils/sui/mulitpleGetBalances.d.ts +3 -0
  45. package/src/utils/sui/mulitpleGetBalances.js +19 -0
  46. package/src/utils/sui/mulitpleGetBalances.js.map +1 -0
  47. package/src/utils/sui/multipleGetDynamicFieldsObjects.d.ts +4 -0
  48. package/src/utils/sui/multipleGetDynamicFieldsObjects.js +25 -0
  49. package/src/utils/sui/multipleGetDynamicFieldsObjects.js.map +1 -0
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # @sonarwatch/portfolio-plugins
2
-
3
- This library is @sonarwatch/portfolio-plugins
1
+ # @sonarwatch/portfolio-plugins
2
+
3
+ This library is @sonarwatch/portfolio-plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.11.194",
3
+ "version": "0.11.196",
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.194"
44
+ "@sonarwatch/portfolio-core": "0.11.196"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/index.js CHANGED
@@ -108,6 +108,8 @@ const jito_1 = require("./plugins/jito");
108
108
  const magiceden_1 = require("./plugins/magiceden");
109
109
  const clone_1 = require("./plugins/clone");
110
110
  const sandglass_1 = require("./plugins/sandglass");
111
+ const kriya_1 = require("./plugins/kriya");
112
+ const haedal_1 = require("./plugins/haedal");
111
113
  var constants_1 = require("./plugins/tokens/constants");
112
114
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
113
115
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -209,6 +211,8 @@ exports.platforms = [
209
211
  ...magiceden_1.platforms,
210
212
  ...clone_1.platforms,
211
213
  ...sandglass_1.platforms,
214
+ ...kriya_1.platforms,
215
+ ...haedal_1.platforms,
212
216
  ];
213
217
  // JOBS //
214
218
  exports.jobs = [
@@ -293,6 +297,8 @@ exports.jobs = [
293
297
  ...clone_1.jobs,
294
298
  ...switchboard_1.jobs,
295
299
  ...sandglass_1.jobs,
300
+ ...kriya_1.jobs,
301
+ ...haedal_1.jobs,
296
302
  ];
297
303
  // FETCHERS //
298
304
  exports.fetchers = [
@@ -379,6 +385,8 @@ exports.fetchers = [
379
385
  ...magiceden_1.fetchers,
380
386
  ...clone_1.fetchers,
381
387
  ...sandglass_1.fetchers,
388
+ ...kriya_1.fetchers,
389
+ ...haedal_1.fetchers,
382
390
  ];
383
391
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
384
392
  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,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,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,2CAKyB;AACzB,2CAIyB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AG,kBAAe;IAClB,GAAG,eAAY;IACf,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;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,iBAAc;IACjB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;CAClB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,sBAAmB;IACnB,sBAAmB;CACpB,CAAC"}
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -0,0 +1,5 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "haedal";
3
+ export declare const platform: Platform;
4
+ export declare const vaultPackageId = "0xbf11606fada95eac5fb6372c958add822c59886c20050f425d63534657831cbe";
5
+ export declare const usersInfosOwner = "0x90f0b586d81af92f34ed369f5c3fe48a8dc8011de8eb1b88eb5517c6842d0946";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usersInfosOwner = exports.vaultPackageId = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'haedal';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Haedal',
8
+ image: 'https://sonar.watch/img/platforms/haedal.webp',
9
+ defiLlamaId: 'haedal-protocol', // from https://defillama.com/docs/api
10
+ website: 'https://haedal.xyz/stake',
11
+ twitter: 'https://twitter.com/HaedalProtocol',
12
+ };
13
+ exports.vaultPackageId = '0xbf11606fada95eac5fb6372c958add822c59886c20050f425d63534657831cbe';
14
+ exports.usersInfosOwner = '0x90f0b586d81af92f34ed369f5c3fe48a8dc8011de8eb1b88eb5517c6842d0946';
15
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/haedal/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,iBAAiB,EAAE,sCAAsC;IACtE,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,oCAAoC;CAC9C,CAAC;AAEW,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,eAAe,GAC1B,oEAAoE,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,12 @@
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 vaultFetcher_1 = __importDefault(require("./vaultFetcher"));
9
+ exports.platforms = [constants_1.platform];
10
+ exports.jobs = [];
11
+ exports.fetchers = [vaultFetcher_1.default];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/haedal/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,sBAAY,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type UserInfo = {
2
+ id: ID;
3
+ name: string;
4
+ value: Value;
5
+ };
6
+ export type ID = {
7
+ id: string;
8
+ };
9
+ export type Value = {
10
+ fields: Fields;
11
+ type: string;
12
+ };
13
+ export type Fields = {
14
+ account: string;
15
+ last_deposit_time: string;
16
+ share: string;
17
+ total_amount: string;
18
+ withdrawed_amount: string;
19
+ };
@@ -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/haedal/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,58 @@
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 clients_1 = require("../../utils/clients");
19
+ const getDynamicFieldObjects_1 = require("../../utils/sui/getDynamicFieldObjects");
20
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ var _a, _b;
23
+ const client = (0, clients_1.getClientSui)();
24
+ const test = yield (0, getDynamicFieldObjects_1.getDynamicFieldObjects)(client, constants_1.usersInfosOwner);
25
+ const userInfos = test.filter((object) => { var _a, _b; return ((_b = (_a = object.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.name) === owner; });
26
+ if (userInfos.length !== 1)
27
+ return [];
28
+ const userDeposit = (_b = (_a = userInfos[0].data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.fields;
29
+ if (!userDeposit)
30
+ return [];
31
+ const amount = new bignumber_js_1.default(userDeposit.total_amount)
32
+ .minus(new bignumber_js_1.default(userDeposit.withdrawed_amount))
33
+ .dividedBy(Math.pow(10, portfolio_core_1.suiNativeDecimals));
34
+ if (amount.isZero())
35
+ return [];
36
+ const tokenPrice = yield cache.getTokenPrice(portfolio_core_1.suiNativeAddress, portfolio_core_1.NetworkId.sui);
37
+ const asset = (0, tokenPriceToAssetToken_1.default)(portfolio_core_1.suiNativeAddress, amount.toNumber(), portfolio_core_1.NetworkId.sui, tokenPrice);
38
+ return [
39
+ {
40
+ type: 'multiple',
41
+ label: 'Deposit',
42
+ platformId: constants_1.platformId,
43
+ networkId: portfolio_core_1.NetworkId.sui,
44
+ data: {
45
+ assets: [asset],
46
+ },
47
+ value: asset.value,
48
+ name: 'Random Vault',
49
+ },
50
+ ];
51
+ });
52
+ const fetcher = {
53
+ id: `${constants_1.platformId}-vault`,
54
+ networkId: portfolio_core_1.NetworkId.sui,
55
+ executor,
56
+ };
57
+ exports.default = fetcher;
58
+ //# sourceMappingURL=vaultFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/haedal/vaultFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA0D;AAC1D,iDAAmD;AACnD,mFAAgF;AAEhF,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAA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YACD,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,cAAc;SACrB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { VaultInfo } from './types';
3
+ export declare const platformId = "kriya";
4
+ export declare const platform: Platform;
5
+ export declare const vaultsPackageId = "0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7";
6
+ export declare const farmsPackageId = "0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085";
7
+ export declare const vaultsInfoKey = "vaultsInfos";
8
+ export declare const farmsInfoKey = "farmsInfos";
9
+ export declare const vaultsUrl = "https://88ob93rfva.execute-api.ap-southeast-1.amazonaws.com/release/vaults";
10
+ export declare const poolsUrl = "https://xd0ljetd33.execute-api.ap-southeast-1.amazonaws.com/release/pools";
11
+ export declare const vaultsCointsTypes: string[];
12
+ export declare const vaultsInfo: VaultInfo[];
13
+ export declare const dynamicFieldPositionType = "0x2::dynamic_field::Field<vector<u8>, 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position>";
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dynamicFieldPositionType = exports.vaultsInfo = exports.vaultsCointsTypes = exports.poolsUrl = exports.vaultsUrl = exports.farmsInfoKey = exports.vaultsInfoKey = exports.farmsPackageId = exports.vaultsPackageId = exports.platform = exports.platformId = void 0;
4
+ exports.platformId = 'kriya';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Kriya',
8
+ image: 'https://sonar.watch/img/platforms/kriya.webp',
9
+ defiLlamaId: 'kriya', // from https://defillama.com/docs/api
10
+ website: 'https://www.app.kriya.finance/',
11
+ twitter: 'https://twitter.com/KriyaDEX',
12
+ };
13
+ exports.vaultsPackageId = '0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7';
14
+ exports.farmsPackageId = '0x88701243d0445aa38c0a13f02a9af49a58092dfadb93af9754edb41c52f40085';
15
+ exports.vaultsInfoKey = 'vaultsInfos';
16
+ exports.farmsInfoKey = 'farmsInfos';
17
+ exports.vaultsUrl = 'https://88ob93rfva.execute-api.ap-southeast-1.amazonaws.com/release/vaults';
18
+ exports.poolsUrl = 'https://xd0ljetd33.execute-api.ap-southeast-1.amazonaws.com/release/pools';
19
+ exports.vaultsCointsTypes = [
20
+ '0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7::kc_allweather_vt::KC_ALLWEATHER_VT',
21
+ ];
22
+ exports.vaultsInfo = [
23
+ {
24
+ tokenType: '0xc4ee7b00ea981402a6285b14ffa5dcd1ee7f97eb2a91df3bcc04fa88c56ac7d7::kc_allweather_vt::KC_ALLWEATHER_VT',
25
+ id: '0x5eb2f7e07e4fbe6ce47dd10dc040efd5c79228ed767d242c320571dcd7c5a976',
26
+ underlyingPool: '0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630',
27
+ },
28
+ ];
29
+ exports.dynamicFieldPositionType = '0x2::dynamic_field::Field<vector<u8>, 0x1eabed72c53feb3805120a081dc15963c204dc8d091542592abaf7a35689b2fb::position::Position>';
30
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,OAAO,EAAE,sCAAsC;IAC5D,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,eAAe,GAC1B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAE1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAC9B,QAAA,YAAY,GAAG,YAAY,CAAC;AAE5B,QAAA,SAAS,GACpB,4EAA4E,CAAC;AAClE,QAAA,QAAQ,GACnB,2EAA2E,CAAC;AAEjE,QAAA,iBAAiB,GAAG;IAC/B,wGAAwG;CACzG,CAAC;AAEW,QAAA,UAAU,GAAgB;IACrC;QACE,SAAS,EACP,wGAAwG;QAC1G,EAAE,EAAE,oEAAoE;QACxE,cAAc,EACZ,oEAAoE;KACvE;CACF,CAAC;AAEW,QAAA,wBAAwB,GACnC,+HAA+H,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,104 @@
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 clients_1 = require("../../utils/clients");
19
+ const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
20
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
+ var _a, _b;
23
+ const client = (0, clients_1.getClientSui)();
24
+ const farmsObjects = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
25
+ filter: { Package: constants_1.farmsPackageId },
26
+ });
27
+ if (farmsObjects.length === 0)
28
+ return [];
29
+ const farmsInfos = yield cache.getItem(constants_1.farmsInfoKey, {
30
+ prefix: constants_1.platformId,
31
+ networkId: portfolio_core_1.NetworkId.sui,
32
+ });
33
+ if (!farmsInfos)
34
+ return [];
35
+ const farmById = new Map();
36
+ const mints = new Set();
37
+ farmsInfos.forEach((farm) => {
38
+ farmById.set(farm.farmId, farm);
39
+ mints.add(farm.tokenXType);
40
+ mints.add(farm.tokenYType);
41
+ });
42
+ const tokenPriceById = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.sui);
43
+ const liquidities = [];
44
+ let totalValue = 0;
45
+ for (const object of farmsObjects) {
46
+ if (!((_b = (_a = object.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields))
47
+ continue;
48
+ const position = object.data.content.fields;
49
+ const farmInfo = farmById.get(position.farm_id);
50
+ if (!farmInfo)
51
+ continue;
52
+ const [tokenPriceX, tokenPriceY] = [
53
+ tokenPriceById.get((0, portfolio_core_1.formatMoveTokenAddress)(farmInfo.tokenXType)),
54
+ tokenPriceById.get((0, portfolio_core_1.formatMoveTokenAddress)(farmInfo.tokenYType)),
55
+ ];
56
+ const shares = new bignumber_js_1.default(position.stake_amount).dividedBy(new bignumber_js_1.default(farmInfo.lspSupply));
57
+ const tokenAmountX = new bignumber_js_1.default(farmInfo.tokenXReserve)
58
+ .times(shares)
59
+ .dividedBy(Math.pow(10, farmInfo.tokenX.decimals))
60
+ .toNumber();
61
+ const tokenAmountY = new bignumber_js_1.default(farmInfo.tokenYReserve)
62
+ .times(shares)
63
+ .dividedBy(Math.pow(10, farmInfo.tokenY.decimals))
64
+ .toNumber();
65
+ const assetX = (0, tokenPriceToAssetToken_1.default)(farmInfo.tokenXType, tokenAmountX, portfolio_core_1.NetworkId.sui, tokenPriceX);
66
+ const assetY = (0, tokenPriceToAssetToken_1.default)(farmInfo.tokenYType, tokenAmountY, portfolio_core_1.NetworkId.sui, tokenPriceY);
67
+ const value = (0, portfolio_core_1.getUsdValueSum)([assetX.value, assetY.value]);
68
+ totalValue = (0, portfolio_core_1.getUsdValueSum)([totalValue, value]);
69
+ liquidities.push({
70
+ assets: [assetX, assetY],
71
+ assetsValue: value,
72
+ rewardAssets: [],
73
+ rewardAssetsValue: null,
74
+ value,
75
+ yields: [
76
+ {
77
+ apy: farmInfo.apy / 100,
78
+ apr: (0, portfolio_core_1.apyToApr)(farmInfo.apy / 100),
79
+ },
80
+ ],
81
+ });
82
+ }
83
+ if (liquidities.length === 0)
84
+ return [];
85
+ return [
86
+ {
87
+ type: 'liquidity',
88
+ data: {
89
+ liquidities,
90
+ },
91
+ label: 'Farming',
92
+ networkId: portfolio_core_1.NetworkId.sui,
93
+ platformId: constants_1.platformId,
94
+ value: totalValue,
95
+ },
96
+ ];
97
+ });
98
+ const fetcher = {
99
+ id: `${constants_1.platformId}-farms`,
100
+ networkId: portfolio_core_1.NetworkId.sui,
101
+ executor,
102
+ };
103
+ exports.default = fetcher;
104
+ //# sourceMappingURL=farmsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AACnD,qEAAkE;AAElE,qGAA6E;AAE7E,MAAM,QA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K,GAAG,IAAA,+BAAc,EAAC,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAE3D,UAAU,GAAG,IAAA,+BAAc,EAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QACjD,WAAW,CAAC,IAAI,CAAC;YACf,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;YACxB,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,iBAAiB,EAAE,IAAI;YACvB,KAAK;YACL,MAAM,EAAE;gBACN;oBACE,GAAG,EAAE,QAAQ,CAAC,GAAG,GAAG,GAAG;oBACvB,GAAG,EAAE,IAAA,yBAAQ,EAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;iBAClC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACxC,OAAO;QACL;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,WAAW;aACZ;YACD,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,UAAU;SAClB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,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,47 @@
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
20
+ .get(constants_1.poolsUrl, {
21
+ headers: {
22
+ Origin: 'https://www.app.kriya.finance/',
23
+ Referer: 'https://www.app.kriya.finance',
24
+ 'X-Api-Key': 'xf40orKtic35JD39RVem77IOuSjb44FV5X7wSabU',
25
+ },
26
+ })
27
+ .catch(() => null);
28
+ if (!pools)
29
+ return;
30
+ const poolsInfo = [];
31
+ for (const pool of pools.data) {
32
+ if (pool.lspSupply === '0')
33
+ continue;
34
+ poolsInfo.push(pool);
35
+ }
36
+ yield cache.setItem(constants_1.farmsInfoKey, poolsInfo, {
37
+ prefix: constants_1.platformId,
38
+ networkId: portfolio_core_1.NetworkId.sui,
39
+ });
40
+ });
41
+ const job = {
42
+ id: `${constants_1.platformId}-farms`,
43
+ executor,
44
+ label: 'normal',
45
+ };
46
+ exports.default = job;
47
+ //# sourceMappingURL=farmsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farmsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/farmsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAAiE;AAGjE,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,GAAqC,MAAM,eAAK;SACxD,GAAG,CAAC,oBAAQ,EAAE;QACb,OAAO,EAAE;YACP,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,+BAA+B;YACxC,WAAW,EAAE,0CAA0C;SACxD;KACF,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAErB,IAAI,CAAC,KAAK;QAAE,OAAO;IAEnB,MAAM,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAC9B,IAAI,IAAI,CAAC,SAAS,KAAK,GAAG;YAAE,SAAS;QAErC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,wBAAY,EAAE,SAAS,EAAE;QAC3C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,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,15 @@
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 vaultsFetcher_1 = __importDefault(require("./vaultsFetcher"));
9
+ const vaultsJob_1 = __importDefault(require("./vaultsJob"));
10
+ const farmsJob_1 = __importDefault(require("./farmsJob"));
11
+ const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
12
+ exports.platforms = [constants_1.platform];
13
+ exports.jobs = [vaultsJob_1.default, farmsJob_1.default];
14
+ exports.fetchers = [vaultsFetcher_1.default, farmsFetcher_1.default];
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kriya/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,oEAA2C;AAC3C,4DAAmC;AACnC,0DAAkC;AAClC,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAQ,EAAE,kBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc,CAAC,uBAAY,EAAE,sBAAY,CAAC,CAAC"}