@sonarwatch/portfolio-plugins 0.11.233 → 0.11.235

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/CHANGELOG.md +1674 -1666
  2. package/README.md +3 -3
  3. package/package.json +2 -3
  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/moonwalk/constants.d.ts +6 -0
  8. package/src/plugins/moonwalk/constants.js +16 -0
  9. package/src/plugins/moonwalk/constants.js.map +1 -0
  10. package/src/plugins/moonwalk/gamesFetcher.d.ts +3 -0
  11. package/src/plugins/moonwalk/gamesFetcher.js +89 -0
  12. package/src/plugins/moonwalk/gamesFetcher.js.map +1 -0
  13. package/src/plugins/moonwalk/gamesJob.d.ts +3 -0
  14. package/src/plugins/moonwalk/gamesJob.js +37 -0
  15. package/src/plugins/moonwalk/gamesJob.js.map +1 -0
  16. package/src/plugins/moonwalk/helpers.d.ts +7 -0
  17. package/src/plugins/moonwalk/helpers.js +41 -0
  18. package/src/plugins/moonwalk/helpers.js.map +1 -0
  19. package/src/plugins/moonwalk/index.d.ts +6 -0
  20. package/src/plugins/moonwalk/index.js +13 -0
  21. package/src/plugins/moonwalk/index.js.map +1 -0
  22. package/src/plugins/moonwalk/structs.d.ts +50 -0
  23. package/src/plugins/moonwalk/structs.js +37 -0
  24. package/src/plugins/moonwalk/structs.js.map +1 -0
  25. package/src/plugins/pyth/index.js +2 -1
  26. package/src/plugins/pyth/index.js.map +1 -1
  27. package/src/plugins/pyth/pricingJob.d.ts +3 -0
  28. package/src/plugins/pyth/pricingJob.js +33 -0
  29. package/src/plugins/pyth/pricingJob.js.map +1 -0
  30. package/src/plugins/sushiswap/helpers.js +24 -24
  31. package/src/plugins/switchboard/pricingJob.js +1 -1
  32. package/src/plugins/switchboard/pricingJob.js.map +1 -1
  33. package/src/plugins/symmetry/basketsJob.js +17 -12
  34. package/src/plugins/symmetry/basketsJob.js.map +1 -1
  35. package/src/plugins/uniswap-v2/helpers.js +22 -22
  36. package/src/utils/misc/getLpTokenSource.js +3 -1
  37. package/src/utils/misc/getLpTokenSource.js.map +1 -1
  38. package/src/utils/misc/getLpTokenSourceRaw.d.ts +1 -1
  39. package/src/utils/misc/getLpUnderlyingTokenSource.d.ts +1 -1
  40. package/src/utils/misc/getLpUnderlyingTokenSource.js +7 -3
  41. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  42. package/src/utils/sei/constants.js +8 -8
  43. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  44. package/src/utils/solana/beets/numbers.d.ts +1 -0
  45. package/src/utils/solana/beets/numbers.js +12 -1
  46. package/src/utils/solana/beets/numbers.js.map +1 -1
  47. package/src/utils/solana/pyth/helpers.d.ts +3 -2
  48. package/src/utils/solana/pyth/helpers.js +20 -20
  49. package/src/utils/solana/pyth/helpers.js.map +1 -1
@@ -8,9 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  /* eslint-disable no-labels */
16
13
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
@@ -21,8 +18,8 @@ const structs_1 = require("./structs");
21
18
  const filters_1 = require("./filters");
22
19
  const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
23
20
  const helpers_1 = require("./helpers");
24
- const getLpTokenSourceRawOld_1 = __importDefault(require("../../utils/misc/getLpTokenSourceRawOld"));
25
21
  const helpers_2 = require("../../utils/solana/pyth/helpers");
22
+ const getLpTokenSourceRaw_1 = require("../../utils/misc/getLpTokenSourceRaw");
26
23
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
27
24
  const connection = (0, clients_1.getClientSolana)();
28
25
  const tokenListRes = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.tokenListStruct, constants_1.tokenListAddress);
@@ -34,7 +31,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
34
31
  .filter((ts) => ts.oracleType === structs_1.OracleType.Pyth)
35
32
  .map((ts) => ({
36
33
  mint: ts.tokenMint,
37
- oracle: ts.oracleAccount,
34
+ feed: ts.oracleAccount,
38
35
  })));
39
36
  yield cache.setTokenPriceSources(pythSources);
40
37
  const tokenPrices = yield cache.getTokenPrices(tokenSettings.map((ts) => ts.tokenMint.toString()), portfolio_core_1.NetworkId.solana);
@@ -56,18 +53,26 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
56
53
  poolUnderlyingRaw.push({
57
54
  address: tokenPrice.address,
58
55
  decimals: tokenPrice.decimals,
59
- price: tokenPrice.price,
56
+ tokenPrice,
60
57
  reserveAmountRaw,
61
58
  });
62
59
  }
63
60
  if (poolUnderlyingRaw.length === 0)
64
61
  continue;
65
- const lpSource = (0, getLpTokenSourceRawOld_1.default)(portfolio_core_1.NetworkId.solana, constants_1.platformId, constants_1.platformId, {
66
- address: account.fundToken.toString(),
67
- decimals: 6,
68
- supplyRaw: account.supplyOutstanding,
69
- }, poolUnderlyingRaw, 'Basket', (0, helpers_1.getSymbol)(account));
70
- lpSources.push(lpSource);
62
+ const lpSource = (0, getLpTokenSourceRaw_1.getLpTokenSourceRaw)({
63
+ platformId: constants_1.platformId,
64
+ networkId: portfolio_core_1.NetworkId.solana,
65
+ lpDetails: {
66
+ address: account.fundToken.toString(),
67
+ decimals: 6,
68
+ supplyRaw: account.supplyOutstanding,
69
+ },
70
+ poolUnderlyingsRaw: poolUnderlyingRaw,
71
+ sourceId: constants_1.platformId,
72
+ elementName: 'Basket',
73
+ liquidityName: (0, helpers_1.getSymbol)(account),
74
+ });
75
+ lpSources.push(...lpSource);
71
76
  }
72
77
  yield cache.setTokenPriceSources(lpSources);
73
78
  });
@@ -1 +1 @@
1
- {"version":3,"file":"basketsJob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ACrC,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,OAAO,CAAC,iBAAiB;SACrC,EACD,iBAAiB,EACjB,QAAQ,EACR,IAAA,mBAAS,EAAC,OAAO,CAAC,CACnB,CAAC;QACF,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"basketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/symmetry/basketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,8BAA8B;AAC9B,+DAAyE;AAGzE,2CAA4E;AAC5E,+CAA8D;AAC9D,iDAAsD;AACtD,uCAAoE;AACpE,uCAAwC;AACxC,kFAA+E;AAC/E,uCAAsC;AACtC,6DAA2E;AAC3E,8EAG8C;AAE9C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,YAAY,GAAG,MAAM,IAAA,2CAAoB,EAC7C,UAAU,EACV,yBAAe,EACf,4BAAgB,CACjB,CAAC;IACF,IAAI,CAAC,YAAY;QAAE,OAAO;IAC1B,MAAM,aAAa,GAAG,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,CAChD,CAAC,EACD,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,CAClC,CAAC;IAEF,sCAAsC;IACtC,MAAM,WAAW,GAAG,MAAM,IAAA,kCAAwB,EAChD,UAAU,EACV,aAAa;SACV,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,KAAK,oBAAU,CAAC,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,gBAAgB,CAAC,MAAM,EAAE;gBAAE,SAAS;YACxC,iBAAiB,CAAC,IAAI,CAAC;gBACrB,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,UAAU;gBACV,gBAAgB;aACjB,CAAC,CAAC;QACL,CAAC;QACD,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAE7C,MAAM,QAAQ,GAAG,IAAA,yCAAmB,EAAC;YACnC,UAAU,EAAV,sBAAU;YACV,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE;gBACT,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;gBACrC,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,OAAO,CAAC,iBAAiB;aACrC;YACD,kBAAkB,EAAE,iBAAiB;YACrC,QAAQ,EAAE,sBAAU;YACpB,WAAW,EAAE,QAAQ;YACrB,aAAa,EAAE,IAAA,mBAAS,EAAC,OAAO,CAAC;SAClC,CAAC,CAAC;QACH,SAAS,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;IAC9B,CAAC;IACD,MAAM,KAAK,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -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;
@@ -7,7 +7,9 @@ function getLpTokenSource(params) {
7
7
  const { poolUnderlyings, liquidityName, elementName, lpDetails, platformId, sourceId, networkId, priceUnderlyings, } = params;
8
8
  const sources = [];
9
9
  // Verify underlyings weights
10
- const totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + p.weight, 0);
10
+ let totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + (p.weight || 0), 0);
11
+ if (totalWeight === 0)
12
+ totalWeight = 1;
11
13
  if (totalWeight > 1.01)
12
14
  throw new Error(`Weights are greater than 1: ${totalWeight}`);
13
15
  if (totalWeight < 0.99)
@@ -1 +1 @@
1
- {"version":3,"file":"getLpTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSource.ts"],"names":[],"mappings":";;;AAAA,+DAIoC;AACpC,6EAGsC;AAmBtC,SAAgB,gBAAgB,CAC9B,MAA8B;IAE9B,MAAM,EACJ,eAAe,EACf,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,GACjB,GAAG,MAAM,CAAC;IACX,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,6BAA6B;IAC7B,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CACxC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,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,oEAAoE;YACpE,KAAK,EAAE,CAAC,CAAC,UAAW,CAAC,KAAK;YAC1B,WAAW,EAAE,CAAC,CAAC,aAAa,GAAG,SAAS,CAAC,MAAM;YAC/C,QAAQ,EAAE,CAAC,CAAC,QAAQ;SACrB,CAAC,CAAC;QACH,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;KACtB,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,OAAO,OAAO,CAAC;AACjB,CAAC;AAjED,4CAiEC"}
1
+ {"version":3,"file":"getLpTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpTokenSource.ts"],"names":[],"mappings":";;;AAAA,+DAIoC;AACpC,6EAGsC;AAmBtC,SAAgB,gBAAgB,CAC9B,MAA8B;IAE9B,MAAM,EACJ,eAAe,EACf,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,GACjB,GAAG,MAAM,CAAC;IACX,MAAM,OAAO,GAAuB,EAAE,CAAC;IAEvC,6BAA6B;IAC7B,IAAI,WAAW,GAAG,eAAe,CAAC,MAAM,CACtC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,EAC/C,CAAC,CACF,CAAC;IACF,IAAI,WAAW,KAAK,CAAC;QAAE,WAAW,GAAG,CAAC,CAAC;IACvC,IAAI,WAAW,GAAG,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,EAAE,CAAC,CAAC;IAChE,IAAI,WAAW,GAAG,IAAI;QACpB,MAAM,IAAI,KAAK,CAAC,+BAA+B,WAAW,EAAE,CAAC,CAAC;IAEhE,oBAAoB;IACpB,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAA,uDAA0B,EAAC;YAC1C,SAAS;YACT,QAAQ,EAAE,SAAS,CAAC,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{
4
4
  address: string;
5
5
  reserveAmountRaw: BigNumber | string;
6
6
  decimals: number;
7
- weight: number;
7
+ weight?: number;
8
8
  tokenPrice?: TokenPrice;
9
9
  };
10
10
  type LpDetailsRaw = {
@@ -4,7 +4,7 @@ export type PoolUnderlying = {
4
4
  address: string;
5
5
  reserveAmount: number;
6
6
  decimals: number;
7
- weight: number;
7
+ weight?: number;
8
8
  tokenPrice?: TokenPrice;
9
9
  };
10
10
  export type GetLpUnderlyingTokenSourceParams = {
@@ -57,7 +57,9 @@ function getLpUnderlyingTokenSource(params) {
57
57
  if (!minReserveValue)
58
58
  minReserveValue = 2500;
59
59
  // Verify underlyings weights
60
- const totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + p.weight, 0);
60
+ let totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + (p.weight || 0), 0);
61
+ if (totalWeight === 0)
62
+ totalWeight = 1;
61
63
  if (totalWeight > 1.01)
62
64
  throw new Error(`Weights are greater than 1: ${totalWeight}`);
63
65
  if (totalWeight < 0.99)
@@ -94,8 +96,10 @@ function getLpUnderlyingTokenSource(params) {
94
96
  if (u.tokenPrice &&
95
97
  u.tokenPrice.sources.some((s) => s.id === portfolio_core_1.coingeckoSourceId))
96
98
  continue;
97
- const price = ((u.weight / knownUnderlying.weight) * knownReserveValue) /
98
- u.reserveAmount;
99
+ let weightFactor = 1;
100
+ if (u.weight && knownUnderlying.weight)
101
+ weightFactor = u.weight / knownUnderlying.weight;
102
+ const price = (weightFactor * knownReserveValue) / u.reserveAmount;
99
103
  const source = {
100
104
  id: sourceId,
101
105
  networkId,
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAEnC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAA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W;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAjFD,gEAiFC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAEnC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;KACrD;IACD;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,eAAe;YACf,gFAAgF,EAAE,SAAS;YAC3F,gFAAgF,EAAE,SAAS;SAC5F,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0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X,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM;YACpC,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
@@ -1,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;
@@ -2,6 +2,7 @@ import { FixedSizeBeet, SupportedTypeDefinition } from '@metaplex-foundation/bee
2
2
  import BigNumber from 'bignumber.js';
3
3
  export declare const f32: FixedSizeBeet<BigNumber>;
4
4
  export declare const f64: FixedSizeBeet<BigNumber>;
5
+ export declare const fp64: FixedSizeBeet<BigNumber>;
5
6
  export declare const u64: FixedSizeBeet<BigNumber>;
6
7
  export declare const u128: FixedSizeBeet<BigNumber>;
7
8
  export declare const u256: FixedSizeBeet<BigNumber>;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.numbersTypeMap = exports.i80f48 = exports.i512 = exports.i256 = exports.i128 = exports.i64 = exports.u512 = exports.u256 = exports.u128 = exports.u64 = exports.f64 = exports.f32 = void 0;
6
+ exports.numbersTypeMap = exports.i80f48 = exports.i512 = exports.i256 = exports.i128 = exports.i64 = exports.u512 = exports.u256 = exports.u128 = exports.u64 = exports.fp64 = exports.f64 = exports.f32 = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  const bn_js_1 = require("bn.js");
9
9
  const decimal_js_1 = __importDefault(require("decimal.js"));
@@ -49,6 +49,17 @@ function unsignedSplittedFloatLargeBeet(integerSize, floatSize, description) {
49
49
  }
50
50
  exports.f32 = unsignedSplittedFloatLargeBeet(2, 2, 'f32');
51
51
  exports.f64 = unsignedSplittedFloatLargeBeet(4, 4, 'f64');
52
+ exports.fp64 = {
53
+ write(buf, offset, value) {
54
+ buf.writeDoubleLE(value.toNumber(), offset);
55
+ },
56
+ read(buf, offset) {
57
+ const subarray = buf.subarray(offset, offset + 8);
58
+ return new bignumber_js_1.default(subarray.readDoubleLE());
59
+ },
60
+ byteSize: 8,
61
+ description: 'fp64',
62
+ };
52
63
  exports.u64 = unsignedLargeBeet(8, 'u64');
53
64
  exports.u128 = unsignedLargeBeet(16, 'u128');
54
65
  exports.u256 = unsignedLargeBeet(32, 'u256');
@@ -1 +1 @@
1
- {"version":3,"file":"numbers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/beets/numbers.ts"],"names":[],"mappings":";;;;;;AAIA,gEAAqC;AACrC,iCAA2B;AAC3B,4DAAiC;AACjC,uCAAoD;AAEpD,SAAS,iBAAiB,CAAC,QAAgB,EAAE,WAAmB;IAC9D,OAAO;QACL,KAAK,CAAC,GAAW,EAAE,MAAc,EAAE,KAAgB;YACjD,MAAM,EAAE,GAAG,IAAI,UAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACpC,MAAM,UAAU,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YACnD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC9C,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,CAAC,GAAW,EAAE,MAAc;YAC9B,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC9D,OAAO,IAAI,sBAAS,CAAC,IAAI,UAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,QAAQ;QACR,WAAW;KACZ,CAAC;A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AAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,IAAI,EAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,IAAI,EAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,GAAG,EAAI,EAAE,IAAI,EAAE,KAAK,EAAG,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,IAAI,EAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,IAAI,EAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,IAAI,EAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;IAC/H,MAAM,EAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,iCAAuB,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,iCAAuB,EAAG;CACpI,CAAA"}
@@ -13,9 +13,10 @@ export declare const parseMappingData: (data: Buffer) => MappingData;
13
13
  export declare const parsePriceData: (data: Buffer, currentSlot?: number) => PriceData;
14
14
  export declare const parsePermissionData: (data: Buffer) => PermissionData;
15
15
  export declare function getPythPricesDatasMap(pubkeys: PublicKey[], accounts: (AccountInfo<Buffer> | null)[]): Map<string, PriceData>;
16
- export declare function getPythPrices(connection: SolanaClient, oracleAddresses: PublicKey[]): Promise<(number | null)[]>;
16
+ export declare function getPythPrices(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<(number | null)[]>;
17
+ export declare function getPythPrice(connection: SolanaClient, feedAddress: PublicKey): Promise<number | null>;
17
18
  export declare function getPythTokenPriceSources(connection: SolanaClient, params: {
18
19
  mint: PublicKey;
19
- oracle: PublicKey;
20
+ feed: PublicKey;
20
21
  platformId?: string;
21
22
  }[]): Promise<(TokenPriceSource | null)[]>;
@@ -9,15 +9,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getPythTokenPriceSources = exports.getPythPrices = exports.getPythPricesDatasMap = exports.parsePermissionData = exports.parsePriceData = exports.parseMappingData = exports.parseBaseData = exports.MAX_SLOT_DIFFERENCE = exports.Version = exports.Version2 = exports.Magic = void 0;
12
+ exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesDatasMap = exports.parsePermissionData = exports.parsePriceData = exports.parseMappingData = exports.parseBaseData = exports.MAX_SLOT_DIFFERENCE = exports.Version = exports.Version2 = exports.Magic = void 0;
13
13
  const web3_js_1 = require("@solana/web3.js");
14
14
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
15
15
  const structs_1 = require("./structs");
16
16
  const readBig_1 = require("./readBig");
17
17
  const getMultipleAccountsInfoSafe_1 = require("../getMultipleAccountsInfoSafe");
18
- const structs_2 = require("../structs");
19
- const getParsedMultipleAccountsInfo_1 = require("../getParsedMultipleAccountsInfo");
20
18
  const constants_1 = require("../../../plugins/tokens/constants");
19
+ const getMultipleDecimalsAsMap_1 = require("../getMultipleDecimalsAsMap");
21
20
  exports.Magic = 0xa1b2c3d4;
22
21
  exports.Version2 = 2;
23
22
  exports.Version = exports.Version2;
@@ -250,10 +249,10 @@ function getPythPricesDatasMap(pubkeys, accounts) {
250
249
  return priceMap;
251
250
  }
252
251
  exports.getPythPricesDatasMap = getPythPricesDatasMap;
253
- function getPythPrices(connection, oracleAddresses) {
252
+ function getPythPrices(connection, feedAddresses) {
254
253
  return __awaiter(this, void 0, void 0, function* () {
255
- const oracleAccounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(connection, oracleAddresses);
256
- return oracleAccounts.map((acc) => {
254
+ const accounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(connection, feedAddresses);
255
+ return accounts.map((acc) => {
257
256
  if (!acc)
258
257
  return null;
259
258
  return ((0, exports.parsePriceData)(acc.data).price || (0, exports.parsePriceData)(acc.data).previousPrice);
@@ -261,29 +260,30 @@ function getPythPrices(connection, oracleAddresses) {
261
260
  });
262
261
  }
263
262
  exports.getPythPrices = getPythPrices;
263
+ function getPythPrice(connection, feedAddress) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ return (yield getPythPrices(connection, [feedAddress]))[0];
266
+ });
267
+ }
268
+ exports.getPythPrice = getPythPrice;
264
269
  function getPythTokenPriceSources(connection, params) {
265
270
  return __awaiter(this, void 0, void 0, function* () {
266
- const prices = yield getPythPrices(connection, params.map((p) => p.oracle));
267
- const mintAccounts = yield (0, getParsedMultipleAccountsInfo_1.getParsedMultipleAccountsInfo)(connection, structs_2.mintAccountStruct, params.map((p) => p.mint));
268
- return prices.map((price, i) => {
269
- var _a;
270
- if (price === null)
271
+ const prices = yield getPythPrices(connection, params.map((p) => p.feed));
272
+ const decimalsMap = yield (0, getMultipleDecimalsAsMap_1.getMultipleDecimalsAsMap)(connection, params.map((p) => p.mint));
273
+ return params.map((param, i) => {
274
+ const price = prices.at(i);
275
+ if (price === null || price === undefined)
271
276
  return null;
272
- const decimals = (_a = mintAccounts.at(i)) === null || _a === void 0 ? void 0 : _a.decimals;
277
+ const address = param.mint.toString();
278
+ const decimals = decimalsMap.get(address);
273
279
  if (!decimals)
274
280
  return null;
275
- const cparams = params.at(i);
276
- if (!cparams)
277
- return null;
278
- const address = cparams.mint.toString();
279
- const oracle = cparams.oracle.toString();
280
- const platformId = cparams.platformId || constants_1.walletTokensPlatform.id;
281
281
  return {
282
282
  address,
283
- id: oracle,
283
+ id: `pyth-feed-${param.feed.toString()}`,
284
284
  decimals,
285
285
  networkId: portfolio_core_1.NetworkId.solana,
286
- platformId,
286
+ platformId: param.platformId || constants_1.walletTokensPlatform.id,
287
287
  price,
288
288
  timestamp: Date.now(),
289
289
  weight: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyD;AACzD,+DAAyE;AACzE,uCAYmB;AACnB,uCAA4D;AAE5D,gFAA6E;AAC7E,wCAA+C;AAC/C,oFAAiF;AACjF,iEAAyE;AAE5D,QAAA,KAAK,GAAG,UAAU,CAAC;AACnB,QAAA,QAAQ,GAAG,CAAC,CAAC;AACb,QAAA,OAAO,GAAG,gBAAQ,CAAC;AAChC,uGAAuG;AAC1F,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,IAAI,CAAC,CAAC;AAE1D,SAAgB,aAAa,CAAC,IAAY;IACxC,8CAA8C;IAC9C,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,I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,EAAE,MAAM;gBACV,QAAQ;gBACR,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK;gBACL,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,MAAM,EAAE,CAAC;aACV,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AArCD,4DAqCC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyD;AACzD,+DAAyE;AACzE,uCAYmB;AACnB,uCAA4D;AAE5D,gFAA6E;AAC7E,iEAAyE;AACzE,0EAAuE;AAE1D,QAAA,KAAK,GAAG,UAAU,CAAC;AACnB,QAAA,QAAQ,GAAG,CAAC,CAAC;AACb,QAAA,OAAO,GAAG,gBAAQ,CAAC;AAChC,uGAAuG;AAC1F,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,EAAE,CAChC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,mBAAS,CAAC,IAAI,CAAC,CAAC;AAE1D,SAAgB,aAAa,CAAC,IAAY;IACxC,8CAA8C;IAC9C,IAAI,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,KAAK,KAAK,aAAK,EAAE,CAAC;QACpB,kBAAkB;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,eAAe;QACf,MAAM,IAAI,GAAgB,IAAI,CAAC,YAAY,CAAC,CAAC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