@sonarwatch/portfolio-plugins 0.11.188 → 0.11.190

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 +8 -0
  2. package/package.json +2 -2
  3. package/src/plugins/01/constants.d.ts +6 -1
  4. package/src/plugins/01/constants.js +21 -2
  5. package/src/plugins/01/constants.js.map +1 -1
  6. package/src/plugins/01/helpers.d.ts +0 -1
  7. package/src/plugins/01/helpers.js +3 -3
  8. package/src/plugins/01/helpers.js.map +1 -1
  9. package/src/plugins/aave/constants.js.map +1 -1
  10. package/src/plugins/aave/index.d.ts +2 -1
  11. package/src/plugins/aave/index.js +3 -1
  12. package/src/plugins/aave/index.js.map +1 -1
  13. package/src/plugins/aave/services.d.ts +30 -0
  14. package/src/plugins/aave/services.js +181 -0
  15. package/src/plugins/aave/services.js.map +1 -0
  16. package/src/plugins/aries/constants.d.ts +5 -2
  17. package/src/plugins/aries/constants.js +6 -3
  18. package/src/plugins/aries/constants.js.map +1 -1
  19. package/src/plugins/aries/depositsFetcher.js +102 -96
  20. package/src/plugins/aries/depositsFetcher.js.map +1 -1
  21. package/src/plugins/aries/helpers.d.ts +20 -1
  22. package/src/plugins/aries/helpers.js +94 -2
  23. package/src/plugins/aries/helpers.js.map +1 -1
  24. package/src/plugins/aries/reservesJob.js +1 -1
  25. package/src/plugins/aries/reservesJob.js.map +1 -1
  26. package/src/plugins/aries/types.d.ts +56 -33
  27. package/src/plugins/jupiter/pricingJob.js +15 -0
  28. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  29. package/src/plugins/meteora/farmsFetcher.js +20 -11
  30. package/src/plugins/meteora/farmsFetcher.js.map +1 -1
  31. package/src/plugins/meteora/farmsJob.js +3 -1
  32. package/src/plugins/meteora/farmsJob.js.map +1 -1
  33. package/src/plugins/meteora/helpers.d.ts +4 -0
  34. package/src/plugins/meteora/helpers.js +25 -1
  35. package/src/plugins/meteora/helpers.js.map +1 -1
  36. package/src/plugins/meteora/multiTokenPools.json +10 -0
  37. package/src/plugins/meteora/types.d.ts +2 -5
  38. package/src/plugins/meteora/types.js.map +1 -1
  39. package/src/plugins/saber/constants.js +1 -1
  40. package/src/plugins/saber/constants.js.map +1 -1
  41. package/src/utils/aptos/getTableItemsByKeys.d.ts +1 -1
  42. package/src/utils/aptos/getTableItemsByKeys.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,2CAAmD;AACnD,iDAAsD;AACtD,+CAAmE;AACnE,qCAA6C;AAC7C,6FAAoE;AACpE,uGAA+E;AAE/E,qGAA6E;AAC7E,uCAA+C;AAE/C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAS,oBAAQ,EAAE;QACtD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,QAAQ,GAAsB,IAAI,GAAG,EAAE,CAAC;IAC9C,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,SAAS,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAChC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC,CAAC,CAAC;IAEH,MAAM,wBAAwB,GAAG,IAAA,4BAAkB,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAEtE,MAAM,eAAe,GAAG,MAAM,IAAA,sCAA6B,EACzD,MAAM,EACN,0BAAiB,EACjB,wB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Ae,OAAO,CAAC"}
@@ -15,10 +15,12 @@ const solana_1 = require("../../utils/solana");
15
15
  const filters_1 = require("../../utils/solana/filters");
16
16
  const constants_1 = require("./constants");
17
17
  const struct_1 = require("./struct");
18
+ const helpers_1 = require("./helpers");
18
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
20
  const client = (0, clients_1.getClientSolana)();
20
21
  const farms = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.farmStruct, constants_1.farmProgramId, (0, filters_1.dataSizeFilter)(502));
21
- yield cache.setItem(constants_1.farmsKey, farms, {
22
+ const fFarms = farms.map((f) => (0, helpers_1.formatFarm)(f));
23
+ yield cache.setItem(constants_1.farmsKey, fFarms, {
22
24
  prefix: constants_1.platformId,
23
25
  networkId: portfolio_core_1.NetworkId.solana,
24
26
  });
@@ -1 +1 @@
1
- {"version":3,"file":"farmsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/farmsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAAkE;AAClE,qCAAsC;AAEtC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,IAAA,iCAAwB,EAC1C,MAAM,EACN,mBAAU,EACV,yBAAa,EACb,IAAA,wBAAc,EAAC,GAAG,CAAC,CACpB,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,KAAK,EAAE;QACnC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,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"}
1
+ {"version":3,"file":"farmsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/farmsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAAkE;AAClE,qCAAsC;AACtC,uCAAuC;AAEvC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,IAAA,iCAAwB,EAC1C,MAAM,EACN,mBAAU,EACV,yBAAa,EACb,IAAA,wBAAc,EAAC,GAAG,CAAC,CACpB,CAAC;IAEF,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,oBAAU,EAAC,CAAC,CAAC,CAAC,CAAC;IAC/C,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,MAAM,EAAE;QACpC,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,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"}
@@ -1,2 +1,6 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
+ import { Farm } from './struct';
3
+ import { FormattedFarm } from './types';
4
+ import { ParsedAccount } from '../../utils/solana';
2
5
  export declare function getStakingAccounts(owner: string, farms: string[]): PublicKey[];
6
+ export declare function formatFarm(farm: ParsedAccount<Farm>): FormattedFarm;
@@ -1,10 +1,34 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStakingAccounts = void 0;
3
+ exports.formatFarm = exports.getStakingAccounts = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const constants_1 = require("./constants");
6
6
  function getStakingAccounts(owner, farms) {
7
7
  return farms.map((farm) => web3_js_1.PublicKey.findProgramAddressSync([new web3_js_1.PublicKey(owner).toBuffer(), new web3_js_1.PublicKey(farm).toBuffer()], constants_1.farmProgramId)[0]);
8
8
  }
9
9
  exports.getStakingAccounts = getStakingAccounts;
10
+ function formatFarm(farm) {
11
+ return {
12
+ pubkey: farm.pubkey.toString(),
13
+ authority: farm.authority.toString(),
14
+ stakingMint: farm.stakingMint.toString(),
15
+ stakingVault: farm.stakingVault.toString(),
16
+ rewardAMint: farm.rewardAMint.toString(),
17
+ rewardAVault: farm.rewardAVault.toString(),
18
+ rewardBMint: farm.rewardBMint.toString(),
19
+ rewardBVault: farm.rewardBVault.toString(),
20
+ rewardDuration: farm.rewardDuration.toString(),
21
+ rewardDurationEnd: farm.rewardDurationEnd.toString(),
22
+ lastUpdateTime: farm.lastUpdateTime.toString(),
23
+ rewardARate: farm.rewardARate.toString(),
24
+ rewardBRate: farm.rewardBRate.toString(),
25
+ rewardAPerTokenStored: farm.rewardAPerTokenStored.toString(),
26
+ rewardBPerTokenStored: farm.rewardBPerTokenStored.toString(),
27
+ rewardARateU128: farm.rewardARateU128.toString(),
28
+ rewardBRateU128: farm.rewardBRateU128.toString(),
29
+ paused: farm.paused,
30
+ totalStaked: farm.totalStaked.toString(),
31
+ };
32
+ }
33
+ exports.formatFarm = formatFarm;
10
34
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA4C;AAE5C,SAAgB,kBAAkB,CAChC,KAAa,EACb,KAAe;IAEf,OAAO,KAAK,CAAC,GAAG,CACd,CAAC,IAAI,EAAE,EAAE,CACP,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,IAA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AQ,EAAE;QACpD,cAAc,EAAE,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE;QAC9C,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;QACxC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;QACxC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE;QAC5D,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,EAAE;QAC5D,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;QAChD,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE;QAChD,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;KACzC,CAAC;AACJ,CAAC;AAtBD,gCAsBC"}
@@ -135,5 +135,15 @@
135
135
  "FznWTeu44sR9WvqVtekzGQn82z7BxErkcpDDDSmvncYY",
136
136
  "Ez1dYUW8FGhrJGHe4e84JTmyZYFwpjwM7GuhSaBth5Xh"
137
137
  ]
138
+ },
139
+ {
140
+ "symbol": "aUSDC-4Pool",
141
+ "address": "5ZDQYA8LN5tooABpPFCrDwx5wcaTgXMragLwFim27mar",
142
+ "reserveAccounts": [
143
+ "66guLcMF3qXkrMyLqDfuNKcHc7B6B36id9ZDDww4hiMv",
144
+ "8KX8TLQHfq9UyqNvzUrUCLiECNBdMspMmU8mghdM2SAM",
145
+ "2vhaJumb3hbRLUSDDy3Qk8KGGfzqThdwo8ai4tAvztGh",
146
+ "CC3FtDKTueNP1pmgtNWvKHZwbznyigSaiGhKsQYAfufD"
147
+ ]
138
148
  }
139
149
  ]
@@ -1,10 +1,9 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  import BigNumber from 'bignumber.js';
3
3
  import { LbPair } from './struct';
4
- export type Farm = {
4
+ export type FormattedFarm = {
5
5
  pubkey: string;
6
6
  authority: string;
7
- paused: boolean;
8
7
  stakingMint: string;
9
8
  stakingVault: string;
10
9
  rewardAMint: string;
@@ -18,12 +17,10 @@ export type Farm = {
18
17
  rewardBRate: string;
19
18
  rewardAPerTokenStored: string;
20
19
  rewardBPerTokenStored: string;
21
- userStakeCount: number;
22
- funders: string[];
23
20
  rewardARateU128: string;
24
21
  rewardBRateU128: string;
25
- poolBump: number;
26
22
  totalStaked: string;
23
+ paused: boolean;
27
24
  };
28
25
  export declare enum PositionVersion {
29
26
  V1 = 0,
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/types.ts"],"names":[],"mappings":";;;AA6BA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,iDAAE,CAAA;IACF,iDAAE,CAAA;AACJ,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,+CAAI,CAAA;IACJ,iDAAK,CAAA;IACL,mDAAM,CAAA;AACR,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/types.ts"],"names":[],"mappings":";;;AA0BA,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,iDAAE,CAAA;IACF,iDAAE,CAAA;AACJ,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,+CAAI,CAAA;IACJ,iDAAK,CAAA;IACL,mDAAM,CAAA;AACR,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
@@ -7,7 +7,7 @@ exports.platform = {
7
7
  name: 'Saber',
8
8
  image: 'https://sonar.watch/img/platforms/saber.png',
9
9
  defiLlamaId: 'saber',
10
- website: 'https://app.saber.so/',
10
+ website: 'https://saberdao.io/',
11
11
  };
12
12
  exports.SABER_SWAPS = 'https://raw.githubusercontent.com/saber-hq/saber-registry-dist/master/data/swaps.mainnet.json';
13
13
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/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,OAAO;IACpB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/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,OAAO;IACpB,OAAO,EAAE,sBAAsB;CAChC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}
@@ -1,2 +1,2 @@
1
1
  import { AptosClient } from '../clients/types';
2
- export declare function getTableItemsByKeys<T>(client: AptosClient, handle: string, keys: string[], keyType: string, valueType: string): Promise<(Awaited<NonNullable<Awaited<T>>> | null)[]>;
2
+ export declare function getTableItemsByKeys<T>(client: AptosClient, handle: string, keys: (object | string)[], keyType: string, valueType: string): Promise<(Awaited<NonNullable<Awaited<T>>> | null)[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"getTableItemsByKeys.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/aptos/getTableItemsByKeys.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAA8C;AAE9C,MAAM,GAAG,GAAG,EAAE,CAAC;AAEf,SAAsB,mBAAmB,CACvC,MAAmB,EACnB,MAAc,EACd,IAAc,EACd,OAAe,EACf,SAAiB;;QAEjB,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;QAC9B,OAAO,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YACnD,MAAM,SAAS,GAAG,MAAM,oBAAoB,CAC1C,MAAM,EACN,MAAM,EACN,eAAe,EACf,OAAO,EACP,SAAS,CACV,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AArBD,kDAqBC;AAED,SAAe,oBAAoB,CACjC,MAAmB,EACnB,MAAc,EACd,IAAc,EACd,OAAe,EACf,SAAiB;;QAEjB,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAChC,IAAA,2BAAY,EAAI,MAAM,EAAE,MAAM,EAAE;YAC9B,GAAG;YACH,QAAQ,EAAE,OAAO;YACjB,UAAU,EAAE,SAAS;SACtB,CAAC,CACH,CAAC;QACF,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACnD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;YAC5B,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU;gBAAE,OAAO,IAAI,CAAC;YAC9C,OAAO,MAAM,CAAC,KAAK,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;CAAA"}
1
+ {"version":3,"file":"getTableItemsByKeys.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/aptos/getTableItemsByKeys.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDAA8C;AAE9C,MAAM,GAAG,GAAG,EAAE,CAAC;AAEf,SAAsB,mBAAmB,CACvC,MAAmB,EACnB,MA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