@sonarwatch/portfolio-plugins 0.14.20 → 0.14.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/CHANGELOG.md +1672 -1668
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +12 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/grass/constants.d.ts +6 -0
  8. package/src/plugins/grass/constants.js +15 -0
  9. package/src/plugins/grass/constants.js.map +1 -0
  10. package/src/plugins/grass/helpers.d.ts +2 -0
  11. package/src/plugins/grass/helpers.js +10 -0
  12. package/src/plugins/grass/helpers.js.map +1 -0
  13. package/src/plugins/grass/index.d.ts +6 -0
  14. package/src/plugins/grass/index.js +12 -0
  15. package/src/plugins/grass/index.js.map +1 -0
  16. package/src/plugins/grass/stakingFetcher.js +52 -0
  17. package/src/plugins/grass/stakingFetcher.js.map +1 -0
  18. package/src/plugins/grass/structs.d.ts +28 -0
  19. package/src/plugins/grass/structs.js +28 -0
  20. package/src/plugins/grass/structs.js.map +1 -0
  21. package/src/plugins/hxro/constants.d.ts +6 -0
  22. package/src/plugins/hxro/constants.js +16 -0
  23. package/src/plugins/hxro/constants.js.map +1 -0
  24. package/src/plugins/hxro/index.d.ts +6 -0
  25. package/src/plugins/hxro/index.js +12 -0
  26. package/src/plugins/hxro/index.js.map +1 -0
  27. package/src/plugins/hxro/stakingFetcher.d.ts +3 -0
  28. package/src/plugins/hxro/stakingFetcher.js +57 -0
  29. package/src/plugins/hxro/stakingFetcher.js.map +1 -0
  30. package/src/plugins/hxro/structs.d.ts +37 -0
  31. package/src/plugins/hxro/structs.js +36 -0
  32. package/src/plugins/hxro/structs.js.map +1 -0
  33. package/src/plugins/hxro/types.d.ts +5 -0
  34. package/src/plugins/hxro/types.js +3 -0
  35. package/src/plugins/hxro/types.js.map +1 -0
  36. package/src/plugins/jupiter/helpers.js +22 -8
  37. package/src/plugins/jupiter/helpers.js.map +1 -1
  38. package/src/plugins/jupiter/pricingJob.js +0 -4
  39. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  40. package/src/plugins/orca/getWhirlpoolPositions.js +9 -6
  41. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  42. package/src/plugins/spdr/constants.d.ts +7 -0
  43. package/src/plugins/spdr/constants.js +17 -0
  44. package/src/plugins/spdr/constants.js.map +1 -0
  45. package/src/plugins/spdr/index.d.ts +6 -0
  46. package/src/plugins/spdr/index.js +12 -0
  47. package/src/plugins/spdr/index.js.map +1 -0
  48. package/src/plugins/spdr/stakingFetcher.d.ts +3 -0
  49. package/src/plugins/spdr/stakingFetcher.js +78 -0
  50. package/src/plugins/spdr/stakingFetcher.js.map +1 -0
  51. package/src/plugins/spdr/structs.d.ts +26 -0
  52. package/src/plugins/spdr/structs.js +26 -0
  53. package/src/plugins/spdr/structs.js.map +1 -0
  54. package/src/plugins/spdr/types.d.ts +21 -0
  55. package/src/plugins/spdr/types.js +3 -0
  56. package/src/plugins/spdr/types.js.map +1 -0
  57. package/src/plugins/sushiswap/helpers.js +24 -24
  58. package/src/plugins/tensor/index.js +0 -2
  59. package/src/plugins/tensor/index.js.map +1 -1
  60. package/src/plugins/uniswap-v2/helpers.js +22 -22
  61. package/src/plugins/zeta/airdropFetcher.js +14 -14
  62. package/src/utils/sei/constants.js +8 -8
  63. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  64. package/src/plugins/tensor/locksFetcher.js +0 -62
  65. package/src/plugins/tensor/locksFetcher.js.map +0 -1
  66. /package/src/plugins/{tensor/locksFetcher.d.ts → grass/stakingFetcher.d.ts} +0 -0
@@ -19,10 +19,6 @@ const clients_1 = require("../../utils/clients");
19
19
  const constants_3 = require("../sanctum/constants");
20
20
  const mints = [
21
21
  'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
22
- 'BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR', // Banx
23
- '4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs', // Parcl
24
- 'SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s', // Shark
25
- 'KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS', // Kamino
26
22
  'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
27
23
  'eqKJTf1Do4MDPyKisMYqVaUFpkEFAs3riGF3ceDH2Ca', // Wrapped USDC (Allbridge from Polygon)
28
24
  '8Yv9Jz4z7BUHP68dz8E8m3tMe6NKgpMUKn8KVqrPA6Fr', // Wrapped USDC (Allbridge from Avalanche)
@@ -1 +1 @@
1
- {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAEhF,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,OAAO;IACvD,8CAA8C,EAAE,QAAQ;IACxD,6CAA6C,EAAE,QAAQ;IACvD,6CAA6C,EAAE,SAAS;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,6BAA6B;IAC7E,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,+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QAAQ;YACR,EAAE,EAAE,aAAa;YACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,KAAK;YAClC,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,MAAM,EAAE,GAAG;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAEhF,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,6BAA6B;IAC7E,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,+BAA+B;IAC/E,8CAA8C,EAAE,iC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ACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,KAAK;YAClC,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,MAAM,EAAE,GAAG;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -138,14 +138,17 @@ function getOrcaNftFetcher(platformId, programId) {
138
138
  }
139
139
  if (!assetTokenA ||
140
140
  !assetTokenB ||
141
- assetTokenA.value === null ||
142
- assetTokenB.value === null)
141
+ (assetTokenA.value === null && assetTokenB.value === null))
143
142
  continue;
144
143
  const assets = !tokenAmountA.isZero() && !tokenAmountB.isZero()
145
144
  ? [assetTokenA, assetTokenB]
146
145
  : [];
147
- const value = assetTokenA.value + assetTokenB.value;
146
+ const assetsValue = (0, portfolio_core_1.getUsdValueSum)([
147
+ assetTokenA.value,
148
+ assetTokenB.value,
149
+ ]);
148
150
  const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
151
+ const totalValue = (0, portfolio_core_1.getUsdValueSum)([assetsValue, rewardAssetsValue]);
149
152
  if (assets.length === 0 && rewardAssets.length === 0)
150
153
  continue;
151
154
  elements.push({
@@ -154,15 +157,15 @@ function getOrcaNftFetcher(platformId, programId) {
154
157
  platformId,
155
158
  label: 'LiquidityPool',
156
159
  name: 'Concentrated',
157
- value: value + (rewardAssetsValue || 0),
160
+ value: totalValue,
158
161
  data: {
159
162
  liquidities: [
160
163
  {
161
164
  assets,
162
- assetsValue: value,
165
+ assetsValue,
163
166
  rewardAssets,
164
167
  rewardAssetsValue,
165
- value: value + (rewardAssetsValue || 0),
168
+ value: totalValue,
166
169
  yields: [],
167
170
  },
168
171
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,0BAAc,EACd,u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AAC,YAAY,CAAC,MAAM,EAAE;gBAC9C,CAAC,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC;gBAC5B,CAAC,CAAC,EAAE,CAAC;YAET,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC;YACpD,MAAM,iBAAiB,GAAG,IAAA,+BAAc,EACtC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACjC,CAAC;YAEF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAE/D,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;gBACvC,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM;4BACN,WAAW,EAAE,KAAK;4BAClB,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,KAAK,GAAG,CAAC,iBAAiB,IAAI,CAAC,CAAC;4BACvC,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AA5PD,8CA4PC"}
1
+ {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEz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+BAAc,EAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;YAEpE,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YAE/D,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM;4BACN,WAAW;4BACX,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,UAAU;4BACjB,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AA/PD,8CA+PC"}
@@ -0,0 +1,7 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { PublicKey } from '@solana/web3.js';
3
+ export declare const platformId = "spdr";
4
+ export declare const platform: Platform;
5
+ export declare const pid: PublicKey;
6
+ export declare const spdrMint = "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY";
7
+ export declare const pool: PublicKey;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.pool = exports.spdrMint = exports.pid = exports.platform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ exports.platformId = 'spdr';
6
+ exports.platform = {
7
+ id: exports.platformId,
8
+ name: 'Spiderswap',
9
+ image: 'https://sonar.watch/img/platforms/spdr.webp',
10
+ website: 'https://www.spiderswap.io/staking',
11
+ twitter: 'https://twitter.com/spdrswap',
12
+ // defiLlamaId: 'spdr-finance', // from https://defillama.com/docs/api
13
+ };
14
+ exports.pid = new web3_js_1.PublicKey('GTavkffQHnDKDH36YNFpk7uxwHNseTRo24tV4HGC8MNY');
15
+ exports.spdrMint = 'AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY';
16
+ exports.pool = new web3_js_1.PublicKey('2hJQSpUvDy2Byhs2Mc3HAy7atKHHELfYfycbZBErpn1X');
17
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAE,8BAA8B;IACvC,sEAAsE;CACvE,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,IAAI,GAAG,IAAI,mBAAS,CAC/B,8CAA8C,CAC/C,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 stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
9
+ exports.platforms = [constants_1.platform];
10
+ exports.jobs = [];
11
+ exports.fetchers = [stakingFetcher_1.default];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAAsD;AAEzC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAsB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,78 @@
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 ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
18
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const connection = (0, clients_1.getClientSolana)();
20
+ const [stakeAccounts, stakeLockAccounts] = yield Promise.all([
21
+ (0, solana_1.getParsedProgramAccounts)(connection, structs_1.stakeStruct, constants_1.pid, [
22
+ {
23
+ dataSize: 233,
24
+ },
25
+ {
26
+ memcmp: {
27
+ bytes: owner,
28
+ offset: 8,
29
+ },
30
+ },
31
+ ]),
32
+ (0, solana_1.getParsedProgramAccounts)(connection, structs_1.stakeLockedStruct, constants_1.pid, [
33
+ {
34
+ dataSize: 429,
35
+ },
36
+ {
37
+ memcmp: {
38
+ bytes: owner,
39
+ offset: 8,
40
+ },
41
+ },
42
+ ]),
43
+ ]);
44
+ if ([...stakeAccounts, ...stakeLockAccounts].length === 0)
45
+ return [];
46
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
47
+ const element = elementRegistry.addElementMultiple({
48
+ label: 'Staked',
49
+ });
50
+ stakeAccounts.forEach((acc) => {
51
+ element.addAsset({
52
+ address: constants_1.spdrMint,
53
+ amount: acc.depositAmount.minus(acc.multiplierAmount),
54
+ });
55
+ });
56
+ stakeLockAccounts.forEach((acc) => {
57
+ acc.stakeLock.forEach((stakeLock) => {
58
+ element.addAsset({
59
+ address: constants_1.spdrMint,
60
+ amount: stakeLock.depositAmount,
61
+ attributes: {
62
+ lockedUntil: stakeLock.startTime
63
+ .plus(stakeLock.servingPeriod)
64
+ .times(1000)
65
+ .toNumber(),
66
+ },
67
+ });
68
+ });
69
+ });
70
+ return elementRegistry.getElements(cache);
71
+ });
72
+ const fetcher = {
73
+ id: `${constants_1.platformId}-staking`,
74
+ networkId: portfolio_core_1.NetworkId.solana,
75
+ executor,
76
+ };
77
+ exports.default = fetcher;
78
+ //# sourceMappingURL=stakingFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAAwD;AAExD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAA2D;AAC3D,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAA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M,EAAE,SAAS,CAAC,aAAa;gBAC/B,UAAU,EAAE;oBACV,WAAW,EAAE,SAAS,CAAC,SAAS;yBAC7B,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC;yBAC7B,KAAK,CAAC,IAAI,CAAC;yBACX,QAAQ,EAAE;iBACd;aACF,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,26 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export type Stake = {
6
+ buffer: Buffer;
7
+ authority: PublicKey;
8
+ depositAmount: BigNumber;
9
+ reward: BigNumber;
10
+ rewardDebt: BigNumber;
11
+ bump: Buffer;
12
+ multiplierAmount: BigNumber;
13
+ };
14
+ export declare const stakeStruct: BeetStruct<Stake, Partial<Stake>>;
15
+ export type StakeLock = {
16
+ depositAmount: BigNumber;
17
+ servingPeriod: BigNumber;
18
+ startTime: BigNumber;
19
+ };
20
+ export declare const stakeLockStruct: BeetStruct<StakeLock, Partial<StakeLock>>;
21
+ export type StakeLocked = {
22
+ buffer: Buffer;
23
+ authority: PublicKey;
24
+ stakeLock: StakeLock[];
25
+ };
26
+ export declare const stakeLockedStruct: FixableBeetStruct<StakeLocked, Partial<StakeLocked>>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stakeLockedStruct = exports.stakeLockStruct = exports.stakeStruct = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ exports.stakeStruct = new beet_1.BeetStruct([
8
+ ['buffer', (0, solana_1.blob)(8)],
9
+ ['authority', beet_solana_1.publicKey],
10
+ ['depositAmount', solana_1.u128],
11
+ ['reward', solana_1.u128],
12
+ ['rewardDebt', solana_1.u128],
13
+ ['bump', (0, solana_1.blob)(1)],
14
+ ['multiplierAmount', solana_1.u128],
15
+ ], (args) => args);
16
+ exports.stakeLockStruct = new beet_1.BeetStruct([
17
+ ['depositAmount', solana_1.u128],
18
+ ['servingPeriod', solana_1.i64],
19
+ ['startTime', solana_1.i64],
20
+ ], (args) => args);
21
+ exports.stakeLockedStruct = new beet_1.FixableBeetStruct([
22
+ ['buffer', (0, solana_1.blob)(8)],
23
+ ['authority', beet_solana_1.publicKey],
24
+ ['stakeLock', (0, beet_1.array)(exports.stakeLockStruct)],
25
+ ], (args) => args);
26
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAAqD;AAYxC,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,QAAQ,EAAE,aAAI,CAAC;IAChB,CAAC,YAAY,EAAE,aAAI,CAAC;IACpB,CAAC,MAAM,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACjB,CAAC,kBAAkB,EAAE,aAAI,CAAC;CAC3B,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,CAAC;AAQW,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,WAAW,EAAE,YAAG,CAAC;CACnB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC;AAQW,QAAA,iBAAiB,GAAG,IAAI,wBAAiB,CACpD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,WAAW,EAAE,IAAA,YAAK,EAAC,uBAAe,CAAC,CAAC;CACtC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /// <reference types="node" />
2
+ import { ID } from '../../utils/sui/structs/id';
3
+ export type Receipt = {
4
+ id: ID;
5
+ amountDeposited: string;
6
+ };
7
+ export type Pool = {
8
+ publickey: string;
9
+ buffer: Buffer;
10
+ authority: string;
11
+ poolMint: string;
12
+ poolTokenAccount: string;
13
+ rewardMint: string;
14
+ rewardTokenAccount: string;
15
+ rewardPerSecond: string;
16
+ startTime: string;
17
+ lastRewardTime: string;
18
+ accPerShare: string;
19
+ supply: string;
20
+ bump: number;
21
+ };
@@ -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/spdr/types.ts"],"names":[],"mappings":""}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -6,13 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const bidsFetcher_1 = __importDefault(require("./bidsFetcher"));
9
- const locksFetcher_1 = __importDefault(require("./locksFetcher"));
10
9
  const airdropPowerUsersFetcher_1 = __importDefault(require("./airdropPowerUsersFetcher"));
11
10
  const sharedEscrowFetcher_1 = __importDefault(require("./sharedEscrowFetcher"));
12
11
  exports.platforms = [constants_1.platform];
13
12
  exports.fetchers = [
14
13
  bidsFetcher_1.default,
15
- locksFetcher_1.default,
16
14
  airdropPowerUsersFetcher_1.default,
17
15
  sharedEscrowFetcher_1.default,
18
16
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,gEAAwC;AACxC,kEAA0C;AAC1C,0FAAiE;AACjE,gFAAwD;AAE3C,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc;IACjC,qBAAW;IACX,sBAAY;IACZ,kCAAuB;IACvB,6BAAmB;CACpB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,gEAAwC;AACxC,0FAAiE;AACjE,gFAAwD;AAE3C,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc;IACjC,qBAAW;IACX,kCAAuB;IACvB,6BAAmB;CACpB,CAAC"}
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -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;
@@ -1,62 +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
- 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 constants_1 = require("./constants");
17
- const clients_1 = require("../../utils/clients");
18
- const solana_1 = require("../../utils/solana");
19
- const struct_1 = require("./struct");
20
- const filters_1 = require("./filters");
21
- const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
- const getTokensPricesMap_1 = __importDefault(require("../../utils/misc/getTokensPricesMap"));
23
- const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
- const client = (0, clients_1.getClientSolana)();
25
- const locksAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.orderStateLockStruct, constants_1.locksPid, (0, filters_1.locksFilter)(owner));
26
- const tokenPricesById = yield (0, getTokensPricesMap_1.default)([portfolio_core_1.solanaNativeAddress, solana_1.usdcSolanaMint], portfolio_core_1.NetworkId.solana, cache);
27
- let solAmount = 0;
28
- let usdcAmount = 0;
29
- const assets = [];
30
- for (const account of locksAccounts) {
31
- if (account.currency.toString() !== solana_1.usdcSolanaMint) {
32
- solAmount += account.price.dividedBy(Math.pow(10, 9)).toNumber();
33
- }
34
- else {
35
- usdcAmount += account.price.dividedBy(Math.pow(10, 6)).toNumber();
36
- }
37
- }
38
- if (usdcAmount)
39
- assets.push((0, tokenPriceToAssetToken_1.default)(solana_1.usdcSolanaMint, usdcAmount, portfolio_core_1.NetworkId.solana, tokenPricesById.get(solana_1.usdcSolanaMint)));
40
- if (solAmount)
41
- assets.push((0, tokenPriceToAssetToken_1.default)(portfolio_core_1.solanaNativeAddress, solAmount, portfolio_core_1.NetworkId.solana, tokenPricesById.get(portfolio_core_1.solanaNativeAddress)));
42
- if (assets.length === 0)
43
- return [];
44
- return [
45
- {
46
- networkId: portfolio_core_1.NetworkId.solana,
47
- platformId: constants_1.platformId,
48
- type: portfolio_core_1.PortfolioElementType.multiple,
49
- label: 'Deposit',
50
- name: 'Locks',
51
- data: { assets },
52
- value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
53
- },
54
- ];
55
- });
56
- const fetcher = {
57
- id: `${constants_1.platformId}-locks`,
58
- networkId: portfolio_core_1.NetworkId.solana,
59
- executor,
60
- };
61
- exports.default = fetcher;
62
- //# sourceMappingURL=locksFetcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"locksFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/locksFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,2CAAmD;AACnD,iDAAsD;AACtD,+CAA8E;AAC9E,qCAAgD;AAChD,uCAAwC;AACxC,qGAA6E;AAC7E,6FAAoE;AAEpE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,6BAAoB,EACpB,oBAAQ,EACR,IAAA,qBAAW,EAAC,KAAK,CAAC,CACnB,CAAC;IAEF,MAAM,eAAe,GAAG,MAAM,IAAA,4BAAiB,EAC7C,CAAC,oCAAmB,EAAE,uBAAc,CAAC,EACrC,0BAAS,CAAC,MAAM,EA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