@sonarwatch/portfolio-plugins 0.12.179 → 0.12.181

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/CHANGELOG.md +1514 -1506
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +5 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/bucket/bucketsJob.js +71 -0
  8. package/src/plugins/bucket/bucketsJob.js.map +1 -0
  9. package/src/plugins/bucket/collateralFetcher.js +46 -60
  10. package/src/plugins/bucket/collateralFetcher.js.map +1 -1
  11. package/src/plugins/bucket/constants.d.ts +8 -5
  12. package/src/plugins/bucket/constants.js +11 -20
  13. package/src/plugins/bucket/constants.js.map +1 -1
  14. package/src/plugins/bucket/index.js +5 -2
  15. package/src/plugins/bucket/index.js.map +1 -1
  16. package/src/plugins/bucket/sbuckJob.js +56 -0
  17. package/src/plugins/bucket/sbuckJob.js.map +1 -0
  18. package/src/plugins/bucket/stakingFetcher.d.ts +3 -0
  19. package/src/plugins/bucket/stakingFetcher.js +47 -0
  20. package/src/plugins/bucket/stakingFetcher.js.map +1 -0
  21. package/src/plugins/bucket/types.d.ts +113 -0
  22. package/src/plugins/loopscale/constants.d.ts +3 -1
  23. package/src/plugins/loopscale/constants.js +4 -4
  24. package/src/plugins/loopscale/constants.js.map +1 -1
  25. package/src/plugins/loopscale/filters.d.ts +7 -0
  26. package/src/plugins/loopscale/filters.js +62 -0
  27. package/src/plugins/loopscale/filters.js.map +1 -0
  28. package/src/plugins/loopscale/helpers.d.ts +33 -0
  29. package/src/plugins/loopscale/helpers.js +162 -0
  30. package/src/plugins/loopscale/helpers.js.map +1 -0
  31. package/src/plugins/loopscale/index.js +1 -2
  32. package/src/plugins/loopscale/index.js.map +1 -1
  33. package/src/plugins/loopscale/positionsFetcher.js +89 -40
  34. package/src/plugins/loopscale/positionsFetcher.js.map +1 -1
  35. package/src/plugins/loopscale/structs.d.ts +95 -14
  36. package/src/plugins/loopscale/structs.js +87 -13
  37. package/src/plugins/loopscale/structs.js.map +1 -1
  38. package/src/plugins/moonwalk/constants.d.ts +1 -0
  39. package/src/plugins/moonwalk/constants.js +2 -1
  40. package/src/plugins/moonwalk/constants.js.map +1 -1
  41. package/src/plugins/moonwalk/gamesFetcher.js +24 -61
  42. package/src/plugins/moonwalk/gamesFetcher.js.map +1 -1
  43. package/src/plugins/moonwalk/index.js +1 -2
  44. package/src/plugins/moonwalk/index.js.map +1 -1
  45. package/src/plugins/moonwalk/types.d.ts +12 -0
  46. package/src/plugins/moonwalk/types.js +3 -0
  47. package/src/plugins/moonwalk/types.js.map +1 -0
  48. package/src/plugins/save/obligationsFetcher.js +3 -3
  49. package/src/plugins/save/obligationsFetcher.js.map +1 -1
  50. package/src/plugins/stabble/constants.js +1 -1
  51. package/src/plugins/sushiswap/helpers.js +24 -24
  52. package/src/plugins/uniswap-v2/helpers.js +22 -22
  53. package/src/plugins/zeta/airdropFetcher.js +14 -14
  54. package/src/utils/sei/constants.js +8 -8
  55. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  56. package/src/plugins/loopscale/marketsJob.js +0 -26
  57. package/src/plugins/loopscale/marketsJob.js.map +0 -1
  58. package/src/plugins/moonwalk/gamesJob.js +0 -37
  59. package/src/plugins/moonwalk/gamesJob.js.map +0 -1
  60. /package/src/plugins/{loopscale/marketsJob.d.ts → bucket/bucketsJob.d.ts} +0 -0
  61. /package/src/plugins/{moonwalk/gamesJob.d.ts → bucket/sbuckJob.d.ts} +0 -0
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;
@@ -1,26 +0,0 @@
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 executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
15
- yield cache.setItem('market_id', 'market_object', {
16
- prefix: constants_1.marketsCachePrefix,
17
- networkId: portfolio_core_1.NetworkId.ethereum,
18
- });
19
- });
20
- const job = {
21
- id: `${constants_1.platformId}-markets`,
22
- executor,
23
- label: 'normal',
24
- };
25
- exports.default = job;
26
- //# sourceMappingURL=marketsJob.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAA6D;AAE7D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,eAAe,EAAE;QAChD,MAAM,EAAE,8BAAkB;QAC1B,SAAS,EAAE,0BAAS,CAAC,QAAQ;KAC9B,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"}
@@ -1,37 +0,0 @@
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 clients_1 = require("../../utils/clients");
15
- const solana_1 = require("../../utils/solana");
16
- const structs_1 = require("./structs");
17
- const helpers_1 = require("./helpers");
18
- const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
- const connection = (0, clients_1.getClientSolana)();
20
- const games = yield (0, solana_1.getParsedProgramAccounts)(connection, structs_1.gameStruct, constants_1.programId, [
21
- {
22
- dataSize: structs_1.gameStruct.byteSize,
23
- },
24
- ]);
25
- const cachedGames = games.map((g) => (0, helpers_1.gameToCached)(g));
26
- yield cache.setItem(constants_1.gamesCacheId, cachedGames, {
27
- prefix: constants_1.platformId,
28
- networkId: portfolio_core_1.NetworkId.solana,
29
- });
30
- });
31
- const job = {
32
- id: `${constants_1.platformId}-games`,
33
- executor,
34
- label: 'normal',
35
- };
36
- exports.default = job;
37
- //# sourceMappingURL=gamesJob.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gamesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/moonwalk/gamesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAkE;AAClE,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAuC;AACvC,uCAAyC;AAEzC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,KAAK,GAAG,MAAM,IAAA,iCAAwB,EAC1C,UAAU,EACV,oBAAU,EACV,qBAAS,EACT;QACE;YACE,QAAQ,EAAE,oBAAU,CAAC,QAAQ;SAC9B;KACF,CACF,CAAC;IACF,MAAM,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,sBAAY,EAAC,CAAC,CAAC,CAAC,CAAC;IACtD,MAAM,KAAK,CAAC,OAAO,CAAC,wBAAY,EAAE,WAAW,EAAE;QAC7C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}