@sonarwatch/portfolio-plugins 0.14.151 → 0.14.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +2232 -2228
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/allbridge/constants.d.ts +0 -6
  5. package/src/plugins/allbridge/constants.js +1 -9
  6. package/src/plugins/allbridge/constants.js.map +1 -1
  7. package/src/plugins/allbridge/helpers.d.ts +1 -1
  8. package/src/plugins/allbridge/helpers.js +1 -3
  9. package/src/plugins/allbridge/helpers.js.map +1 -1
  10. package/src/plugins/allbridge/positionsFetcher.js +2 -1
  11. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  12. package/src/plugins/allbridge/structs.d.ts +13 -0
  13. package/src/plugins/allbridge/structs.js +14 -0
  14. package/src/plugins/allbridge/structs.js.map +1 -0
  15. package/src/plugins/allbridge/types.d.ts +0 -6
  16. package/src/plugins/balancer/helpers/pools.js +21 -21
  17. package/src/plugins/bonfida/constants.js +1 -1
  18. package/src/plugins/bonfida/constants.js.map +1 -1
  19. package/src/plugins/divvy/constants.d.ts +0 -2
  20. package/src/plugins/divvy/constants.js +1 -7
  21. package/src/plugins/divvy/constants.js.map +1 -1
  22. package/src/plugins/divvy/houseJob.js +6 -3
  23. package/src/plugins/divvy/houseJob.js.map +1 -1
  24. package/src/plugins/divvy/housePoolFetcher.js +9 -11
  25. package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
  26. package/src/plugins/divvy/stakingFetcher.js +7 -12
  27. package/src/plugins/divvy/stakingFetcher.js.map +1 -1
  28. package/src/plugins/divvy/structs.d.ts +57 -0
  29. package/src/plugins/divvy/structs.js +57 -0
  30. package/src/plugins/divvy/structs.js.map +1 -0
  31. package/src/plugins/elemental/constants.d.ts +4 -2
  32. package/src/plugins/elemental/constants.js +3 -7
  33. package/src/plugins/elemental/constants.js.map +1 -1
  34. package/src/plugins/elemental/filters.d.ts +0 -1
  35. package/src/plugins/elemental/filters.js +1 -6
  36. package/src/plugins/elemental/filters.js.map +1 -1
  37. package/src/plugins/elemental/helpers.js +2 -2
  38. package/src/plugins/elemental/helpers.js.map +1 -1
  39. package/src/plugins/elemental/poolsJob.js +4 -4
  40. package/src/plugins/elemental/poolsJob.js.map +1 -1
  41. package/src/plugins/ensofi/constants.d.ts +4 -2
  42. package/src/plugins/ensofi/constants.js +3 -7
  43. package/src/plugins/ensofi/constants.js.map +1 -1
  44. package/src/plugins/ensofi/idl.d.ts +149 -6
  45. package/src/plugins/ensofi/idl.js +1074 -61
  46. package/src/plugins/ensofi/idl.js.map +1 -1
  47. package/src/plugins/ensofi/solanaLoansFetcher.js +23 -37
  48. package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
  49. package/src/plugins/ensofi/structs.d.ts +58 -0
  50. package/src/plugins/ensofi/structs.js +60 -0
  51. package/src/plugins/ensofi/structs.js.map +1 -0
  52. package/src/plugins/jupiter/governance/constants.js +3 -3
  53. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  54. package/src/plugins/jupiter/launchpad/constants.d.ts +1 -0
  55. package/src/plugins/jupiter/launchpad/constants.js +8 -7
  56. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  57. package/src/plugins/jupiter/pricingJob.js +2 -1
  58. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  59. package/src/plugins/orca/getWhirlpoolPositions.js +7 -7
  60. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  61. package/src/plugins/orca/types.d.ts +2 -0
  62. package/src/plugins/picasso/constants.d.ts +0 -2
  63. package/src/plugins/picasso/constants.js +1 -7
  64. package/src/plugins/picasso/constants.js.map +1 -1
  65. package/src/plugins/picasso/helpers.js +7 -4
  66. package/src/plugins/picasso/helpers.js.map +1 -1
  67. package/src/plugins/picasso/structs.d.ts +39 -0
  68. package/src/plugins/picasso/structs.js +37 -0
  69. package/src/plugins/picasso/structs.js.map +1 -0
  70. package/src/plugins/picasso/unstakingNftsJob.js +2 -1
  71. package/src/plugins/picasso/unstakingNftsJob.js.map +1 -1
  72. package/src/plugins/picasso/unstakingPositionsFetcher.js +4 -4
  73. package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
  74. package/src/plugins/raydium/ammV2ApiJob.js +24 -0
  75. package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
  76. package/src/plugins/raydium/constants.d.ts +1 -0
  77. package/src/plugins/raydium/constants.js +2 -1
  78. package/src/plugins/raydium/constants.js.map +1 -1
  79. package/src/plugins/raydium/getRaydiumCLMMPositions.js +9 -5
  80. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  81. package/src/plugins/raydium/types.d.ts +14 -4
  82. package/src/plugins/sanctum/s1AirdropFetcher.js +2 -2
  83. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  84. package/src/plugins/sharky/collectionsJob.js +8 -9
  85. package/src/plugins/sharky/collectionsJob.js.map +1 -1
  86. package/src/plugins/sharky/constants.d.ts +0 -2
  87. package/src/plugins/sharky/constants.js +1 -7
  88. package/src/plugins/sharky/constants.js.map +1 -1
  89. package/src/plugins/sharky/loansFetcher.js +25 -19
  90. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  91. package/src/plugins/sharky/structs.d.ts +96 -0
  92. package/src/plugins/sharky/structs.js +103 -0
  93. package/src/plugins/sharky/structs.js.map +1 -0
  94. package/src/plugins/sharky/types.d.ts +0 -15
  95. package/src/plugins/sharky/types.js +0 -8
  96. package/src/plugins/sharky/types.js.map +1 -1
  97. package/src/plugins/stabble/constants.d.ts +0 -3
  98. package/src/plugins/stabble/constants.js +1 -13
  99. package/src/plugins/stabble/constants.js.map +1 -1
  100. package/src/plugins/stabble/poolsJob.js +14 -9
  101. package/src/plugins/stabble/poolsJob.js.map +1 -1
  102. package/src/plugins/stabble/structs.d.ts +43 -0
  103. package/src/plugins/stabble/structs.js +42 -0
  104. package/src/plugins/stabble/structs.js.map +1 -0
  105. package/src/plugins/sushiswap/helpers.js +24 -24
  106. package/src/plugins/uniswap-v2/helpers.js +22 -22
  107. package/src/utils/sei/constants.js +8 -8
  108. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  109. package/src/utils/solana/beets/ParsedGpa.d.ts +1 -0
  110. package/src/utils/solana/beets/ParsedGpa.js +9 -0
  111. package/src/utils/solana/beets/ParsedGpa.js.map +1 -1
  112. package/src/plugins/divvy/types.d.ts +0 -28
  113. package/src/plugins/divvy/types.js +0 -3
  114. package/src/plugins/divvy/types.js.map +0 -1
  115. package/src/plugins/picasso/types.d.ts +0 -17
  116. package/src/plugins/picasso/types.js +0 -3
  117. package/src/plugins/picasso/types.js.map +0 -1
  118. package/src/plugins/sharky/filters.d.ts +0 -8
  119. package/src/plugins/sharky/filters.js +0 -43
  120. package/src/plugins/sharky/filters.js.map +0 -1
  121. package/src/plugins/stabble/filters.d.ts +0 -5
  122. package/src/plugins/stabble/filters.js +0 -20
  123. package/src/plugins/stabble/filters.js.map +0 -1
  124. package/src/plugins/stabble/types.d.ts +0 -40
  125. package/src/plugins/stabble/types.js +0 -3
  126. package/src/plugins/stabble/types.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.airdropConfigs = exports.lfgDisProgram = exports.lfgApiBaseUrl = exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.platform = exports.platformId = void 0;
3
+ exports.airdropConfigs = exports.lfgDisProgram = exports.lfgApiBaseUrl = exports.jupApiToken = exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  const constants_1 = require("../../kamino/constants");
6
6
  exports.platformId = 'jupiter-launchpad';
@@ -17,6 +17,7 @@ exports.voteProgramId = new web3_js_1.PublicKey('voTpe3tHQ7AjQHMapgSue2HJFAh2cGs
17
17
  exports.lockerPubkey = new web3_js_1.PublicKey('CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN');
18
18
  exports.jupMint = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
19
19
  exports.jupDecimals = 6;
20
+ exports.jupApiToken = process.env['PORTFOLIO_JUP_API_PARAM'];
20
21
  exports.lfgApiBaseUrl = 'https://worker.jup.ag/jup-claim-proof';
21
22
  exports.lfgDisProgram = 'DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j';
22
23
  exports.airdropConfigs = [
@@ -26,7 +27,7 @@ exports.airdropConfigs = [
26
27
  distributorProgram: 'meRjbQXFNf5En86FXT2YPz1dQzLj4Yb3xK8u1MVgqpb',
27
28
  label: 'JUP',
28
29
  platformId: exports.platformId,
29
- getApiPath: (owner) => `${exports.lfgApiBaseUrl}/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN/${owner}`,
30
+ getApiPath: (owner) => `${exports.lfgApiBaseUrl}/JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
30
31
  statics: {
31
32
  claimStart: 1706659200000,
32
33
  claimEnd: 1722430800000,
@@ -44,7 +45,7 @@ exports.airdropConfigs = [
44
45
  distributorProgram: exports.lfgDisProgram,
45
46
  label: 'ZEUS',
46
47
  platformId: exports.platformId,
47
- getApiPath: (owner) => `${exports.lfgApiBaseUrl}/ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq/${owner}`,
48
+ getApiPath: (owner) => `${exports.lfgApiBaseUrl}/ZEUS1aR7aX8DFFJf5QjWj2ftDDdNTroMNGo8YoQm3Gq/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
48
49
  statics: {
49
50
  claimStart: 1712235600000,
50
51
  claimEnd: 1713445200000,
@@ -61,7 +62,7 @@ exports.airdropConfigs = [
61
62
  distributorProgram: exports.lfgDisProgram,
62
63
  label: 'TNSR',
63
64
  platformId: exports.platformId,
64
- getApiPath: (owner) => `${exports.lfgApiBaseUrl}/TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6/${owner}`,
65
+ getApiPath: (owner) => `${exports.lfgApiBaseUrl}/TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
65
66
  statics: {
66
67
  claimStart: 1712534400000,
67
68
  claimEnd: 1728086400000,
@@ -78,7 +79,7 @@ exports.airdropConfigs = [
78
79
  distributorProgram: exports.lfgDisProgram,
79
80
  label: 'SHARKY',
80
81
  platformId: exports.platformId,
81
- getApiPath: (owner) => `${exports.lfgApiBaseUrl}/SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s/${owner}`,
82
+ getApiPath: (owner) => `${exports.lfgApiBaseUrl}/SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
82
83
  statics: {
83
84
  claimStart: 1713225600000,
84
85
  claimEnd: 1714435200000,
@@ -95,7 +96,7 @@ exports.airdropConfigs = [
95
96
  distributorProgram: exports.lfgDisProgram,
96
97
  label: 'UPT',
97
98
  platformId: exports.platformId,
98
- getApiPath: (owner) => `${exports.lfgApiBaseUrl}/UPTx1d24aBWuRgwxVnFmX4gNraj3QGFzL3QqBgxtWQG/${owner}`,
99
+ getApiPath: (owner) => `${exports.lfgApiBaseUrl}/UPTx1d24aBWuRgwxVnFmX4gNraj3QGFzL3QqBgxtWQG/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
99
100
  statics: {
100
101
  claimStart: 1717077600000,
101
102
  claimEnd: 1719878400000,
@@ -130,7 +131,7 @@ exports.airdropConfigs = [
130
131
  distributorProgram: 'DiS3nNjFVMieMgmiQFm6wgJL7nevk4NrhXKLbtEH1Z2R',
131
132
  label: 'JUP',
132
133
  platformId: exports.platformId,
133
- getApiPath: (owner) => `https://jupuary-api.jup.ag/claim-proof-2025/${owner}`,
134
+ getApiPath: (owner) => `https://jupuary-api.jup.ag/claim-proof-2025/${owner}?${exports.jupApiToken !== null && exports.jupApiToken !== void 0 ? exports.jupApiToken : ''}`,
134
135
  statics: {
135
136
  claimStart: 1737547200000,
136
137
  claimEnd: 1745323200000,
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,sDAAwE;AAE3D,QAAA,UAAU,GAAG,mBAAmB,CAAC;AAC9C,MAAM,aAAa,GAAG,gDAAgD,CAAC;AAC1D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;IAC9C,WAAW,EAAE,2CAA2C;CACzD,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,aAAa,GAAG,uCAAuC,CAAC;AACxD,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAE/D,QAAA,cAAc,GAAoB;IAC7C;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,6CAA6C;QACjE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU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BAAkB,EAAE,8CAA8C;QAClE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,+CAA+C,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,iCAAiC;YACrC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,yBAAyB;YACpC,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,cAAc;SACrB;KACF;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,sDAAwE;AAE3D,QAAA,UAAU,GAAG,mBAAmB,CAAC;AAC9C,MAAM,aAAa,GAAG,gDAAgD,CAAC;AAC1D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,qCAAqC;IAC9C,WAAW,EAAE,2CAA2C;CACzD,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AACrD,QAAA,aAAa,GAAG,uCAAuC,CAAC;AACxD,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAE/D,QAAA,cAAc,GAAoB;IAC7C;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,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a,EAAE,EAAE,CAC5B,+CAA+C,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,WAAW;YACf,WAAW,EAAE,QAAQ;YACrB,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,6CAA6C;YACxD,KAAK,EACH,4EAA4E;YAC9E,IAAI,EAAE,IAAI;SACX;KACF;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB,EAAE,8CAA8C;QAClE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,+CAA+C,KAAK,IAClD,mBAAW,aAAX,mBAAW,cAAX,mBAAW,GAAI,EACjB,EAAE;QACJ,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,iCAAiC;YACrC,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,yBAAyB;YACpC,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,cAAc;SACrB;KACF;CACF,CAAC"}
@@ -22,6 +22,7 @@ const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecima
22
22
  const clients_1 = require("../../utils/clients");
23
23
  const constants_3 = require("../sanctum/constants");
24
24
  const solana_1 = require("../../utils/solana");
25
+ const constants_4 = require("./launchpad/constants");
25
26
  const mints = [
26
27
  'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
27
28
  'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
@@ -53,7 +54,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
53
54
  const connection = (0, clients_1.getClientSolana)();
54
55
  const [solSources, verifiedTokens] = yield Promise.all([
55
56
  (0, helpers_1.getJupiterPrices)([new web3_js_1.PublicKey(vsToken)], new web3_js_1.PublicKey(solana_1.usdcSolanaMint)),
56
- axios_1.default.get('https://tokens.jup.ag/tokens?tags=verified'),
57
+ axios_1.default.get(`https://tokens.jup.ag/tokens?tags=verified&${constants_4.jupApiToken !== null && constants_4.jupApiToken !== void 0 ? constants_4.jupApiToken : ''}`),
57
58
  ]);
58
59
  const solPrice = solSources.get(vsToken);
59
60
  if (!solPrice)
@@ -1 +1 @@
1
- {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAC5C,kDAA0B;AAG1B,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AACtD,oDAAgF;AAChF,+CAAoD;AAGpD,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,6BAA6B;IAC7E,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,+BAA+B;IAC/E,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,MAAM;IACrD,6CAA6C,EAAE,SAAS;CACzD,CAAC;AACF,MAAM,OAAO,GAAG,2CAA0B,CAAC;AAE3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,YAAY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GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,MAAM,GAAqB;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,EAAE,EAAE,gCAAe;YACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,KAAK;YAClC,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,MAAM,EAAE,CAAC;SACV,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,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,MAAM,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -77,13 +77,6 @@ function getOrcaNftFetcher(platformId, programId) {
77
77
  continue;
78
78
  const element = elementRegistry.addElementConcentratedLiquidity({
79
79
  link: 'https://www.orca.so/portfolio',
80
- ref: positionInfo.pubkey.toString(),
81
- sourceRefs: [
82
- {
83
- name: 'Pool',
84
- address: whirlpoolInfo.pubkey.toString(),
85
- },
86
- ],
87
80
  });
88
81
  const liquidity = element.setLiquidity({
89
82
  addressA: whirlpoolInfo.tokenMintA,
@@ -97,6 +90,13 @@ function getOrcaNftFetcher(platformId, programId) {
97
90
  feeRate: (Number(whirlpoolInfo.feeRate) / 10000) *
98
91
  (1 - whirlpoolInfo.protocolFeeRate / 10000),
99
92
  swapVolume24h: (_a = allWhirlpoolsStats.find((p) => (p === null || p === void 0 ? void 0 : p.address) === positionInfo.whirlpool.toString())) === null || _a === void 0 ? void 0 : _a.stats['24h'].volume,
93
+ ref: positionInfo.pubkey.toString(),
94
+ sourceRefs: [
95
+ {
96
+ name: 'Pool',
97
+ address: whirlpoolInfo.pubkey.toString(),
98
+ },
99
+ ],
100
100
  });
101
101
  const feesAndRewards = (0, helpers_fees_1.calcFeesAndRewards)(whirlpoolInfo, positionInfo, tickArrays);
102
102
  if (feesAndRewards) {
@@ -1 +1 @@
1
- {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAEhE,iDAAwE;AACxE,gFAA6E;AAGhE,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCA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ACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,MAAM,EAAE,cAAc,CAAC,WAAW;iBACnC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAA,CAAC;AACJ,CAAC;AA9ID,8CA8IC"}
1
+ {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAEhE,iDAAwE;AACxE,gFAA6E;AAGhE,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO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;iBACnC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,MAAM,EAAE,cAAc,CAAC,WAAW;iBACnC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAA,CAAC;AACJ,CAAC;AA9ID,8CA8IC"}
@@ -7,4 +7,6 @@ export type WhirlpoolStat = {
7
7
  };
8
8
  };
9
9
  tvlUsdc: string;
10
+ apr?: string;
11
+ feeRate?: number;
10
12
  };
@@ -1,7 +1,6 @@
1
1
  /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
3
  import { Platform } from '@sonarwatch/portfolio-core';
4
- import { IdlItem } from '@solanafm/explorer-kit-idls';
5
4
  import { PublicKey } from '@solana/web3.js';
6
5
  export declare const platformId = "picasso";
7
6
  export declare const platform: Platform;
@@ -9,4 +8,3 @@ export declare const unstakingNftsCacheKey = "unstaking-nfts";
9
8
  export declare const unstakingNftsCachePrefix = "picasso";
10
9
  export declare const restakingProgramId: PublicKey;
11
10
  export declare const unstakingOwner = "BoNnRkatYrN7ckA9oAU4e7cHYfwKPgLEuzkKg4LWaHeH";
12
- export declare const restakingIdlItem: IdlItem;
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.restakingIdlItem = exports.unstakingOwner = exports.restakingProgramId = exports.unstakingNftsCachePrefix = exports.unstakingNftsCacheKey = exports.platform = exports.platformId = void 0;
3
+ exports.unstakingOwner = exports.restakingProgramId = exports.unstakingNftsCachePrefix = exports.unstakingNftsCacheKey = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
- const idl_1 = require("./idl");
6
5
  exports.platformId = 'picasso';
7
6
  exports.platform = {
8
7
  id: exports.platformId,
@@ -23,9 +22,4 @@ exports.unstakingNftsCacheKey = `unstaking-nfts`;
23
22
  exports.unstakingNftsCachePrefix = `${exports.platformId}`;
24
23
  exports.restakingProgramId = new web3_js_1.PublicKey('8n3FHwYxFgQCQc2FNFkwDUf9mcqupxXcCvgfHbApMLv3');
25
24
  exports.unstakingOwner = 'BoNnRkatYrN7ckA9oAU4e7cHYfwKPgLEuzkKg4LWaHeH';
26
- exports.restakingIdlItem = {
27
- programId: exports.restakingProgramId.toString(),
28
- idl: idl_1.restakingIdl,
29
- idlType: 'anchor',
30
- };
31
25
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/constants.ts"],"names":[],"mappings":";;;AAEA,6CAA4C;AAC5C,+BAAqC;AAExB,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EACH,6EAA6E;IAC/E,OAAO,EAAE,6CAA6C;IACtD,OAAO,EAAE,+BAA+B;IACxC,4EAA4E;IAC5E,OAAO,EAAE,uCAAuC;IAChD,QAAQ,EAAE,6BAA6B;IACvC,MAAM,EAAE,iCAAiC;IACzC,aAAa,EAAE,+BAA+B;IAC9C,MAAM,EAAE,qCAAqC;IAC7C,MAAM,EAAE,CAAC,8CAA8C,CAAC;IACxD,WAAW,EACT,iIAAiI;CACpI,CAAC;AAEW,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AACzC,QAAA,wBAAwB,GAAG,GAAG,kBAAU,EAAE,CAAC;AAE3C,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAEhE,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,0BAAkB,CAAC,QAAQ,EAAE;IACxC,GAAG,EAAE,kBAAY;IACjB,OAAO,EAAE,QAAQ;CACP,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EACH,6EAA6E;IAC/E,OAAO,EAAE,6CAA6C;IACtD,OAAO,EAAE,+BAA+B;IACxC,4EAA4E;IAC5E,OAAO,EAAE,uCAAuC;IAChD,QAAQ,EAAE,6BAA6B;IACvC,MAAM,EAAE,iCAAiC;IACzC,aAAa,EAAE,+BAA+B;IAC9C,MAAM,EAAE,qCAAqC;IAC7C,MAAM,EAAE,CAAC,8CAA8C,CAAC;IACxD,WAAW,EACT,iIAAiI;CACpI,CAAC;AAEW,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AACzC,QAAA,wBAAwB,GAAG,GAAG,kBAAU,EAAE,CAAC;AAE3C,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,8CAA8C,CAAC"}
@@ -20,6 +20,7 @@ const constants_1 = require("./constants");
20
20
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
21
21
  const solana_1 = require("../../utils/solana");
22
22
  const clients_1 = require("../../utils/clients");
23
+ const structs_1 = require("./structs");
23
24
  const getPositionPublicKey = (ei) => {
24
25
  const [vaultParamsPDA] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('vault_params', 'utf-8'), ei.toBuffer()], constants_1.restakingProgramId);
25
26
  return vaultParamsPDA;
@@ -30,22 +31,24 @@ exports.isPicassoPosition = isPicassoPosition;
30
31
  function getPicassoElementsFromNFTs(cache, nfts) {
31
32
  return __awaiter(this, void 0, void 0, function* () {
32
33
  const connection = (0, clients_1.getClientSolana)();
33
- const vaults = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.restakingIdlItem, nfts.map((asset) => (0, exports.getPositionPublicKey)(new web3_js_1.PublicKey(asset.data.address))));
34
+ const vaults = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.vaultStruct, nfts.map((asset) => (0, exports.getPositionPublicKey)(new web3_js_1.PublicKey(asset.data.address))));
34
35
  const heliusAssetsPositions = nfts.filter((item, i) => vaults[i]);
35
36
  if (heliusAssetsPositions.length === 0)
36
37
  return [];
37
38
  const tokenMints = [
38
- ...new Set(heliusAssetsPositions.map((item, i) => { var _a; return (_a = vaults[i]) === null || _a === void 0 ? void 0 : _a.stakeMint; }).flat()),
39
+ ...new Set(heliusAssetsPositions
40
+ .map((item, i) => { var _a; return (_a = vaults[i]) === null || _a === void 0 ? void 0 : _a.stakeMint.toString(); })
41
+ .flat()),
39
42
  ].filter((s) => s !== null);
40
43
  const tokenPrices = yield cache.getTokenPricesAsMap(tokenMints, portfolio_core_1.NetworkId.solana);
41
44
  const assets = [];
42
45
  heliusAssetsPositions.forEach((item, i) => {
43
46
  const vault = vaults[i];
44
47
  if (vault) {
45
- const tokenPrice = tokenPrices.get(vault.stakeMint);
48
+ const tokenPrice = tokenPrices.get(vault.stakeMint.toString());
46
49
  if (!tokenPrice)
47
50
  return;
48
- assets.push((0, tokenPriceToAssetToken_1.default)(vault.stakeMint, new bignumber_js_1.default(vault.stakeAmount)
51
+ assets.push((0, tokenPriceToAssetToken_1.default)(vault.stakeMint.toString(), new bignumber_js_1.default(vault.stakeAmount)
49
52
  .dividedBy(Math.pow(10, tokenPrice.decimals))
50
53
  .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice));
51
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4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,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,EAAE;gBACJ,MAAM;aACP;SACF,CAAC;QACF,OAAO,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CAAA;AA9DD,gEA8DC"}
@@ -0,0 +1,39 @@
1
+ /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
+ /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ import { BeetStruct, DataEnumKeyAsKind, FixableBeetStruct, COption } from '@metaplex-foundation/beet';
6
+ type ServiceRecord = {
7
+ GuestChain: {
8
+ validator: PublicKey;
9
+ };
10
+ };
11
+ type Service = DataEnumKeyAsKind<ServiceRecord>;
12
+ export type WithdrawalRequestParams = {
13
+ timestampInSec: BigNumber;
14
+ owner: PublicKey;
15
+ tokenAccount: PublicKey;
16
+ };
17
+ export declare const withdrawalRequestParamsStruct: BeetStruct<WithdrawalRequestParams, Partial<WithdrawalRequestParams>>;
18
+ export type Vault = {
19
+ accountDiscriminator: number[];
20
+ stakeTimestampSec: BigNumber;
21
+ service: COption<Service>;
22
+ stakeAmount: BigNumber;
23
+ stakeMint: PublicKey;
24
+ lastReceivedRewardsHeight: BigNumber;
25
+ withdrawalRequest: COption<WithdrawalRequestParams>;
26
+ };
27
+ export declare const vaultStruct: FixableBeetStruct<Vault, Partial<Vault>>;
28
+ export type StakingParams = {
29
+ accountDiscriminator: number[];
30
+ admin: PublicKey;
31
+ whitelistedTokens: PublicKey[];
32
+ guestChainProgramId?: PublicKey;
33
+ rewardsTokenMint: PublicKey;
34
+ stakingCap: BigNumber;
35
+ totalDepositedAmount: BigNumber;
36
+ newAdminProposal?: PublicKey;
37
+ };
38
+ export declare const stakingParamsStruct: BeetStruct<StakingParams, Partial<StakingParams>>;
39
+ export {};
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stakingParamsStruct = exports.vaultStruct = exports.withdrawalRequestParamsStruct = 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
+ const serviceStruct = (0, beet_1.dataEnum)([
8
+ [
9
+ 'GuestChain',
10
+ new beet_1.FixableBeetArgsStruct([['validator', beet_solana_1.publicKey]], 'ServiceRecord["GuestChain"]'),
11
+ ],
12
+ ]);
13
+ exports.withdrawalRequestParamsStruct = new beet_1.BeetStruct([
14
+ ['timestampInSec', solana_1.u64],
15
+ ['owner', beet_solana_1.publicKey],
16
+ ['tokenAccount', beet_solana_1.publicKey],
17
+ ], (args) => args);
18
+ exports.vaultStruct = new beet_1.FixableBeetStruct([
19
+ ['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
20
+ ['stakeTimestampSec', solana_1.i64],
21
+ ['service', (0, beet_1.coption)(serviceStruct)],
22
+ ['stakeAmount', solana_1.u64],
23
+ ['stakeMint', beet_solana_1.publicKey],
24
+ ['lastReceivedRewardsHeight', solana_1.u64],
25
+ ['withdrawalRequest', (0, beet_1.coption)(exports.withdrawalRequestParamsStruct)],
26
+ ], (args) => args);
27
+ exports.stakingParamsStruct = new beet_1.BeetStruct([
28
+ ['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
29
+ ['admin', beet_solana_1.publicKey],
30
+ ['whitelistedTokens', (0, beet_1.uniformFixedSizeArray)(beet_solana_1.publicKey, 10)], // Adjust size if needed
31
+ ['guestChainProgramId', beet_solana_1.publicKey],
32
+ ['rewardsTokenMint', beet_solana_1.publicKey],
33
+ ['stakingCap', solana_1.u128],
34
+ ['totalDepositedAmount', solana_1.u128],
35
+ ['newAdminProposal', beet_solana_1.publicKey],
36
+ ], (args) => args);
37
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/structs.ts"],"names":[],"mappings":";;;AAEA,oDAWmC;AACnC,kEAA6D;AAC7D,+CAAoD;AASpD,MAAM,aAAa,GAAG,IAAA,eAAQ,EAAgB;IAC5C;QACE,YAAY;QACZ,IAAI,4BAAqB,CACvB,CAAC,CAAC,WAAW,EAAE,uBAAS,CAAC,CAAC,EAC1B,6BAA6B,CAC9B;KACF;CACF,CAAyB,CAAC;AAQd,QAAA,6BAA6B,GACxC,IAAI,iBAAU,CACZ;IACE,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,cAAc,EAAE,uBAAS,CAAC;CAC5B,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA+B,CAC1C,CAAC;AAaS,QAAA,WAAW,GAAG,IAAI,wBAAiB,CAC9C;IACE,CAAC,sBAAsB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,SAAS,EAAE,IAAA,cAAO,EAAC,aAAa,CAAC,CAAC;IACnC,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,2BAA2B,EAAE,YAAG,CAAC;IAClC,CAAC,mBAAmB,EAAE,IAAA,cAAO,EAAC,qCAA6B,CAAC,CAAC;CAC9D,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,CAAC;AAaW,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,sBAAsB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,mBAAmB,EAAE,IAAA,4BAAqB,EAAC,uBAAS,EAAE,EAAE,CAAC,CAAC,EAAE,wBAAwB;IACrF,CAAC,qBAAqB,EAAE,uBAAS,CAAC;IAClC,CAAC,kBAAkB,EAAE,uBAAS,CAAC;IAC/B,CAAC,YAAY,EAAE,aAAI,CAAC;IACpB,CAAC,sBAAsB,EAAE,aAAI,CAAC;IAC9B,CAAC,kBAAkB,EAAE,uBAAS,CAAC;CAChC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC"}
@@ -21,6 +21,7 @@ const heliusAssetToAssetCollectible_1 = require("../../utils/solana/das/heliusAs
21
21
  const clients_1 = require("../../utils/clients");
22
22
  const solana_1 = require("../../utils/solana");
23
23
  const helpers_1 = require("./helpers");
24
+ const structs_1 = require("./structs");
24
25
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
25
26
  var _a;
26
27
  const dasEndpoint = (0, getSolanaDasEndpoint_1.default)();
@@ -45,7 +46,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
45
46
  nfts.push(nft);
46
47
  }
47
48
  const connection = (0, clients_1.getClientSolana)();
48
- const vaults = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, constants_1.restakingIdlItem, nfts.map((asset) => (0, helpers_1.getPositionPublicKey)(new web3_js_1.PublicKey(asset.data.address)))).then((vs) => vs.filter((v) => v !== null));
49
+ const vaults = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.vaultStruct, nfts.map((asset) => (0, helpers_1.getPositionPublicKey)(new web3_js_1.PublicKey(asset.data.address)))).then((vs) => vs.filter((v) => v !== null));
49
50
  yield cache.setItem(constants_1.unstakingNftsCacheKey, vaults, {
50
51
  prefix: constants_1.unstakingNftsCachePrefix,
51
52
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"unstakingNftsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso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BAAoB,EAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAC7E,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAE7C,MAAM,KAAK,CAAC,OAAO,CAAC,iCAAqB,EAAE,MAAM,EAAE;QACjD,MAAM,EAAE,oCAAwB;QAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"unstakingNftsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingNftsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAGoC;AACpC,6CAA4C;AAG5C,2CAKqB;AACrB,oGAA4E;AAE5E,oFAAiF;AACjF,wGAAqG;AACrG,iDAAsD;AACtD,+CAAmE;AACnE,uCAAoE;AACpE,uCAAwC;AAExC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,WAAW,GAAG,IAAA,8BAAoB,GAAE,CAAC;IAC3C,MAAM,cAAc,GAAmB;QACrC,sBAAsB,EAAE,IAAI;QAC5B,yBAAyB,EAAE,IAAI;QAC/B,eAAe,EAAE,KAAK;QACtB,iBAAiB,EAAE,KAAK;QACxB,cAAc,EAAE,KAAK;QACrB,YAAY,EAAE,IAAI;KACnB,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,IAAA,yCAAmB,EACtC,WAAW,EACX,0BAAc,EACd,cAAc,CACf,CAAC;IAEF,MAAM,IAAI,GAAgC,EAAE,CAA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* (
27
27
  const allVaults = yield allVaultsMemo.getItem(cache);
28
28
  if (!allVaults)
29
29
  throw new Error('Vaults not cached');
30
- const myVaults = allVaults.filter((v) => { var _a; return ((_a = v.withdrawalRequest) === null || _a === void 0 ? void 0 : _a.owner) === owner; });
30
+ const myVaults = allVaults.filter((v) => { var _a; return ((_a = v.withdrawalRequest) === null || _a === void 0 ? void 0 : _a.owner.toString()) === owner; });
31
31
  if (myVaults.length === 0)
32
32
  return [];
33
33
  const tokenMints = [
34
- ...new Set(myVaults.map((vault) => vault.stakeMint).flat()),
34
+ ...new Set(myVaults.map((vault) => vault.stakeMint.toString()).flat()),
35
35
  ];
36
36
  const tokenPrices = yield cache.getTokenPricesAsMap(tokenMints, portfolio_core_1.NetworkId.solana);
37
37
  const assets = [];
38
38
  myVaults.forEach((vault) => {
39
- const tokenPrice = tokenPrices.get(vault.stakeMint);
39
+ const tokenPrice = tokenPrices.get(vault.stakeMint.toString());
40
40
  if (!tokenPrice || !vault.withdrawalRequest)
41
41
  return;
42
42
  const unlockingAt = new Date(new bignumber_js_1.default(vault.withdrawalRequest.timestampInSec)
@@ -44,7 +44,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
44
44
  .times(1000)
45
45
  .toNumber());
46
46
  const isClaimable = unlockingAt.getTime() < Date.now();
47
- assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(vault.stakeMint, new bignumber_js_1.default(vault.stakeAmount)
47
+ assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(vault.stakeMint.toString(), new bignumber_js_1.default(vault.stakeAmount)
48
48
  .dividedBy(Math.pow(10, tokenPrice.decimals))
49
49
  .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
50
50
  isClaimable,
@@ -1 +1 @@
1
- {"version":3,"file":"unstakingPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingPositionsFetcher.ts"],"names":[],"mappings":";;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AC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"unstakingPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/unstakingPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAErC,2CAIqB;AAErB,qGAA6E;AAC7E,kEAA+D;AAI/D,MAAM,aAAa,GAAG,IAAI,6BAAa,CACrC,iCAAqB,EACrB;IACE,MAAM,EAAE,oCAAwB;IAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CACF,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,0CAA0C;IAC1C,8DAA8D;IAE9D,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAErD,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAErD,MAAM,QAAQ,GAAG,SAAS,CAAC,MAAM,CAC/B,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,iBAAiB,0CAAE,KAAK,CAAC,QAAQ,EAAE,MAAK,KAAK,CAAA,EAAA,CACvD,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,UAAU,GAAG;QACjB,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;KACvE,CAAC;IAEF,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,UAAU,EACV,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,MAAM,GAA0B,EAAE,CAAC;IAEzC,Q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AC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACjD,IAAI,EAAE;gBACJ,MAAM;gBACN,IAAI,EAAE,qCAAqC;aAC5C;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -63,6 +63,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
63
63
  let tokenPriceA;
64
64
  let tokenPriceB;
65
65
  const tokenPriceSources = [];
66
+ const poolStats = [];
66
67
  for (let id = 0; id < subPools.data.length; id++) {
67
68
  poolInfo = subPools.data[id];
68
69
  lpSupply = new bignumber_js_1.default(poolInfo.lpAmount);
@@ -145,7 +146,30 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
145
146
  });
146
147
  }
147
148
  }
149
+ poolStats.push({
150
+ key: poolInfo.id,
151
+ value: {
152
+ address: poolInfo.id,
153
+ stats: {
154
+ '24h': {
155
+ volume: poolInfo.day.volume.toString(),
156
+ fees: poolInfo.day.volumeFee.toString(),
157
+ },
158
+ },
159
+ tvlUsdc: poolInfo.tvl.toString(),
160
+ apr: poolInfo.day.apr.toString(),
161
+ feeRate: poolInfo.config
162
+ ? Number(poolInfo.feeRate) *
163
+ 100 *
164
+ (1 - poolInfo.config.protocolFeeRate / 1000000)
165
+ : undefined,
166
+ },
167
+ });
148
168
  }
169
+ yield cache.setItems(poolStats, {
170
+ prefix: constants_2.poolStatsPrefix,
171
+ networkId: portfolio_core_1.NetworkId.solana,
172
+ });
149
173
  yield cache.setTokenPriceSources(tokenPriceSources);
150
174
  page += 1;
151
175
  } while (subPools.hasNextPage && computeAndStoreLpPrice_1.minimumLiquidity.isLessThan(lastLiquidity));
@@ -1 +1 @@
1
- {"version":3,"file":"ammV2ApiJob.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Q,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,EAAE;yBACxC;qBACF;oBACD,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE;oBAChC,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE;oBAChC,OAAO,EAAE,QAAQ,CAAC,MAAM;wBACtB,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC;4BACxB,GAAG;4BACH,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,eAAe,GAAG,OAAO,CAAC;wBACjD,CAAC,CAAC,SAAS;iBACd;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC,QAAQ,CAAC,SAAS,EAAE;YAC9B,MAAM,EAAE,2BAAe;YACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;QACpD,IAAI,IAAI,CAAC,CAAC;IACZ,CAAC,QAAQ,QAAQ,CAAC,WAAW,IAAI,yCAAgB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE;AAC/E,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -5,6 +5,7 @@ import { Platform } from '@sonarwatch/portfolio-core';
5
5
  export declare const platformId = "raydium";
6
6
  export declare const rayMint = "4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R";
7
7
  export declare const platform: Platform;
8
+ export declare const poolStatsPrefix = "raydium-pool-stats";
8
9
  export declare const apiV3 = "https://api-v3.raydium.io/";
9
10
  export declare const AMM_PROGRAM_ID_V3: PublicKey;
10
11
  export declare const AMM_PROGRAM_ID_V4: PublicKey;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rayDecimals = exports.positionsIdentifier = exports.cpmmProgramId = exports.raydiumProgram = exports.AMM_PROGRAM_ID_V5 = exports.AMM_PROGRAM_ID_V4 = exports.AMM_PROGRAM_ID_V3 = exports.apiV3 = exports.platform = exports.rayMint = exports.platformId = void 0;
3
+ exports.rayDecimals = exports.positionsIdentifier = exports.cpmmProgramId = exports.raydiumProgram = exports.AMM_PROGRAM_ID_V5 = exports.AMM_PROGRAM_ID_V4 = exports.AMM_PROGRAM_ID_V3 = exports.apiV3 = exports.poolStatsPrefix = exports.platform = exports.rayMint = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'raydium';
6
6
  exports.rayMint = '4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R';
@@ -17,6 +17,7 @@ exports.platform = {
17
17
  tokens: [exports.rayMint],
18
18
  description: 'Raydium is an automated market maker (AMM) built on the Solana blockchain which enables lightning-fast trades, permissionless pool creation, and new features for earning yield',
19
19
  };
20
+ exports.poolStatsPrefix = 'raydium-pool-stats';
20
21
  exports.apiV3 = 'https://api-v3.raydium.io/';
21
22
  exports.AMM_PROGRAM_ID_V3 = new web3_js_1.PublicKey('EhhTKczWMGQt46ynNeRX1WfeagwwJd7ufHvCDjRxjo5Q');
22
23
  exports.AMM_PROGRAM_ID_V4 = new web3_js_1.PublicKey('675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8');
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EACH,6EAA6E;IAC/E,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,qBAAqB;IAC9B,aAAa,EAAE,kCAAkC;IACjD,OAAO,EAAE,oCAAoC;IAC7C,QAAQ,EAAE,8BAA8B;IACxC,MAAM,EAAE,+BAA+B;IACvC,MAAM,EAAE,CAAC,eAAO,CAAC;IACjB,WAAW,EACT,iLAAiL;CACpL,CAAC;AAEW,QAAA,KAAK,GAAG,4BAA4B,CAAC;AAErC,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AACW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AAEvD,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EACH,6EAA6E;IAC/E,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,qBAAqB;IAC9B,aAAa,EAAE,kCAAkC;IACjD,OAAO,EAAE,oCAAoC;IAC7C,QAAQ,EAAE,8BAA8B;IACxC,MAAM,EAAE,+BAA+B;IACvC,MAAM,EAAE,CAAC,eAAO,CAAC;IACjB,WAAW,EACT,iLAAiL;CACpL,CAAC;AAEW,QAAA,eAAe,GAAG,oBAAoB,CAAC;AACvC,QAAA,KAAK,GAAG,4BAA4B,CAAC;AAErC,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AACW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AAEvD,QAAA,WAAW,GAAG,CAAC,CAAC"}
@@ -34,7 +34,10 @@ function getRaydiumCLMMPositions(cache, nfts) {
34
34
  if (!personalPositionsInfo || personalPositionsInfo.length === 0)
35
35
  return [];
36
36
  const poolsIds = personalPositionsInfo.flatMap((position) => position ? position.poolId : []);
37
- const poolStatesInfo = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, clmms_1.poolStateStruct, poolsIds);
37
+ const [poolStatesInfo, poolsStats] = yield Promise.all([
38
+ (0, solana_1.getParsedMultipleAccountsInfo)(client, clmms_1.poolStateStruct, poolsIds),
39
+ cache.getItems(poolsIds.map((p) => p.toString()), { prefix: constants_1.poolStatsPrefix, networkId: portfolio_core_1.NetworkId.solana }),
40
+ ]);
38
41
  const tickArrays = yield Promise.all(personalPositionsInfo.map((personalPositionInfo, index) => {
39
42
  if (!personalPositionInfo)
40
43
  return [];
@@ -54,13 +57,10 @@ function getRaydiumCLMMPositions(cache, nfts) {
54
57
  const personalPositionInfo = personalPositionsInfo[index];
55
58
  if (!personalPositionInfo)
56
59
  continue;
57
- if (!poolStateInfo.tokenMint0 ||
58
- !poolStateInfo.tokenMint1 ||
59
- !poolStateInfo.tickCurrent)
60
- continue;
61
60
  const element = elementRegistry.addElementConcentratedLiquidity({
62
61
  link: 'https://raydium.io/portfolio/?position_tab=concentrated',
63
62
  });
63
+ const poolStats = poolsStats.find((p) => (p === null || p === void 0 ? void 0 : p.address) === personalPositionInfo.poolId.toString());
64
64
  const liquidity = element.setLiquidity({
65
65
  addressA: poolStateInfo.tokenMint0,
66
66
  addressB: poolStateInfo.tokenMint1,
@@ -69,6 +69,10 @@ function getRaydiumCLMMPositions(cache, nfts) {
69
69
  tickLowerIndex: personalPositionInfo.tickLowerIndex,
70
70
  tickUpperIndex: personalPositionInfo.tickUpperIndex,
71
71
  ref: personalPositionInfo.pubkey,
72
+ swapVolume24h: poolStats === null || poolStats === void 0 ? void 0 : poolStats.stats['24h'].volume,
73
+ feeRate: poolStats === null || poolStats === void 0 ? void 0 : poolStats.feeRate,
74
+ currentSqrtPrice: poolStateInfo.sqrtPriceX64,
75
+ poolLiquidity: poolStateInfo.liquidity,
72
76
  sourceRefs: [
73
77
  {
74
78
  name: 'Pool',
@@ -1 +1 @@
1
- {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAAyD;AACzD,+CAAmE;AACnE,iDAAsD;AACtD,2CAIyB;AAEzB,uCAA0E;AAC1E,gFAA6E;AAE7E,SAAsB,uBAAuB,CAC3C,KAAY,EACZ,IAAiC;;QAEjC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QAEjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ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;wBAChB,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,QAAQ,EAAE;qBACjD;iBACF;aACF,CAAC,CAAC;YAEH,MAAM,sBAAsB,GAAG,IAAA,kCAAwB,EACrD,oBAAoB,EACpB,aAAa,EACb,UAAU,CAAC,KAAK,CAAC,CAClB,CAAC;YAEF,IAAI,sBAAsB,EAAE,CAAC;gBAC3B,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,sBAAsB,CAAC,eAAe;iBAC/C,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,sBAAsB,CAAC,eAAe;iBAC/C,CAAC,CAAC;gBAEH,sBAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;oBAC1D,IACE,aAAa,CAAC,MAAM,EAAE;wBACtB,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;4BAC/C,kCAAkC;wBAEpC,OAAO;oBAET,SAAS,CAAC,cAAc,CAAC;wBACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;wBAC/C,MAAM,EAAE,aAAa;qBACtB,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;CAAA;AAvID,0DAuIC"}
1
+ {"version":3,"file":"getRaydiumCLMMPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/getRaydiumCLMMPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAA0E;AAC1E,+CAAmE;AACnE,iDAAsD;AACtD,2CAIyB;AAEzB,uCAA0E;AAC1E,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