@sonarwatch/portfolio-plugins 0.14.30 → 0.14.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +6 -2
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/banx/loansFetcher.js +2 -1
  6. package/src/plugins/banx/loansFetcher.js.map +1 -1
  7. package/src/plugins/cetus/clmmsFetcher.js +5 -7
  8. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  9. package/src/plugins/cetus/constants.d.ts +1 -0
  10. package/src/plugins/cetus/constants.js +17 -1
  11. package/src/plugins/cetus/constants.js.map +1 -1
  12. package/src/plugins/cetus/farmsFetcher.js +3 -7
  13. package/src/plugins/cetus/farmsFetcher.js.map +1 -1
  14. package/src/plugins/cetus/getPools.d.ts +3 -0
  15. package/src/plugins/cetus/getPools.js +50 -0
  16. package/src/plugins/cetus/getPools.js.map +1 -0
  17. package/src/plugins/cetus/poolsJob.js +4 -3
  18. package/src/plugins/cetus/poolsJob.js.map +1 -1
  19. package/src/plugins/cetus/types.d.ts +32 -31
  20. package/src/plugins/drift-market-maker-vault/constants.d.ts +2 -0
  21. package/src/plugins/drift-market-maker-vault/constants.js +11 -1
  22. package/src/plugins/drift-market-maker-vault/constants.js.map +1 -1
  23. package/src/plugins/drift-market-maker-vault/depositsFetcher.d.ts +2 -0
  24. package/src/plugins/drift-market-maker-vault/depositsFetcher.js +4 -2
  25. package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
  26. package/src/plugins/drift-market-maker-vault/index.js +1 -0
  27. package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
  28. package/src/plugins/kai/constants.d.ts +9 -0
  29. package/src/plugins/kai/constants.js +37 -2
  30. package/src/plugins/kai/constants.js.map +1 -1
  31. package/src/plugins/kai/helpers.d.ts +8 -0
  32. package/src/plugins/kai/helpers.js +49 -0
  33. package/src/plugins/kai/helpers.js.map +1 -0
  34. package/src/plugins/kai/index.js +4 -2
  35. package/src/plugins/kai/index.js.map +1 -1
  36. package/src/plugins/kai/lpVaultsFetcher.d.ts +3 -0
  37. package/src/plugins/kai/lpVaultsFetcher.js +112 -0
  38. package/src/plugins/kai/lpVaultsFetcher.js.map +1 -0
  39. package/src/plugins/kai/supplyPoolsJob.d.ts +3 -0
  40. package/src/plugins/kai/supplyPoolsJob.js +35 -0
  41. package/src/plugins/kai/supplyPoolsJob.js.map +1 -0
  42. package/src/plugins/kai/types.d.ts +107 -0
  43. package/src/plugins/kai/vaultsJob.js +19 -12
  44. package/src/plugins/kai/vaultsJob.js.map +1 -1
  45. package/src/plugins/metaplex/constants.d.ts +7 -0
  46. package/src/plugins/metaplex/constants.js +17 -0
  47. package/src/plugins/metaplex/constants.js.map +1 -0
  48. package/src/plugins/metaplex/helpers.d.ts +3 -0
  49. package/src/plugins/metaplex/helpers.js +19 -0
  50. package/src/plugins/metaplex/helpers.js.map +1 -0
  51. package/src/plugins/metaplex/index.d.ts +6 -0
  52. package/src/plugins/metaplex/index.js +12 -0
  53. package/src/plugins/metaplex/index.js.map +1 -0
  54. package/src/plugins/metaplex/resizableNftFetcher.d.ts +3 -0
  55. package/src/plugins/metaplex/resizableNftFetcher.js +75 -0
  56. package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -0
  57. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +2 -1
  58. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  59. package/src/plugins/native-stake/solana/types.d.ts +3 -1
  60. package/src/plugins/pyth/pricingJob.js +98 -2
  61. package/src/plugins/pyth/pricingJob.js.map +1 -1
  62. package/src/plugins/symmetry/basketsJob.js +8 -2
  63. package/src/plugins/symmetry/basketsJob.js.map +1 -1
  64. package/src/utils/solana/pyth/helpers.d.ts +11 -6
  65. package/src/utils/solana/pyth/helpers.js +13 -18
  66. package/src/utils/solana/pyth/helpers.js.map +1 -1
  67. package/src/utils/sui/constants.d.ts +2 -0
  68. package/src/utils/sui/constants.js +3 -1
  69. package/src/utils/sui/constants.js.map +1 -1
@@ -0,0 +1,75 @@
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 web3_js_1 = require("@solana/web3.js");
14
+ const constants_1 = require("./constants");
15
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
16
+ const clients_1 = require("../../utils/clients");
17
+ const solana_1 = require("../../utils/solana");
18
+ const helpers_1 = require("./helpers");
19
+ const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
20
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
21
+ var _a;
22
+ const client = (0, clients_1.getClientSolana)();
23
+ const asset = yield client.getTokenAccountsByOwner(new web3_js_1.PublicKey(owner), {
24
+ programId: new web3_js_1.PublicKey(solana_1.solanaTokenPid),
25
+ });
26
+ const tokenAccounts = asset.value.map((account) => solana_1.tokenAccountStruct.deserialize(account.account.data)[0]);
27
+ const metadataPubkeys = [];
28
+ const editionPubkeys = [];
29
+ tokenAccounts.forEach((account) => {
30
+ metadataPubkeys.push((0, helpers_1.getMetadataPubkey)(account.mint));
31
+ editionPubkeys.push((0, helpers_1.getEditionPubkeyOfNft)(account.mint));
32
+ });
33
+ const [editionAccounts, metadataAccounts] = yield Promise.all([
34
+ (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, editionPubkeys),
35
+ (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, metadataPubkeys),
36
+ ]);
37
+ let amount = 0;
38
+ let editionAccount;
39
+ for (let n = 0; n < metadataAccounts.length; n++) {
40
+ if (!metadataAccounts[n])
41
+ continue;
42
+ editionAccount = editionAccounts[n];
43
+ if (!editionAccount)
44
+ continue;
45
+ if (((_a = metadataAccounts[n]) === null || _a === void 0 ? void 0 : _a.data.byteLength) === 679) {
46
+ if (editionAccount.data.byteLength === 282) {
47
+ amount += constants_1.amountPerMasterEdition;
48
+ }
49
+ if (editionAccount.data.byteLength === 241) {
50
+ amount += constants_1.amountPerBasicEdition;
51
+ }
52
+ }
53
+ }
54
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
55
+ const element = elementRegistry.addElementMultiple({
56
+ label: 'Rewards',
57
+ name: 'Resize Program',
58
+ });
59
+ element.addAsset({
60
+ address: portfolio_core_1.solanaNativeAddress,
61
+ amount,
62
+ alreadyShifted: true,
63
+ attributes: {
64
+ isClaimable: true,
65
+ },
66
+ });
67
+ return elementRegistry.getElements(cache);
68
+ });
69
+ const fetcher = {
70
+ id: `${constants_1.platformId}-resize`,
71
+ networkId: portfolio_core_1.NetworkId.solana,
72
+ executor,
73
+ };
74
+ exports.default = fetcher;
75
+ //# sourceMappingURL=resizableNftFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resizableNftFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/metaplex/resizableNftFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAE5C,2CAIqB;AAErB,gFAA6E;AAC7E,iDAAsD;AACtD,+CAAwE;AACxE,uCAAqE;AACrE,gGAA6F;AAE7F,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GA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AC,CAAC,0CAAE,IAAI,CAAC,UAAU,MAAK,GAAG,EAAE,CAAC;YACjD,IAAI,cAAc,CAAC,IAAI,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC3C,MAAM,IAAI,kCAAsB,CAAC;YACnC,CAAC;YACD,IAAI,cAAc,CAAC,IAAI,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC3C,MAAM,IAAI,iCAAqB,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,gBAAgB;KACvB,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,oCAAmB;QAC5B,MAAM;QACN,cAAc,EAAE,IAAI;QACpB,UAAU,EAAE;YACV,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -34,7 +34,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
34
34
  jitoApy: r.jito_apy,
35
35
  stakingApy: r.staking_apy,
36
36
  totalApy: r.total_apy,
37
- commission: r.commission,
37
+ stakeCommission: r.commission / 100,
38
+ mevCommission: r.jito_commission_bps / 10000,
38
39
  }));
39
40
  yield cache.setItem(constants_1.validatorsKey, validators, {
40
41
  prefix: constants_1.platformId,
@@ -1 +1 @@
1
- {"version":3,"file":"solanaValidatorsJob.js","sourceRoot":"","sources":["../../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file":"solanaValidatorsJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaValidatorsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,4CAAyD;AACzD,2CAA0C;AAG1C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,MAAM,eAAK;SACpB,GAAG,CAAgD,uBAAW,EAAE;QAC/D,OAAO,EAAE,KAAK;KACf,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,MAAM,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAEnD,MAAM,UAAU,GAAgB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,KAAK,EAAE,CAAC,CAAC,aAAa;QACtB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,KAAK;QACjB,OAAO,EAAE,CAAC,CAAC,YAAY;QACvB,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,UAAU,EAAE,CAAC,CAAC,WAAW;QACzB,QAAQ,EAAE,CAAC,CAAC,SAAS;QACrB,eAAe,EAAE,CAAC,CAAC,UAAU,GAAG,GAAG;QACnC,aAAa,EAAE,CAAC,CAAC,mBAAmB,GAAG,KAAK;KAC7C,CAAC,CAAC,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,yBAAa,EAAE,UAAU,EAAE;QAC7C,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,oBAAoB;IACrC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -8,6 +8,7 @@ export type ValidatorApiResponse = {
8
8
  staking_apy: number;
9
9
  total_apy: number;
10
10
  commission: number;
11
+ jito_commission_bps: number;
11
12
  };
12
13
  export type Validator = {
13
14
  voter: string;
@@ -17,5 +18,6 @@ export type Validator = {
17
18
  jitoApy: number;
18
19
  stakingApy: number;
19
20
  totalApy: number;
20
- commission: number;
21
+ stakeCommission: number;
22
+ mevCommission: number;
21
23
  };
@@ -10,13 +10,109 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const web3_js_1 = require("@solana/web3.js");
13
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
14
  const constants_1 = require("./constants");
14
15
  const clients_1 = require("../../utils/clients");
15
16
  const helpers_1 = require("../../utils/solana/pyth/helpers");
17
+ const constants_2 = require("../../utils/sui/constants");
18
+ const solana_1 = require("../../utils/solana");
16
19
  const feedsToFetch = [
20
+ // SOL
17
21
  {
18
- feed: new web3_js_1.PublicKey('8QFEAwdamHFFRnj3Swnv1CkVNZBeFiVzraC548xhmpT5'),
19
- mint: new web3_js_1.PublicKey('ZScHuTtqZukUrtZS43teTKGs2VqkKL8k4QCouR2n6Uo'),
22
+ address: new web3_js_1.PublicKey('H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG'),
23
+ tokens: [
24
+ {
25
+ mint: portfolio_core_1.solanaNativeAddress,
26
+ decimals: portfolio_core_1.solanaNativeDecimals,
27
+ networkdId: portfolio_core_1.NetworkId.solana,
28
+ },
29
+ {
30
+ mint: portfolio_core_1.solanaNativeWrappedAddress,
31
+ decimals: portfolio_core_1.solanaNativeDecimals,
32
+ networkdId: portfolio_core_1.NetworkId.solana,
33
+ },
34
+ ],
35
+ },
36
+ // SUI
37
+ {
38
+ address: new web3_js_1.PublicKey('3Qub3HaAJaa2xNY7SUqPKd3vVwTqDfDDkEUMPjXD2c1q'),
39
+ tokens: [
40
+ {
41
+ mint: portfolio_core_1.suiNativeAddress,
42
+ decimals: portfolio_core_1.suiNativeDecimals,
43
+ networkdId: portfolio_core_1.NetworkId.sui,
44
+ },
45
+ {
46
+ mint: '0x2::sui::SUI',
47
+ decimals: portfolio_core_1.suiNativeDecimals,
48
+ networkdId: portfolio_core_1.NetworkId.sui,
49
+ },
50
+ ],
51
+ },
52
+ // APT
53
+ {
54
+ address: new web3_js_1.PublicKey('FNNvb1AFDnDVPkocEri8mWbJ1952HQZtFLuwPiUjSJQ'),
55
+ tokens: [
56
+ {
57
+ mint: portfolio_core_1.aptosNativeAddress,
58
+ decimals: portfolio_core_1.aptosNativeDecimals,
59
+ networkdId: portfolio_core_1.NetworkId.aptos,
60
+ },
61
+ ],
62
+ },
63
+ // USDC
64
+ {
65
+ address: new web3_js_1.PublicKey('Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD'),
66
+ tokens: [
67
+ {
68
+ mint: constants_2.wUsdcSuiType,
69
+ decimals: constants_2.wusdcSuiDecimals,
70
+ networkdId: portfolio_core_1.NetworkId.sui,
71
+ },
72
+ {
73
+ mint: constants_2.usdcSuiType,
74
+ decimals: constants_2.usdcSuiDecimals,
75
+ networkdId: portfolio_core_1.NetworkId.sui,
76
+ },
77
+ {
78
+ mint: solana_1.usdcSolanaMint,
79
+ decimals: solana_1.usdcSolanaDecimals,
80
+ networkdId: portfolio_core_1.NetworkId.solana,
81
+ },
82
+ ],
83
+ },
84
+ // USDT
85
+ {
86
+ address: new web3_js_1.PublicKey('3vxLXJqLqF3JG5TCbYycbKWRBbCJQLxQmBGCkyqEEefL'),
87
+ tokens: [
88
+ {
89
+ mint: 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB',
90
+ decimals: 6,
91
+ networkdId: portfolio_core_1.NetworkId.solana,
92
+ },
93
+ ],
94
+ },
95
+ // wsETH
96
+ {
97
+ address: new web3_js_1.PublicKey('8QFEAwdamHFFRnj3Swnv1CkVNZBeFiVzraC548xhmpT5'),
98
+ tokens: [
99
+ {
100
+ mint: 'ZScHuTtqZukUrtZS43teTKGs2VqkKL8k4QCouR2n6Uo',
101
+ decimals: 8,
102
+ networkdId: portfolio_core_1.NetworkId.solana,
103
+ },
104
+ ],
105
+ },
106
+ // MOD
107
+ {
108
+ address: new web3_js_1.PublicKey('BNnzTdorVyW4ttRAoXvohD46Q8ycN8LCHz2CGV4pUH7S'),
109
+ tokens: [
110
+ {
111
+ mint: '0x6f986d146e4a90b828d8c12c14b6f4e003fdff11a8eecceceb63744363eaac01::mod_coin::MOD',
112
+ decimals: 8,
113
+ networkdId: portfolio_core_1.NetworkId.aptos,
114
+ },
115
+ ],
20
116
  },
21
117
  ];
22
118
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6CAA4C;AAG5C,2CAAyC;AACzC,iDAAsD;AACtD,6DAA2E;AAE3E,MAAM,YAAY,GAAG;IACnB;QACE,IAAI,EAAE,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QACnE,IAAI,EAAE,IAAI,mBAAS,CAAC,6CAA6C,CAAC;KACnE;CACF,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,OAAO,GAAG,MAAM,IAAA,kCAAwB,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACzE,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/pyth/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,6CAA4C;AAC5C,+DASoC;AAGpC,2CAAyC;AACzC,iDAAsD;AACtD,6DAGyC;AACzC,yDAKmC;AACnC,+CAAwE;AAExE,MAAM,YAAY,GAAe;IAC/B,MAAM;IACN;QACE,OAAO,EAAE,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QACtE,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,oCAAmB;gBACzB,QAAQ,EAAE,qCAAoB;gBAC9B,UAAU,EAAE,0BAAS,CAAC,MAAM;aAC7B;YACD;gBACE,IAAI,EAAE,2CAA0B;gBAChC,QAAQ,EAAE,qCAAoB;gBAC9B,UAAU,EAAE,0BAAS,CAAC,MAAM;aAC7B;SACF;KACF;IACD,MAAM;IACN;QACE,OAAO,EAAE,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QACtE,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,iCAAgB;gBACtB,QAAQ,EAAE,kCAAiB;gBAC3B,UAAU,EAAE,0BAAS,CAAC,GAAG;aAC1B;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,QAAQ,EAAE,kCAAiB;gBAC3B,UAAU,EAAE,0BAAS,CAAC,GAAG;aAC1B;SACF;KACF;IACD,MAAM;IACN;QACE,OAAO,EAAE,IAAI,mBAAS,CAAC,6CAA6C,CAAC;QACrE,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,mCAAkB;gBACxB,QAAQ,EAAE,oCAAmB;gBAC7B,UAAU,EAAE,0BAAS,CAAC,KAAK;aAC5B;SACF;KACF;IACD,OAAO;IACP;QACE,OAAO,EAAE,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QACtE,MAAM,EAAE;YACN;gBACE,IAAI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IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -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,MAA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,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"}
@@ -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/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAC5C,+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,CAA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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC;CAAA;AALD,oCAKC;AAYD,SAAsB,wBAAwB,CAC5C,UAAwB,EACxB,SAAqB;;QAErB,MAAM,MAAM,GAAG,MAAM,aAAa,CAChC,UAAU,EACV,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CACtC,CAAC;QAEF,OAAO,SAAS;aACb,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,EAA6B,EAAE;YAC9C,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3B,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC;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"}