@sonarwatch/portfolio-plugins 0.11.177 → 0.11.178

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/CHANGELOG.md +1439 -1435
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +4 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/flexlend/helpers.d.ts +1 -0
  8. package/src/plugins/flexlend/helpers.js +6 -1
  9. package/src/plugins/flexlend/helpers.js.map +1 -1
  10. package/src/plugins/flexlend/index.js +2 -1
  11. package/src/plugins/flexlend/index.js.map +1 -1
  12. package/src/plugins/flexlend/liftFetcher.d.ts +3 -0
  13. package/src/plugins/flexlend/liftFetcher.js +67 -0
  14. package/src/plugins/flexlend/liftFetcher.js.map +1 -0
  15. package/src/plugins/flexlend/struct.d.ts +14 -2
  16. package/src/plugins/flexlend/struct.js +16 -3
  17. package/src/plugins/flexlend/struct.js.map +1 -1
  18. package/src/plugins/jito/airdropFetcher.d.ts +3 -0
  19. package/src/plugins/jito/airdropFetcher.js +67 -0
  20. package/src/plugins/jito/airdropFetcher.js.map +1 -0
  21. package/src/plugins/jito/constants.d.ts +8 -0
  22. package/src/plugins/jito/constants.js +18 -0
  23. package/src/plugins/jito/constants.js.map +1 -0
  24. package/src/plugins/jito/index.d.ts +6 -0
  25. package/src/plugins/jito/index.js +12 -0
  26. package/src/plugins/jito/index.js.map +1 -0
  27. package/src/plugins/jito/structs.d.ts +12 -0
  28. package/src/plugins/jito/structs.js +14 -0
  29. package/src/plugins/jito/structs.js.map +1 -0
  30. package/src/plugins/jito/types.d.ts +11 -0
  31. package/src/plugins/jito/types.js +3 -0
  32. package/src/plugins/jito/types.js.map +1 -0
  33. package/src/plugins/native-stake/solana/solanaFetcher.js +23 -1
  34. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  35. package/src/plugins/sushiswap/helpers.js +24 -24
  36. package/src/plugins/uniswap-v2/helpers.js +22 -22
  37. package/src/utils/sei/constants.js +8 -8
  38. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
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.177",
3
+ "version": "0.11.178",
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.174"
44
+ "@sonarwatch/portfolio-core": "0.11.175"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/index.js CHANGED
@@ -103,6 +103,7 @@ const uxd_1 = require("./plugins/uxd");
103
103
  const wormhole_1 = require("./plugins/wormhole");
104
104
  const banx_1 = require("./plugins/banx");
105
105
  const nosana_1 = require("./plugins/nosana");
106
+ const jito_1 = require("./plugins/jito");
106
107
  var constants_1 = require("./plugins/tokens/constants");
107
108
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
108
109
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -199,6 +200,7 @@ exports.platforms = [
199
200
  ...wormhole_1.platforms,
200
201
  ...banx_1.platforms,
201
202
  ...nosana_1.platforms,
203
+ ...jito_1.platforms,
202
204
  ];
203
205
  // JOBS //
204
206
  exports.jobs = [
@@ -278,6 +280,7 @@ exports.jobs = [
278
280
  ...wormhole_1.jobs,
279
281
  ...banx_1.jobs,
280
282
  ...nosana_1.jobs,
283
+ ...jito_1.jobs,
281
284
  ];
282
285
  // FETCHERS //
283
286
  exports.fetchers = [
@@ -359,6 +362,7 @@ exports.fetchers = [
359
362
  ...wormhole_1.fetchers,
360
363
  ...banx_1.fetchers,
361
364
  ...nosana_1.fetchers,
365
+ ...jito_1.fetchers,
362
366
  ];
363
367
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
364
368
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,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,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,yCAIwB;AACxB,iDAI4B;AAC5B,yC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BAAsB;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;CAClB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,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,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI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AAG,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;CAChB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,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;
@@ -1 +1,2 @@
1
1
  export declare function getDerivedAccount(owner: string): string;
2
+ export declare function isLiftEmpty(authoritySeed: number[]): boolean;
@@ -1,10 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDerivedAccount = void 0;
3
+ exports.isLiftEmpty = exports.getDerivedAccount = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const constants_1 = require("./constants");
6
6
  function getDerivedAccount(owner) {
7
7
  return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('flexlend', 'utf8'), new web3_js_1.PublicKey(owner).toBuffer()], constants_1.flexProgramId)[0].toString();
8
8
  }
9
9
  exports.getDerivedAccount = getDerivedAccount;
10
+ function isLiftEmpty(authoritySeed) {
11
+ return (authoritySeed.toString() ===
12
+ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0].toString());
13
+ }
14
+ exports.isLiftEmpty = isLiftEmpty;
10
15
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA4C;AAE5C,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EAClE,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClB,CAAC;AALD,8CAKC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA4C;AAE5C,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EAClE,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClB,CAAC;AALD,8CAKC;AAED,SAAgB,WAAW,CAAC,aAAuB;IACjD,OAAO,CACL,aAAa,CAAC,QAAQ,EAAE;QACxB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CACrE,CAAC;AACJ,CAAC;AALD,kCAKC"}
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
8
+ const liftFetcher_1 = __importDefault(require("./liftFetcher"));
8
9
  const constants_1 = require("./constants");
9
10
  exports.platforms = [constants_1.flexlendPlatform];
10
11
  exports.jobs = [];
11
- exports.fetchers = [depositsFetcher_1.default];
12
+ exports.fetchers = [depositsFetcher_1.default, liftFetcher_1.default];
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,2CAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC;AAC3C,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,gEAAwC;AACxC,2CAA+C;AAElC,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC;AAC3C,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,EAAE,qBAAW,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,67 @@
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 web3_js_1 = require("@solana/web3.js");
17
+ const constants_1 = require("./constants");
18
+ const helpers_1 = require("./helpers");
19
+ const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
20
+ const clients_1 = require("../../utils/clients");
21
+ const struct_1 = require("./struct");
22
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
23
+ const solana_1 = require("../../utils/solana");
24
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
+ const client = (0, clients_1.getClientSolana)();
26
+ const flexUserPda = (0, helpers_1.getDerivedAccount)(owner);
27
+ const flexUser = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, struct_1.userAccountStruct, new web3_js_1.PublicKey(flexUserPda));
28
+ if (!flexUser)
29
+ return [];
30
+ const validAuthoritySeed = flexUser.promotionSeeds.find((s) => !(0, helpers_1.isLiftEmpty)(s.authoritySeed));
31
+ if (!validAuthoritySeed)
32
+ return [];
33
+ const seedValue = Buffer.from(validAuthoritySeed.authoritySeed).toString('utf8');
34
+ const authorityAddress = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('promotion_authority'), Buffer.from(seedValue.toString())], constants_1.flexProgramId)[0];
35
+ const promotionAuthority = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, struct_1.promotionAuthorityStruct, authorityAddress);
36
+ if (!promotionAuthority)
37
+ return [];
38
+ if (promotionAuthority.totalDeposits.isZero())
39
+ return [];
40
+ const tokenPrices = yield cache.getTokenPricesAsMap([solana_1.usdcSolanaMint], portfolio_core_1.NetworkId.solana);
41
+ const tokenPrice = tokenPrices.get(promotionAuthority.mintAddress.toString());
42
+ if (!tokenPrice)
43
+ return [];
44
+ const amount = promotionAuthority.totalDeposits
45
+ .div(Math.pow(10, tokenPrice.decimals))
46
+ .toNumber();
47
+ const asset = (0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, portfolio_core_1.NetworkId.solana, tokenPrice);
48
+ const element = {
49
+ networkId: portfolio_core_1.NetworkId.solana,
50
+ type: portfolio_core_1.PortfolioElementType.multiple,
51
+ label: 'Deposit',
52
+ platformId: constants_1.platformId,
53
+ value: asset.value,
54
+ data: {
55
+ assets: [asset],
56
+ },
57
+ name: 'Points Lift',
58
+ };
59
+ return [element];
60
+ });
61
+ const fetcher = {
62
+ id: `${constants_1.platformId}-lift`,
63
+ networkId: portfolio_core_1.NetworkId.solana,
64
+ executor,
65
+ };
66
+ exports.default = fetcher;
67
+ //# sourceMappingURL=liftFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"liftFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/liftFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2CAAwD;AACxD,uCAA2D;AAC3D,kFAA+E;AAC/E,iDAAsD;AACtD,qCAAuE;AACvE,qGAA6E;AAC7E,+CAAoD;AAEpD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,WAAW,GAAG,IAAA,2BAAiB,EAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAM,IAAA,2CAAoB,EACzC,MAAM,EACN,0BAAiB,EACjB,IAAI,mBAAS,CAAC,WAAW,CAAC,CAC3B,CAAC;IACF,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,QAAQ,CAAC,cAAc,CAAC,IAAI,CACrD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAA,qBAAW,EAAC,CAAC,CAAC,aAAa,CAAC,CACrC,CAAC;IACF,IAAI,CAAC,kBAAkB;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,QAAQ,CACtE,MAAM,CACP,CAAC;IAEF,MAAM,gBAAgB,GAAG,mBAAS,CAAC,sBAAsB,CACvD,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,EACvE,yBAAa,CACd,CAAC,CAAC,CAAC,CA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AO,CAAC"}
@@ -3,7 +3,8 @@ import { BeetStruct } from '@metaplex-foundation/beet';
3
3
  import { PublicKey } from '@metaplex-foundation/js';
4
4
  import BigNumber from 'bignumber.js';
5
5
  export type PromotionSeed = {
6
- bump: BigNumber;
6
+ authoritySeed: number[];
7
+ padding: number[];
7
8
  };
8
9
  export type UserAccount = {
9
10
  buffer: Buffer;
@@ -12,7 +13,18 @@ export type UserAccount = {
12
13
  owner: PublicKey;
13
14
  mfi_account: PublicKey;
14
15
  solend_obligation: PublicKey;
15
- promotion_seeds: PromotionSeed[];
16
+ promotionSeeds: PromotionSeed[];
16
17
  _padding2: BigNumber[];
17
18
  };
18
19
  export declare const userAccountStruct: BeetStruct<UserAccount, Partial<UserAccount>>;
20
+ export type PromotionAuthority = {
21
+ buffer: Buffer;
22
+ bump: number;
23
+ authoritySeed: number[];
24
+ padding1: PublicKey;
25
+ mintAddress: PublicKey;
26
+ userAccount: PublicKey;
27
+ totalDeposits: BigNumber;
28
+ padding2: BigNumber[];
29
+ };
30
+ export declare const promotionAuthorityStruct: BeetStruct<PromotionAuthority, Partial<PromotionAuthority>>;
@@ -1,10 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userAccountStruct = void 0;
3
+ exports.promotionAuthorityStruct = exports.userAccountStruct = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../utils/solana");
7
- const promotionSeedStruct = new beet_1.BeetStruct([['bump', solana_1.u64]], (args) => args);
7
+ const promotionSeedStruct = new beet_1.BeetStruct([
8
+ ['authoritySeed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 19)],
9
+ ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 13)],
10
+ ], (args) => args);
8
11
  exports.userAccountStruct = new beet_1.BeetStruct([
9
12
  ['buffer', (0, solana_1.blob)(8)],
10
13
  ['bump', beet_1.u8],
@@ -12,7 +15,17 @@ exports.userAccountStruct = new beet_1.BeetStruct([
12
15
  ['owner', beet_solana_1.publicKey],
13
16
  ['mfi_account', beet_solana_1.publicKey],
14
17
  ['solend_obligation', beet_solana_1.publicKey],
15
- ['promotion_seeds', (0, beet_1.uniformFixedSizeArray)(promotionSeedStruct, 4)],
18
+ ['promotionSeeds', (0, beet_1.uniformFixedSizeArray)(promotionSeedStruct, 4)],
16
19
  ['_padding2', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 12)],
17
20
  ], (args) => args);
21
+ exports.promotionAuthorityStruct = new beet_1.BeetStruct([
22
+ ['buffer', (0, solana_1.blob)(8)],
23
+ ['bump', beet_1.u8],
24
+ ['authoritySeed', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 19)],
25
+ ['padding1', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 12)],
26
+ ['mintAddress', beet_solana_1.publicKey],
27
+ ['userAccount', beet_solana_1.publicKey],
28
+ ['totalDeposits', solana_1.u64],
29
+ ['padding2', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 8)],
30
+ ], (args) => args);
18
31
  //# sourceMappingURL=struct.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/struct.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA+C;AAM/C,MAAM,mBAAmB,GAAG,IAAI,iBAAU,CACxC,CAAC,CAAC,MAAM,EAAE,YAAG,CAAC,CAAC,EACf,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AAaW,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,C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CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC;AAaW,QAAA,wBAAwB,GAAG,IAAI,iBAAU,CACpD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,eAAe,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAChD,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC3C,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,YAAG,EAAE,CAAC,CAAC,CAAC;CAC5C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,67 @@
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 axios_1 = __importDefault(require("axios"));
18
+ const constants_1 = require("./constants");
19
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
20
+ const jtoFactor = new bignumber_js_1.default(Math.pow(10, constants_1.jtoDecimals));
21
+ const endOfVesting = 1733529600000; // December 07 2024
22
+ const endOfClaim = 1749254400000; // June 07 2025
23
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ if (Date.now() > endOfClaim)
25
+ return [];
26
+ const [res, tokenPrice] = yield Promise.all([
27
+ axios_1.default.get(constants_1.airdropUrl + owner, { timeout: 1000 }).catch(() => null),
28
+ cache.getTokenPrice(constants_1.jtoMint, portfolio_core_1.NetworkId.solana),
29
+ ]);
30
+ if (!res)
31
+ return [];
32
+ const claimStatus = res.data;
33
+ const avaibleToClaim = new bignumber_js_1.default(claimStatus.amount_locked_withdrawable).dividedBy(jtoFactor);
34
+ const vestedAmountLeft = new bignumber_js_1.default(claimStatus.total_locked_searcher)
35
+ .plus(claimStatus.total_locked_staker)
36
+ .plus(claimStatus.total_locked_validator)
37
+ .minus(claimStatus.amount_locked_withdrawn)
38
+ .dividedBy(jtoFactor)
39
+ .minus(avaibleToClaim);
40
+ const assets = [];
41
+ if (!vestedAmountLeft.isZero())
42
+ assets.push((0, tokenPriceToAssetToken_1.default)(constants_1.jtoMint, vestedAmountLeft.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { lockedUntil: endOfVesting }));
43
+ if (!avaibleToClaim.isZero())
44
+ assets.push((0, tokenPriceToAssetToken_1.default)(constants_1.jtoMint, avaibleToClaim.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { isClaimable: true }));
45
+ if (assets.length === 0)
46
+ return [];
47
+ return [
48
+ {
49
+ type: portfolio_core_1.PortfolioElementType.multiple,
50
+ label: 'Rewards',
51
+ networkId: portfolio_core_1.NetworkId.solana,
52
+ platformId: constants_1.platformId,
53
+ name: 'Airdrop',
54
+ data: {
55
+ assets,
56
+ },
57
+ value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
58
+ },
59
+ ];
60
+ });
61
+ const fetcher = {
62
+ id: `${constants_1.platformId}-airdrop`,
63
+ networkId: portfolio_core_1.NetworkId.solana,
64
+ executor,
65
+ };
66
+ exports.default = fetcher;
67
+ //# sourceMappingURL=airdropFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AACrC,kDAA0B;AAG1B,2CAA2E;AAC3E,qGAA6E;AAG7E,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,uBAAW,CAAA,CAAC,CAAC;AACnD,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,mBAAmB;AACvD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,eAAe;AACjD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU;QAAE,OAAO,EAAE,CAAC;IAEvC,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,eAAK,CAAC,GAAG,CAAC,sBAAU,GAAG,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QAClE,KAAK,CAAC,aAAa,CAAC,mBAAO,EAAE,0BAAS,CAAC,MAAM,CAAC;KAC/C,CAAC,CAAC;IAEH,IAAI,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC;IAEpB,MAAM,WAAW,GAAG,GAAG,CAAC,IAAmB,CAAC;IAE5C,MAAM,cAAc,GAAG,IAAI,sBAAS,CAClC,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SAC1D;KACF,CAAC;AACJ,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,8 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ export declare const platformId = "jito";
3
+ export declare const jitoPlatform: Platform;
4
+ export declare const merkleTree = "HS8EQ8QkQSBJggY8r255AKdWbtYRtyNMoRt4LjNkkWm1";
5
+ export declare const merkleDistributor = "mERKcfxMC5SqJn4Ld4BUris3WKZZ1ojjWJ3A3J5CKxv";
6
+ export declare const jtoMint = "jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL";
7
+ export declare const jtoDecimals = 9;
8
+ export declare const airdropUrl = "https://airdrop.jito.network/status/";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.airdropUrl = exports.jtoDecimals = exports.jtoMint = exports.merkleDistributor = exports.merkleTree = exports.jitoPlatform = exports.platformId = void 0;
4
+ exports.platformId = 'jito';
5
+ exports.jitoPlatform = {
6
+ id: exports.platformId,
7
+ name: 'Jito',
8
+ image: 'https://sonar.watch/img/platforms/jito.png',
9
+ defiLlamaId: 'jito',
10
+ website: 'https://jito.network/',
11
+ twitter: 'https://twitter.com/jito_sol',
12
+ };
13
+ exports.merkleTree = 'HS8EQ8QkQSBJggY8r255AKdWbtYRtyNMoRt4LjNkkWm1';
14
+ exports.merkleDistributor = 'mERKcfxMC5SqJn4Ld4BUris3WKZZ1ojjWJ3A3J5CKxv';
15
+ exports.jtoMint = 'jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL';
16
+ exports.jtoDecimals = 9;
17
+ exports.airdropUrl = 'https://airdrop.jito.network/status/';
18
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,YAAY,GAAa;IACpC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,iBAAiB,GAAG,6CAA6C,CAAC;AAClE,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,UAAU,GAAG,sCAAsC,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 airdropFetcher_1 = __importDefault(require("./airdropFetcher"));
9
+ exports.platforms = [constants_1.jitoPlatform];
10
+ exports.jobs = [];
11
+ exports.fetchers = [airdropFetcher_1.default];
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA2C;AAC3C,sEAA6C;AAEhC,QAAA,SAAS,GAAe,CAAC,wBAAY,CAAC,CAAC;AACvC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAa,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@metaplex-foundation/js';
4
+ import BigNumber from 'bignumber.js';
5
+ export type ClaimStatus = {
6
+ buffer: Buffer;
7
+ claimant: PublicKey;
8
+ lockedAmount: BigNumber;
9
+ lockedAmountWithdrawn: BigNumber;
10
+ unlockedAmount: BigNumber;
11
+ };
12
+ export declare const claimStatusStruct: BeetStruct<ClaimStatus, Partial<ClaimStatus>>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.claimStatusStruct = 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.claimStatusStruct = new beet_1.BeetStruct([
8
+ ['buffer', (0, solana_1.blob)(8)],
9
+ ['claimant', beet_solana_1.publicKey],
10
+ ['lockedAmount', solana_1.u64],
11
+ ['lockedAmountWithdrawn', solana_1.u64],
12
+ ['unlockedAmount', solana_1.u64],
13
+ ], (args) => args);
14
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/structs.ts"],"names":[],"mappings":";;;AAAA,oDAAuD;AAGvD,kEAA6D;AAC7D,+CAA+C;AAUlC,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,UAAU,EAAE,uBAAS,CAAC;IACvB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,uBAAuB,EAAE,YAAG,CAAC;IAC9B,CAAC,gBAAgB,EAAE,YAAG,CAAC;CACxB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type ClaimStatus = {
2
+ status: string;
3
+ total_unlocked_staker: number;
4
+ total_locked_staker: number;
5
+ total_unlocked_searcher: number;
6
+ total_locked_searcher: number;
7
+ total_unlocked_validator: number;
8
+ total_locked_validator: number;
9
+ amount_locked_withdrawable: number;
10
+ amount_locked_withdrawn: number;
11
+ };
@@ -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/jito/types.ts"],"names":[],"mappings":""}
@@ -22,6 +22,7 @@ const structs_1 = require("./structs");
22
22
  const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
23
23
  const constants_2 = require("../../marinade/constants");
24
24
  const constants_3 = require("./constants");
25
+ const constants_4 = require("../../jito/constants");
25
26
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
26
27
  const client = (0, clients_1.getClientSolana)();
27
28
  const filters = (0, filters_1.stakeAccountsFilter)(owner.toString());
@@ -37,10 +38,16 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
37
38
  let marinadeSolAmount = 0;
38
39
  let solAmount = 0;
39
40
  let nMarinadeAccounts = 0;
41
+ let mevRewards = 0;
40
42
  let nativeAssets = [];
41
43
  for (let i = 0; i < stakeAccounts.length; i += 1) {
42
44
  const stakeAccount = stakeAccounts[i];
43
- const amount = new bignumber_js_1.default(stakeAccount.lamports)
45
+ mevRewards += new bignumber_js_1.default(stakeAccount.lamports)
46
+ .minus(stakeAccount.rentExemptReserve)
47
+ .minus(stakeAccount.stake)
48
+ .dividedBy(Math.pow(10, 9))
49
+ .toNumber();
50
+ const amount = new bignumber_js_1.default(stakeAccount.stake)
44
51
  .minus(stakeAccount.rentExemptReserve)
45
52
  .dividedBy(new bignumber_js_1.default(Math.pow(10, 9)))
46
53
  .toNumber();
@@ -111,6 +118,21 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
111
118
  },
112
119
  });
113
120
  }
121
+ if (mevRewards > 0) {
122
+ elements.push({
123
+ networkId: portfolio_core_1.NetworkId.solana,
124
+ platformId: constants_4.jitoPlatform.id,
125
+ type: 'multiple',
126
+ label: 'Rewards',
127
+ name: `MEV Rewards`,
128
+ value: solTokenPrice ? mevRewards * solTokenPrice.price : null,
129
+ data: {
130
+ assets: [
131
+ Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(portfolio_core_1.solanaNetwork.native.address, mevRewards, portfolio_core_1.NetworkId.solana, solTokenPrice)), { attributes: { isClaimable: true } }),
132
+ ],
133
+ },
134
+ });
135
+ }
114
136
  return elements;
115
137
  });
116
138
  const fetcher = {
@@ -1 +1 @@
1
- {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA+D;AAC/D,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4D;AAC5D,2CAIqB;AAErB,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,6BAAmB,EAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,4BAAkB,EAClB,0BAAc,EACd,OAAO,CACR,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,aAAa,GAAG,MA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AM;YAC3B,UAAU,EAAE,+BAAmB,CAAC,EAAE;YAClC,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,IAAA,+BAAc,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACvD,IAAI,EAAE;gBACJ,MAAM,EAAE,YAAY;aACrB;SACF,CAAC,CAAC;IACL,CAAC;IACD,IAAI,iBAAiB,KAAK,CAAC,EAAE,CAAC;QAC5B,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAE,4BAAgB,CAAC,EAAE;YAC/B,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,WAAW,iBAAiB,cAAc;YAChD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,iBAAiB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;YACrE,IAAI,EAAE;gBACJ,MAAM,EAAE;oDAED,IAAA,gCAAsB,EACvB,8BAAa,CAAC,MAAM,CAAC,OAAO,EAC5B,iBAAiB,EACjB,0BAAS,CAAC,MAAM,EAChB,aAAa,CACd,KACD,UAAU,EAAE,EAAE;iBAEjB;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA+D;AAC/D,oDAAyD;AACzD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