@sonarwatch/portfolio-plugins 0.14.30 → 0.14.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/CHANGELOG.md +1716 -1712
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/index.js +6 -2
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/drift-market-maker-vault/constants.d.ts +2 -0
  8. package/src/plugins/drift-market-maker-vault/constants.js +11 -1
  9. package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
  10. package/src/plugins/drift-market-maker-vault/depositsFetcher.d.ts +2 -0
  11. package/src/plugins/drift-market-maker-vault/depositsFetcher.js +4 -2
  12. package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
  13. package/src/plugins/drift-market-maker-vault/index.js +1 -0
  14. package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
  15. package/src/plugins/metaplex/constants.d.ts +7 -0
  16. package/src/plugins/metaplex/constants.js +17 -0
  17. package/src/plugins/metaplex/constants.js.map +1 -0
  18. package/src/plugins/metaplex/helpers.d.ts +3 -0
  19. package/src/plugins/metaplex/helpers.js +19 -0
  20. package/src/plugins/metaplex/helpers.js.map +1 -0
  21. package/src/plugins/metaplex/index.d.ts +6 -0
  22. package/src/plugins/metaplex/index.js +12 -0
  23. package/src/plugins/metaplex/index.js.map +1 -0
  24. package/src/plugins/metaplex/positionsSolanaFetcher.d.ts +3 -0
  25. package/src/plugins/metaplex/positionsSolanaFetcher.js +75 -0
  26. package/src/plugins/metaplex/positionsSolanaFetcher.js.map +1 -0
  27. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +2 -1
  28. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  29. package/src/plugins/native-stake/solana/types.d.ts +3 -1
  30. package/src/plugins/pyth/pricingJob.js +98 -2
  31. package/src/plugins/pyth/pricingJob.js.map +1 -1
  32. package/src/plugins/sushiswap/helpers.js +24 -24
  33. package/src/plugins/symmetry/basketsJob.js +8 -2
  34. package/src/plugins/symmetry/basketsJob.js.map +1 -1
  35. package/src/plugins/uniswap-v2/helpers.js +22 -22
  36. package/src/plugins/zeta/airdropFetcher.js +14 -14
  37. package/src/utils/sei/constants.js +8 -8
  38. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  39. package/src/utils/solana/pyth/helpers.d.ts +11 -6
  40. package/src/utils/solana/pyth/helpers.js +13 -18
  41. package/src/utils/solana/pyth/helpers.js.map +1 -1
  42. package/src/utils/sui/constants.d.ts +2 -0
  43. package/src/utils/sui/constants.js +3 -1
  44. package/src/utils/sui/constants.js.map +1 -1
@@ -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;
@@ -30,8 +30,14 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
30
30
  const pythSources = yield (0, helpers_2.getPythTokenPriceSources)(connection, tokenSettings
31
31
  .filter((ts) => ts.oracleType === structs_1.OracleType.Pyth)
32
32
  .map((ts) => ({
33
- mint: ts.tokenMint,
34
- feed: ts.oracleAccount,
33
+ tokens: [
34
+ {
35
+ mint: ts.tokenMint.toString(),
36
+ networkdId: portfolio_core_1.NetworkId.solana,
37
+ decimals: ts.decimals,
38
+ },
39
+ ],
40
+ address: ts.oracleAccount,
35
41
  })));
36
42
  yield cache.setTokenPriceSources(pythSources);
37
43
  const tokenPrices = yield cache.getTokenPrices(tokenSettings.map((ts) => ts.tokenMint.toString()), portfolio_core_1.NetworkId.solana);
@@ -1 +1 @@
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,IAAI,CAAC;SACjD,GAAG,CAAC,CAAC,EAAE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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;
@@ -42,20 +42,20 @@ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/token
42
42
  const clients_1 = require("../../utils/clients");
43
43
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
44
44
  const helpers_1 = require("./helpers");
45
- const query = (0, graphql_request_1.gql) `
46
- query GetAirdropFinalFrontend($authority: String!) {
47
- getAirdropFinalFrontend(authority: $authority) {
48
- authority
49
- community_allocation
50
- eligibility
51
- main_allocation
52
- og_allocation
53
- s1_allocation
54
- s2_allocation
55
- total_allocation
56
- __typename
57
- }
58
- }
45
+ const query = (0, graphql_request_1.gql) `
46
+ query GetAirdropFinalFrontend($authority: String!) {
47
+ getAirdropFinalFrontend(authority: $authority) {
48
+ authority
49
+ community_allocation
50
+ eligibility
51
+ main_allocation
52
+ og_allocation
53
+ s1_allocation
54
+ s2_allocation
55
+ total_allocation
56
+ __typename
57
+ }
58
+ }
59
59
  `;
60
60
  const networkId = portfolio_core_1.NetworkId.solana;
61
61
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { PublicKey } from '@solana/web3.js';
3
- import { TokenPriceSource } from '@sonarwatch/portfolio-core';
3
+ import { NetworkIdType, TokenPriceSource } from '@sonarwatch/portfolio-core';
4
4
  import { Base, MappingData, PermissionData, PriceData } from './structs';
5
5
  import { SolanaClient } from '../../clients/types';
6
6
  export declare const Magic = 2712847316;
@@ -15,8 +15,13 @@ export declare const parsePermissionData: (data: Buffer) => PermissionData;
15
15
  export declare function getPythPricesAsMap(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<Map<string, number>>;
16
16
  export declare function getPythPrices(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<(number | null)[]>;
17
17
  export declare function getPythPrice(connection: SolanaClient, feedAddress: PublicKey): Promise<number | null>;
18
- export declare function getPythTokenPriceSources(connection: SolanaClient, params: {
19
- mint: PublicKey;
20
- feed: PublicKey;
21
- platformId?: string;
22
- }[]): Promise<(TokenPriceSource | null)[]>;
18
+ export type FeedInfo = {
19
+ address: PublicKey;
20
+ tokens: {
21
+ mint: string;
22
+ decimals: number;
23
+ networkdId: NetworkIdType;
24
+ platformId?: string;
25
+ }[];
26
+ };
27
+ export declare function getPythTokenPriceSources(connection: SolanaClient, feedsInfo: FeedInfo[]): Promise<(TokenPriceSource | null)[]>;
@@ -11,12 +11,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesAsMap = 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
- const portfolio_core_1 = require("@sonarwatch/portfolio-core");
15
14
  const structs_1 = require("./structs");
16
15
  const readBig_1 = require("./readBig");
17
16
  const getMultipleAccountsInfoSafe_1 = require("../getMultipleAccountsInfoSafe");
18
17
  const constants_1 = require("../../../plugins/tokens/constants");
19
- const getMultipleDecimalsAsMap_1 = require("../getMultipleDecimalsAsMap");
20
18
  exports.Magic = 0xa1b2c3d4;
21
19
  exports.Version2 = 2;
22
20
  exports.Version = exports.Version2;
@@ -272,29 +270,26 @@ function getPythPrice(connection, feedAddress) {
272
270
  });
273
271
  }
274
272
  exports.getPythPrice = getPythPrice;
275
- function getPythTokenPriceSources(connection, params) {
273
+ function getPythTokenPriceSources(connection, feedsInfo) {
276
274
  return __awaiter(this, void 0, void 0, function* () {
277
- const prices = yield getPythPrices(connection, params.map((p) => p.feed));
278
- const decimalsMap = yield (0, getMultipleDecimalsAsMap_1.getMultipleDecimalsAsMap)(connection, params.map((p) => p.mint));
279
- return params.map((param, i) => {
275
+ const prices = yield getPythPrices(connection, feedsInfo.map((feed) => feed.address));
276
+ return feedsInfo
277
+ .map((feedInfo, i) => {
280
278
  const price = prices.at(i);
281
279
  if (price === null || price === undefined)
282
280
  return null;
283
- const address = param.mint.toString();
284
- const decimals = decimalsMap.get(address);
285
- if (!decimals)
286
- return null;
287
- return {
288
- address,
289
- id: `pyth-feed-${param.feed.toString()}`,
290
- decimals,
291
- networkId: portfolio_core_1.NetworkId.solana,
292
- platformId: param.platformId || constants_1.walletTokensPlatform.id,
281
+ return feedInfo.tokens.map((token) => ({
282
+ address: token.mint,
283
+ id: `pyth-feed-${feedInfo.address.toString()}`,
284
+ decimals: token.decimals,
285
+ networkId: token.networkdId,
286
+ platformId: token.platformId || constants_1.walletTokensPlatform.id,
293
287
  price,
294
288
  timestamp: Date.now(),
295
289
  weight: 1,
296
- };
297
- });
290
+ }));
291
+ })
292
+ .flat();
298
293
  });
299
294
  }
300
295
  exports.getPythTokenPriceSources = getPythTokenPriceSources;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils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AC;YAEvD,OAAO,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACrC,OAAO,EAAE,KAAK,CAAC,IAAI;gBACnB,EAAE,EAAE,aAAa,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE;gBAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,SAAS,EAAE,KAAK,CAAC,UAAU;gBAC3B,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,gCAAoB,CAAC,EAAE;gBACvD,KAAK;gBACL,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,MAAM,EAAE,CAAC;aACV,CAAC,CAAC,CAAC;QACN,CAAC,CAAC;aACD,IAAI,EAAE,CAAC;IACZ,CAAC;CAAA;AA1BD,4DA0BC"}
@@ -1,4 +1,6 @@
1
1
  export declare const kioskItemType = "0x2::kiosk::Item";
2
2
  export declare const obKioskStructType = "0x95a441d389b07437d00dd07e0b6f05f513d7659b13fd7c5d3923c7d9d847199b::ob_kiosk::OwnerToken";
3
3
  export declare const wUsdcSuiType = "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN";
4
+ export declare const wusdcSuiDecimals = 6;
4
5
  export declare const usdcSuiType = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
6
+ export declare const usdcSuiDecimals = 6;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usdcSuiType = exports.wUsdcSuiType = exports.obKioskStructType = exports.kioskItemType = void 0;
3
+ exports.usdcSuiDecimals = exports.usdcSuiType = exports.wusdcSuiDecimals = exports.wUsdcSuiType = exports.obKioskStructType = exports.kioskItemType = void 0;
4
4
  exports.kioskItemType = '0x2::kiosk::Item';
5
5
  exports.obKioskStructType = '0x95a441d389b07437d00dd07e0b6f05f513d7659b13fd7c5d3923c7d9d847199b::ob_kiosk::OwnerToken';
6
6
  exports.wUsdcSuiType = '0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN';
7
+ exports.wusdcSuiDecimals = 6;
7
8
  exports.usdcSuiType = '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC';
9
+ exports.usdcSuiDecimals = 6;
8
10
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,kBAAkB,CAAC;AACnC,QAAA,iBAAiB,GAC5B,0FAA0F,CAAC;AAChF,QAAA,YAAY,GACvB,gFAAgF,CAAC;AACtE,QAAA,WAAW,GACtB,gFAAgF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,kBAAkB,CAAC;AACnC,QAAA,iBAAiB,GAC5B,0FAA0F,CAAC;AAChF,QAAA,YAAY,GACvB,gFAAgF,CAAC;AACtE,QAAA,gBAAgB,GAAG,CAAC,CAAC;AACrB,QAAA,WAAW,GACtB,gFAAgF,CAAC;AACtE,QAAA,eAAe,GAAG,CAAC,CAAC"}