@sonarwatch/portfolio-plugins 0.12.28 → 0.12.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/CHANGELOG.md +1810 -1806
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/bonfida/airdropFetcher.d.ts +3 -0
  6. package/src/plugins/bonfida/airdropFetcher.js +59 -0
  7. package/src/plugins/bonfida/airdropFetcher.js.map +1 -0
  8. package/src/plugins/bonfida/constants.d.ts +4 -0
  9. package/src/plugins/bonfida/constants.js +5 -1
  10. package/src/plugins/bonfida/constants.js.map +1 -1
  11. package/src/plugins/bonfida/filters.d.ts +2 -0
  12. package/src/plugins/bonfida/filters.js +15 -0
  13. package/src/plugins/bonfida/filters.js.map +1 -0
  14. package/src/plugins/bonfida/index.js +2 -1
  15. package/src/plugins/bonfida/index.js.map +1 -1
  16. package/src/plugins/bonfida/types.d.ts +6 -0
  17. package/src/plugins/bonfida/types.js +3 -0
  18. package/src/plugins/bonfida/types.js.map +1 -0
  19. package/src/plugins/futarchy/constants.js +3 -0
  20. package/src/plugins/futarchy/constants.js.map +1 -1
  21. package/src/plugins/jupiter/exchange/filters.js +1 -6
  22. package/src/plugins/jupiter/exchange/filters.js.map +1 -1
  23. package/src/plugins/jupiter/exchange/perpetualFetcher.js +4 -3
  24. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  25. package/src/plugins/jupiter/exchange/structs.d.ts +1 -0
  26. package/src/plugins/jupiter/exchange/structs.js +1 -0
  27. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  28. package/src/plugins/meteora/dlmmPositionsFetcher.js +8 -9
  29. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  30. package/src/plugins/parcl/marginFetcher.js +4 -2
  31. package/src/plugins/parcl/marginFetcher.js.map +1 -1
  32. package/src/plugins/pyth/stakingFetcher.js +4 -2
  33. package/src/plugins/pyth/stakingFetcher.js.map +1 -1
  34. package/src/plugins/raydium/clmmJob.js +114 -15
  35. package/src/plugins/raydium/clmmJob.js.map +1 -1
  36. package/src/plugins/raydium/cpmmJob.js +79 -65
  37. package/src/plugins/raydium/cpmmJob.js.map +1 -1
  38. package/src/plugins/sushiswap/helpers.js +24 -24
  39. package/src/plugins/uniswap-v2/helpers.js +22 -22
  40. package/src/plugins/whalesmarket/constants.d.ts +3 -0
  41. package/src/plugins/whalesmarket/constants.js +4 -1
  42. package/src/plugins/whalesmarket/constants.js.map +1 -1
  43. package/src/plugins/whalesmarket/depositFetcher.js +119 -26
  44. package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
  45. package/src/plugins/whalesmarket/filters.d.ts +20 -0
  46. package/src/plugins/whalesmarket/filters.js +25 -1
  47. package/src/plugins/whalesmarket/filters.js.map +1 -1
  48. package/src/plugins/whalesmarket/index.js +2 -1
  49. package/src/plugins/whalesmarket/index.js.map +1 -1
  50. package/src/plugins/whalesmarket/structs.d.ts +29 -0
  51. package/src/plugins/whalesmarket/structs.js +31 -1
  52. package/src/plugins/whalesmarket/structs.js.map +1 -1
  53. package/src/plugins/whalesmarket/tokensJob.d.ts +3 -0
  54. package/src/plugins/whalesmarket/tokensJob.js +47 -0
  55. package/src/plugins/whalesmarket/tokensJob.js.map +1 -0
  56. package/src/plugins/whalesmarket/types.d.ts +111 -0
  57. package/src/plugins/whalesmarket/types.js +48 -0
  58. package/src/plugins/whalesmarket/types.js.map +1 -0
  59. package/src/utils/misc/constants.d.ts +1 -0
  60. package/src/utils/misc/constants.js +2 -1
  61. package/src/utils/misc/constants.js.map +1 -1
  62. package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
  63. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  64. package/src/utils/sei/constants.js +8 -8
  65. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -8,6 +8,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
8
8
  const constants_1 = require("../../plugins/tokens/constants");
9
9
  const getSourceWeight_1 = __importDefault(require("./getSourceWeight"));
10
10
  const constants_2 = require("../sui/constants");
11
+ const constants_3 = require("./constants");
11
12
  exports.defaultAcceptedPairs = new Map([
12
13
  [
13
14
  portfolio_core_1.NetworkId.sei,
@@ -56,7 +57,7 @@ function getLpUnderlyingTokenSource(params) {
56
57
  if (acceptedPairs.length === 0)
57
58
  return [];
58
59
  if (!minReserveValue)
59
- minReserveValue = 2500;
60
+ minReserveValue = constants_3.minimumReserveValue;
60
61
  // Verify underlyings weights
61
62
  let totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + (p.weight || 0), 0);
62
63
  if (totalWeight === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAElC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC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,uBAAuB,KAAK,UAAU,CAAC,CAAC,CAAC;YAAE,SAAS;QACxD,IAAI,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAAE,SAAS;QACpD,IACE,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kCAAiB,CAAC;YAE5D,SAAS;QAEX,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM;YACpC,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAC/C,2CAAkD;AAErC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,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AAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -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;