@sonarwatch/portfolio-plugins 0.11.110 → 0.11.112

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/CHANGELOG.md +1175 -1163
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +5 -4
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/aurory/stakingFetcher.js +2 -3
  7. package/src/plugins/aurory/stakingFetcher.js.map +1 -1
  8. package/src/plugins/balancer/helpers/pools.js +21 -21
  9. package/src/plugins/flash/poolJob.js +14 -68
  10. package/src/plugins/flash/poolJob.js.map +1 -1
  11. package/src/plugins/hawksight/positionsFetcher.js +10 -8
  12. package/src/plugins/hawksight/positionsFetcher.js.map +1 -1
  13. package/src/plugins/jupiter/constants.d.ts +2 -0
  14. package/src/plugins/jupiter/constants.js +8 -1
  15. package/src/plugins/jupiter/constants.js.map +1 -1
  16. package/src/plugins/jupiter/index.d.ts +2 -0
  17. package/src/plugins/jupiter/index.js +3 -1
  18. package/src/plugins/jupiter/index.js.map +1 -1
  19. package/src/plugins/jupiter/poolJob.js +3 -5
  20. package/src/plugins/jupiter/poolJob.js.map +1 -1
  21. package/src/plugins/orders/index.js +2 -7
  22. package/src/plugins/orders/index.js.map +1 -1
  23. package/src/plugins/orders/jupiter/constants.d.ts +0 -2
  24. package/src/plugins/orders/jupiter/constants.js +1 -8
  25. package/src/plugins/orders/jupiter/constants.js.map +1 -1
  26. package/src/plugins/orders/jupiter/dcaFetcher.js +2 -1
  27. package/src/plugins/orders/jupiter/dcaFetcher.js.map +1 -1
  28. package/src/plugins/orders/jupiter/limitFetcher.js +2 -1
  29. package/src/plugins/orders/jupiter/limitFetcher.js.map +1 -1
  30. package/src/plugins/spl-staking/constants.d.ts +15 -0
  31. package/src/plugins/spl-staking/constants.js +51 -0
  32. package/src/plugins/spl-staking/constants.js.map +1 -0
  33. package/src/plugins/spl-staking/filters.js.map +1 -0
  34. package/src/plugins/{flowmatic → spl-staking}/index.js +3 -2
  35. package/src/plugins/spl-staking/index.js.map +1 -0
  36. package/src/plugins/spl-staking/poolsJob.d.ts +3 -0
  37. package/src/plugins/spl-staking/poolsJob.js +39 -0
  38. package/src/plugins/spl-staking/poolsJob.js.map +1 -0
  39. package/src/plugins/spl-staking/stakingFetcher.js +83 -0
  40. package/src/plugins/spl-staking/stakingFetcher.js.map +1 -0
  41. package/src/plugins/spl-staking/structs.d.ts +42 -0
  42. package/src/plugins/spl-staking/structs.js +42 -0
  43. package/src/plugins/spl-staking/structs.js.map +1 -0
  44. package/src/plugins/spl-staking/types.d.ts +4 -0
  45. package/src/plugins/spl-staking/types.js +3 -0
  46. package/src/plugins/spl-staking/types.js.map +1 -0
  47. package/src/plugins/sushiswap/helpers.js +24 -24
  48. package/src/plugins/tensor/bidsFetcher.js +2 -0
  49. package/src/plugins/tensor/bidsFetcher.js.map +1 -1
  50. package/src/plugins/tensor/singleListingFetcher.js +0 -79
  51. package/src/plugins/tensor/singleListingFetcher.js.map +1 -1
  52. package/src/plugins/uniswap-v2/helpers.js +22 -22
  53. package/src/plugins/x-staking-solana/constants.js +9 -0
  54. package/src/plugins/x-staking-solana/constants.js.map +1 -1
  55. package/src/utils/sei/constants.js +8 -8
  56. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  57. package/src/plugins/flowmatic/constants.d.ts +0 -6
  58. package/src/plugins/flowmatic/constants.js +0 -16
  59. package/src/plugins/flowmatic/constants.js.map +0 -1
  60. package/src/plugins/flowmatic/filters.js.map +0 -1
  61. package/src/plugins/flowmatic/index.js.map +0 -1
  62. package/src/plugins/flowmatic/stakingFetcher.js +0 -59
  63. package/src/plugins/flowmatic/stakingFetcher.js.map +0 -1
  64. package/src/plugins/flowmatic/structs.d.ts +0 -16
  65. package/src/plugins/flowmatic/structs.js +0 -18
  66. package/src/plugins/flowmatic/structs.js.map +0 -1
  67. /package/src/plugins/{flowmatic → spl-staking}/filters.d.ts +0 -0
  68. /package/src/plugins/{flowmatic → spl-staking}/filters.js +0 -0
  69. /package/src/plugins/{flowmatic → spl-staking}/index.d.ts +0 -0
  70. /package/src/plugins/{flowmatic → spl-staking}/stakingFetcher.d.ts +0 -0
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.platformByMint = exports.madbearsPlatform = exports.madbearsPlatformId = exports.yakuPlatform = exports.yakuPlatformId = exports.kishuPlatform = exports.kishuPlatformId = exports.flowmaticPlatform = exports.flowmaticPlatformId = exports.poolsKey = exports.stakePid = exports.splStakingPlatform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ exports.platformId = 'spl-staking';
6
+ exports.splStakingPlatform = {
7
+ id: exports.platformId,
8
+ name: 'SPL Staking',
9
+ image: 'https://sonar.watch/img/platforms/splStaking.png',
10
+ };
11
+ exports.stakePid = new web3_js_1.PublicKey('STAKEGztX7S1MUHxcQHieZhELCntb9Ys9BgUbeEtMu1');
12
+ exports.poolsKey = 'pools';
13
+ exports.flowmaticPlatformId = 'flowmatic';
14
+ exports.flowmaticPlatform = {
15
+ id: exports.platformId,
16
+ name: 'Flowmatic',
17
+ image: 'https://sonar.watch/img/platforms/flowmatic.png',
18
+ website: 'https://www.flowmatic.xyz/',
19
+ twitter: 'https://twitter.com/FlowmaticXYZ',
20
+ };
21
+ exports.kishuPlatformId = 'kishu';
22
+ exports.kishuPlatform = {
23
+ id: exports.platformId,
24
+ name: 'Kishu',
25
+ image: 'https://sonar.watch/img/platforms/kishu.png',
26
+ website: 'https://staking.kishuthedog.com/',
27
+ twitter: 'https://twitter.com/FlowmaticXYZ',
28
+ };
29
+ exports.yakuPlatformId = 'yaku';
30
+ exports.yakuPlatform = {
31
+ id: exports.platformId,
32
+ name: 'Yaku',
33
+ image: 'https://sonar.watch/img/platforms/yaku.png',
34
+ website: 'https://staking.yaku.gg/',
35
+ twitter: 'https://twitter.com/FlowmaticXYZ',
36
+ };
37
+ exports.madbearsPlatformId = 'madbears';
38
+ exports.madbearsPlatform = {
39
+ id: exports.platformId,
40
+ name: 'MadBears',
41
+ image: 'https://sonar.watch/img/platforms/madbears.png',
42
+ website: 'https://staking.madbears.club/',
43
+ twitter: 'https://twitter.com/FlowmaticXYZ',
44
+ };
45
+ exports.platformByMint = new Map([
46
+ ['BDssJun8XSPmWq7VkoahyozsvJwKEZBkWE6YBrFHjbii', exports.kishuPlatformId],
47
+ ['AqEHVh8J2nXH9saV2ciZyYwPpqWFRfD2ffcq5Z8xxqm5', exports.yakuPlatformId],
48
+ ['Eh1fXbAipe4k7CYR9UMb2bbWmBcpU3HcyX3LWuRVFBLz', exports.flowmaticPlatformId],
49
+ ['Ee1pKgTQmP5xjYQs76HmRM2c2YkqEdc9tk5mQbiGFigT', exports.madbearsPlatformId],
50
+ ]);
51
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,aAAa,CAAC;AAC3B,QAAA,kBAAkB,GAAa;IAC1C,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,kDAAkD;CAC1D,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAG,OAAO,CAAC;AAC1B,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,kCAAkC;IAC3C,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,cAAc,GAAG,MAAM,CAAC;AACxB,QAAA,YAAY,GAAa;IACpC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,kBAAkB,GAAG,UAAU,CAAC;AAChC,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,OAAO,EAAE,gCAAgC;IACzC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,GAAG,CAAC;IACpC,CAAC,8CAA8C,EAAE,uBAAe,CAAC;IACjE,CAAC,8CAA8C,EAAE,sBAAc,CAAC;IAChE,CAAC,8CAA8C,EAAE,2BAAmB,CAAC;IACrE,CAAC,8CAA8C,EAAE,0BAAkB,CAAC;CACrE,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB"}
@@ -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 constants_1 = require("./constants");
8
+ const poolsJob_1 = __importDefault(require("./poolsJob"));
8
9
  const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
9
- exports.platforms = [constants_1.platform];
10
- exports.jobs = [];
10
+ exports.platforms = [constants_1.flowmaticPlatform];
11
+ exports.jobs = [poolsJob_1.default];
11
12
  exports.fetchers = [stakingFetcher_1.default];
12
13
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAgD;AAChD,0DAAkC;AAClC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,6BAAiB,CAAC,CAAC;AAC5C,QAAA,IAAI,GAAU,CAAC,kBAAQ,CAAC,CAAC;AACzB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,39 @@
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 clients_1 = require("../../utils/clients");
14
+ const solana_1 = require("../../utils/solana");
15
+ const filters_1 = require("../../utils/solana/filters");
16
+ const constants_1 = require("./constants");
17
+ const structs_1 = require("./structs");
18
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const client = (0, clients_1.getClientSolana)();
20
+ const pools = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.stakePoolStruct, constants_1.stakePid, (0, filters_1.dataSizeFilter)(structs_1.stakePoolStruct.byteSize));
21
+ const poolsInfo = [];
22
+ for (const pool of pools) {
23
+ poolsInfo.push({
24
+ pubkey: pool.pubkey.toString(),
25
+ mint: pool.mint.toString(),
26
+ });
27
+ }
28
+ yield cache.setItem(constants_1.poolsKey, poolsInfo, {
29
+ prefix: constants_1.platformId,
30
+ networkId: portfolio_core_1.NetworkId.solana,
31
+ });
32
+ });
33
+ const job = {
34
+ id: `${constants_1.platformId}-pools`,
35
+ executor,
36
+ label: 'normal',
37
+ };
38
+ exports.default = job;
39
+ //# sourceMappingURL=poolsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAA6D;AAC7D,uCAA4C;AAG5C,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,yBAAe,EACf,oBAAQ,EACR,IAAA,wBAAc,EAAC,yBAAe,CAAC,QAAQ,CAAC,CACzC,CAAC;IAEF,MAAM,SAAS,GAAe,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,SAAS,CAAC,IAAI,CAAC;YACb,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;SAC3B,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,SAAS,EAAE;QACvC,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"}
@@ -0,0 +1,83 @@
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 solana_1 = require("../../utils/solana");
18
+ const structs_1 = require("./structs");
19
+ const filters_1 = require("./filters");
20
+ const clients_1 = require("../../utils/clients");
21
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const client = (0, clients_1.getClientSolana)();
24
+ const pools = yield cache.getItem(constants_1.poolsKey, {
25
+ prefix: constants_1.platformId,
26
+ networkId: portfolio_core_1.NetworkId.solana,
27
+ });
28
+ if (!pools)
29
+ return [];
30
+ const mintByPool = new Map();
31
+ pools.forEach((pool) => mintByPool.set(pool.pubkey, pool.mint));
32
+ const mints = Array.from(mintByPool.values());
33
+ const tokenPricesById = yield cache.getTokenPricesAsMap(mints, portfolio_core_1.NetworkId.solana);
34
+ const stakeAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.StakeDepositReceiptStruct, constants_1.stakePid, (0, filters_1.stakeFilters)(owner));
35
+ if (stakeAccounts.length === 0)
36
+ return [];
37
+ const assetsByPlatform = new Map();
38
+ for (const stakeAccount of stakeAccounts) {
39
+ if (stakeAccount.depositAmount.isZero())
40
+ continue;
41
+ const mint = mintByPool.get(stakeAccount.stakePool.toString());
42
+ if (!mint)
43
+ continue;
44
+ const tokenPrice = tokenPricesById.get(mint);
45
+ if (!tokenPrice)
46
+ continue;
47
+ const platform = constants_1.platformByMint.get(mint) || constants_1.platformId;
48
+ const lockedUntil = new Date(stakeAccount.depositTimestamp
49
+ .plus(stakeAccount.lockupDuration)
50
+ .times(1000)
51
+ .toNumber()).getTime();
52
+ const asset = Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(mint, stakeAccount.depositAmount
53
+ .dividedBy(Math.pow(10, tokenPrice.decimals))
54
+ .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice)), { attributes: {
55
+ lockedUntil,
56
+ } });
57
+ const assetsOfPlatform = assetsByPlatform.get(platform);
58
+ if (assetsOfPlatform) {
59
+ assetsOfPlatform.push(asset);
60
+ assetsByPlatform.set(platform, assetsOfPlatform);
61
+ }
62
+ else {
63
+ assetsByPlatform.set(platform, [asset]);
64
+ }
65
+ }
66
+ const elements = [];
67
+ assetsByPlatform.forEach((assets, platform) => elements.push({
68
+ type: portfolio_core_1.PortfolioElementType.multiple,
69
+ label: 'Staked',
70
+ networkId: portfolio_core_1.NetworkId.solana,
71
+ platformId: platform,
72
+ data: { assets },
73
+ value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
74
+ }));
75
+ return elements;
76
+ });
77
+ const fetcher = {
78
+ id: `${constants_1.platformId}`,
79
+ networkId: portfolio_core_1.NetworkId.solana,
80
+ executor,
81
+ };
82
+ exports.default = fetcher;
83
+ //# sourceMappingURL=stakingFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,2CAA6E;AAC7E,+CAA8D;AAC9D,uCAAsD;AACtD,uCAAyC;AACzC,iDAAsD;AACtD,qGAA6E;AAG7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,OAAO,CAAa,oBAAQ,EAAE;QACtD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IAEtB,MAAM,UAAU,GAAwB,IAAI,GAAG,EAAE,CAAC;IAClD,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEhE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;IAE9C,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACrD,KAAK,EACL,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,mCAAyB,EACzB,oBAAQ,EACR,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,gBAAgB,GAAkC,IAAI,GAAG,EAAE,CAAC;IAClE,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;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AAC,MAAM,EAAE,QAAQ,EAAE,EAAE,CAC5C,QAAQ,CAAC,IAAI,CAAC;QACZ,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,KAAK,EAAE,QAAQ;QACf,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAE,QAAQ;QACpB,IAAI,EAAE,EAAE,MAAM,EAAE;QAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC1D,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,EAAE;IACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,42 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export type StakeDepositReceipt = {
6
+ buffer: Buffer;
7
+ owner: PublicKey;
8
+ payer: PublicKey;
9
+ stakePool: PublicKey;
10
+ lockupDuration: BigNumber;
11
+ depositTimestamp: BigNumber;
12
+ depositAmount: BigNumber;
13
+ effectiveStake: BigNumber;
14
+ claimedAmounts: BigNumber[];
15
+ };
16
+ export declare const StakeDepositReceiptStruct: BeetStruct<StakeDepositReceipt, Partial<StakeDepositReceipt>>;
17
+ export type RewardPool = {
18
+ rewardVault: PublicKey;
19
+ rewardsPerEffectiveStake: BigNumber;
20
+ lastAmount: BigNumber;
21
+ padding0: number[];
22
+ };
23
+ export declare const rewardPoolStruct: BeetStruct<RewardPool, Partial<RewardPool>>;
24
+ export type StakePool = {
25
+ buffer: Buffer;
26
+ creator: PublicKey;
27
+ authority: PublicKey;
28
+ totalWeightedStake: BigNumber;
29
+ vault: PublicKey;
30
+ mint: PublicKey;
31
+ stakeMint: PublicKey;
32
+ rewardPools: RewardPool[];
33
+ baseWeight: BigNumber;
34
+ maxWeight: BigNumber;
35
+ minDuration: BigNumber;
36
+ maxDuration: BigNumber;
37
+ nonce: number;
38
+ bumpSeed: number;
39
+ padding0: number[];
40
+ reserved0: number[];
41
+ };
42
+ export declare const stakePoolStruct: BeetStruct<StakePool, Partial<StakePool>>;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stakePoolStruct = exports.rewardPoolStruct = exports.StakeDepositReceiptStruct = 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.StakeDepositReceiptStruct = new beet_1.BeetStruct([
8
+ ['buffer', (0, solana_1.blob)(8)],
9
+ ['owner', beet_solana_1.publicKey],
10
+ ['payer', beet_solana_1.publicKey],
11
+ ['stakePool', beet_solana_1.publicKey],
12
+ ['lockupDuration', solana_1.u64],
13
+ ['depositTimestamp', solana_1.i64],
14
+ ['depositAmount', solana_1.u64],
15
+ ['effectiveStake', solana_1.u128],
16
+ ['claimedAmounts', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 10)],
17
+ ], (args) => args);
18
+ exports.rewardPoolStruct = new beet_1.BeetStruct([
19
+ ['rewardVault', beet_solana_1.publicKey],
20
+ ['rewardsPerEffectiveStake', solana_1.u128],
21
+ ['lastAmount', solana_1.u64],
22
+ ['padding0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
23
+ ], (args) => args);
24
+ exports.stakePoolStruct = new beet_1.BeetStruct([
25
+ ['buffer', (0, solana_1.blob)(8)],
26
+ ['creator', beet_solana_1.publicKey],
27
+ ['authority', beet_solana_1.publicKey],
28
+ ['totalWeightedStake', solana_1.u128],
29
+ ['vault', beet_solana_1.publicKey],
30
+ ['mint', beet_solana_1.publicKey],
31
+ ['stakeMint', beet_solana_1.publicKey],
32
+ ['rewardPools', (0, beet_1.uniformFixedSizeArray)(exports.rewardPoolStruct, 10)],
33
+ ['baseWeight', solana_1.u64],
34
+ ['maxWeight', solana_1.u64],
35
+ ['minDuration', solana_1.u64],
36
+ ['maxDuration', solana_1.u64],
37
+ ['nonce', beet_1.u8],
38
+ ['bumpSeed', beet_1.u8],
39
+ ['padding0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
40
+ ['reserved0', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 256)],
41
+ ], (args) => args);
42
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spl-staking/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AACnC,kEAA6D;AAG7D,+CAA0D;AAc7C,QAAA,yBAAyB,GAAG,IAAI,iBAAU,CACrD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,aAAI,CAAC;IACxB,CAAC,gBAAgB,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,EAAE,CAAC,CAAC;CACpD,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA2B,CACtC,CAAC;AASW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,0BAA0B,EAAE,aAAI,CAAC;IAClC,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAqBW,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,oBAAoB,EAAE,aAAI,CAAC;IAC5B,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,aAAa,EAAE,IAAA,4BAAqB,EAAC,wBAAgB,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IAC1C,CAAC,WAAW,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,GAAG,CAAC,CAAC;CAC9C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export type PoolInfo = {
2
+ pubkey: string;
3
+ mint: string;
4
+ };
@@ -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/spl-staking/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;
@@ -31,6 +31,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
31
31
  return [];
32
32
  const rent = yield client.getMinimumBalanceForRentExemption(8);
33
33
  const solRawBalance = escrowAccountsInfo.reduce((accu, escrow) => (escrow ? accu + escrow.lamports - rent : accu + 0), 0);
34
+ if (solRawBalance === 0)
35
+ return [];
34
36
  const solTokenPrice = yield cache.getTokenPrice(portfolio_core_1.solanaNativeAddress, portfolio_core_1.NetworkId.solana);
35
37
  const amount = new bignumber_js_1.default(solRawBalance)
36
38
  .dividedBy(Math.pow(10, portfolio_core_1.solanaNetwork.native.decimals))
@@ -1 +1 @@
1
- {"version":3,"file":"bidsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/bidsFetcher.ts"],"names":[],"m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;SAC9C,QAAQ,EAAE,CAAC;IAEd,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,oCAAmB,EACnB,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,aAAa,CACd,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;SAC1B;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"bidsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/bidsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAGrC,2CAAoD;AACpD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAAuC;AACvC,gGAA6F;AAC7F,qCAAsC;AACtC,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAwB,EACjD,MAAM,EACN,mBAAU,EACV,qBAAS,EACT,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IAEF,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEzC,MAAM,kBAAkB,GAAG,MAAM,IAAA,yDAA2B,EAC1D,MAAM,EACN,YAAY,CAAC,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GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -32,83 +32,4 @@ function getTensorSingleListings(owner) {
32
32
  });
33
33
  }
34
34
  exports.default = getTensorSingleListings;
35
- // const executor: FetcherExecutor = async (owner: string, cache: Cache) => {
36
- // const connection = getClientSolana();
37
- // const metaplex = new Metaplex(connection);
38
- // const singleListings = await getParsedProgramAccounts(
39
- // connection,
40
- // singleListingStruct,
41
- // tensorProgram,
42
- // singleListingFilter(owner)
43
- // );
44
- // if (singleListings.length === 0) return [];
45
- // const mints = singleListings.map((listing) => listing.nftMint);
46
- // const nftsMetadata = await metaplex.nfts().findAllByMintList({
47
- // mints,
48
- // });
49
- // if (!nftsMetadata) return [];
50
- // const promises = nftsMetadata.map((nftMetadata) => {
51
- // if (!nftMetadata?.uri) return undefined;
52
- // return getImagefromUri(nftMetadata?.uri, NetworkId.solana, cache);
53
- // });
54
- // const imageResults = await Promise.allSettled(promises);
55
- // const assets: PortfolioAsset[] = [];
56
- // nftsMetadata.forEach((nftMetadata, i) => {
57
- // if (!nftMetadata) return;
58
- // const imageResult = imageResults[i];
59
- // const image =
60
- // imageResult.status === 'fulfilled' ? imageResult.value : undefined;
61
- // const address =
62
- // nftMetadata.model === 'metadata'
63
- // ? nftMetadata.mintAddress.toString()
64
- // : nftMetadata.mint.address.toString();
65
- // const token: Token | null =
66
- // isNftWithToken(nftMetadata) || isSftWithToken(nftMetadata)
67
- // ? nftMetadata.token
68
- // : null;
69
- // const amount = token?.amount
70
- // ? new BigNumber(token.amount.basisPoints.toString())
71
- // .div(10 ** token.amount.currency.decimals)
72
- // .toNumber()
73
- // : 1;
74
- // const collection = nftMetadata.collection
75
- // ? {
76
- // floorPrice: null,
77
- // id: nftMetadata.collection.address.toString(),
78
- // }
79
- // : undefined;
80
- // const asset: PortfolioAsset = {
81
- // type: PortfolioAssetType.collectible,
82
- // networkId: NetworkId.solana,
83
- // value: null,
84
- // data: {
85
- // address,
86
- // amount,
87
- // price: null,
88
- // name: nftMetadata.name,
89
- // dataUri: nftMetadata.uri,
90
- // imageUri: image,
91
- // collection,
92
- // },
93
- // };
94
- // assets.push(asset);
95
- // });
96
- // if (assets.length === 0) return [];
97
- // const element: PortfolioElementMultiple = {
98
- // type: PortfolioElementType.multiple,
99
- // networkId: NetworkId.solana,
100
- // platformId,
101
- // label: 'Wallet',
102
- // value: null,
103
- // data: {
104
- // assets,
105
- // },
106
- // };
107
- // return [element];
108
- // };
109
- // const fetcher: Fetcher = {
110
- // id: `${platformId}-linsting`,
111
- // networkId: NetworkId.solana,
112
- // executor,
113
- // };
114
35
  //# sourceMappingURL=singleListingFetcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"singleListingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/singleListingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAuE;AACvE,2CAAwC;AACxC,+CAA8D;AAC9D,iDAAsD;AACtD,qCAA+C;AAC/C,uCAAgD;AAEhD,SAA8B,uBAAuB,CACnD,KAAa;;QAEb,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,aAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,UAAU,EACV,4BAAmB,EACnB,qBAAS,EACT,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC;YAC3D,KAAK;SACN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O;AACP,sBAAsB;AACtB,KAAK;AAEL,6BAA6B;AAC7B,kCAAkC;AAClC,iCAAiC;AACjC,cAAc;AACd,KAAK"}
1
+ {"version":3,"file":"singleListingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/singleListingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAuE;AACvE,2CAAwC;AACxC,+CAA8D;AAC9D,iDAAsD;AACtD,qCAA+C;AAC/C,uCAAgD;AAEhD,SAA8B,uBAAuB,CACnD,KAAa;;QAEb,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,aAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,UAAU,EACV,4BAAmB,EACnB,qBAAS,EACT,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC;YAC3D,KAAK;SACN,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;CAAA;AApBD,0CAoBC"}
@@ -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;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.xStakingConfigs = exports.allbridgePlatform = exports.allbridgePlatformId = exports.stepFinancePlatform = exports.stepFinancePlatformId = exports.whalesMarketPlatform = exports.whalesMarketPlatformId = void 0;
4
4
  const constants_1 = require("../aurory/constants");
5
+ const constants_2 = require("../hawksight/constants");
5
6
  exports.whalesMarketPlatformId = 'whalesmarket';
6
7
  exports.whalesMarketPlatform = {
7
8
  id: exports.whalesMarketPlatformId,
@@ -60,5 +61,13 @@ exports.xStakingConfigs = [
60
61
  xDecimals: 9,
61
62
  platformId: exports.allbridgePlatformId,
62
63
  },
64
+ {
65
+ mint: 'BKipkearSqAUdNKa1WDstvcMjoPsSKBuNyvKDQDDu9WE',
66
+ decimals: 6,
67
+ vault: '2eFeetCpZJprr67F2dToT52BbSkdeqKZT6hmVdVG14eU',
68
+ xMint: 'xHWKW3Yyji9xe6FnTmDqu3rBApt3Ysu5ysywUA85Len',
69
+ xDecimals: 6,
70
+ platformId: constants_2.hawksightPlatform.id,
71
+ },
63
72
  ];
64
73
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAEhB,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,oBAAoB,GAAa;IAC5C,EAAE,EAAE,8BAAsB;IAC1B,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oDAAoD;IAC3D,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,4BAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,8BAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/x-staking-solana/constants.ts"],"names":[],"mappings":";;;AACA,mDAM6B;AAC7B,sDAA2D;AAE9C,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,oBAAoB,GAAa;IAC5C,EAAE,EAAE,8BAAsB;IAC1B,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,oDAAoD;IAC3D,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,mBAAmB,GAAa;IAC3C,EAAE,EAAE,6BAAqB;IACzB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,mDAAmD;IAC1D,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAa;IACzC,EAAE,EAAE,2BAAmB;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AAEW,QAAA,eAAe,GAAoB;IAC9C;QACE,IAAI,EAAE,oBAAQ;QACd,QAAQ,EAAR,oBAAQ;QACR,KAAK,EAAE,uBAAW;QAClB,KAAK,EAAE,qBAAS;QAChB,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,4BAAgB;KAC7B;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,8CAA8C;QACrD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,8BAAsB;KACnC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAqB;KAClC;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,2BAAmB;KAChC;IACD;QACE,IAAI,EAAE,8CAA8C;QACpD,QAAQ,EAAE,CAAC;QACX,KAAK,EAAE,8CAA8C;QACrD,KAAK,EAAE,6CAA6C;QACpD,SAAS,EAAE,CAAC;QACZ,UAAU,EAAE,6BAAiB,CAAC,EAAE;KACjC;CACF,CAAC"}
@@ -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,6 +0,0 @@
1
- import { PublicKey } from '@solana/web3.js';
2
- import { Platform } from '@sonarwatch/portfolio-core';
3
- export declare const platformId = "flowmatic";
4
- export declare const platform: Platform;
5
- export declare const programId: PublicKey;
6
- export declare const flowmaticMint = "Eh1fXbAipe4k7CYR9UMb2bbWmBcpU3HcyX3LWuRVFBLz";