@sonarwatch/portfolio-plugins 0.14.145 → 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 (152) hide show
  1. package/CHANGELOG.md +2232 -2204
  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/ratex/getPool.d.ts +1 -2
  75. package/src/plugins/ratex/getPool.js +4 -3
  76. package/src/plugins/ratex/getPool.js.map +1 -1
  77. package/src/plugins/ratex/helpers.d.ts +7 -4
  78. package/src/plugins/ratex/helpers.js +11 -31
  79. package/src/plugins/ratex/helpers.js.map +1 -1
  80. package/src/plugins/ratex/marketsJob.js +4 -9
  81. package/src/plugins/ratex/marketsJob.js.map +1 -1
  82. package/src/plugins/ratex/positionsFetcher.js +2 -2
  83. package/src/plugins/ratex/positionsFetcher.js.map +1 -1
  84. package/src/plugins/ratex/structs.d.ts +211 -0
  85. package/src/plugins/ratex/structs.js +203 -0
  86. package/src/plugins/ratex/structs.js.map +1 -0
  87. package/src/plugins/ratex/types.d.ts +5 -76
  88. package/src/plugins/raydium/ammV2ApiJob.js +24 -0
  89. package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
  90. package/src/plugins/raydium/constants.d.ts +1 -0
  91. package/src/plugins/raydium/constants.js +2 -1
  92. package/src/plugins/raydium/constants.js.map +1 -1
  93. package/src/plugins/raydium/getRaydiumCLMMPositions.js +9 -5
  94. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  95. package/src/plugins/raydium/types.d.ts +14 -4
  96. package/src/plugins/sanctum/s1AirdropFetcher.js +2 -2
  97. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  98. package/src/plugins/sharky/collectionsJob.js +8 -9
  99. package/src/plugins/sharky/collectionsJob.js.map +1 -1
  100. package/src/plugins/sharky/constants.d.ts +0 -2
  101. package/src/plugins/sharky/constants.js +1 -7
  102. package/src/plugins/sharky/constants.js.map +1 -1
  103. package/src/plugins/sharky/loansFetcher.js +25 -19
  104. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  105. package/src/plugins/sharky/structs.d.ts +96 -0
  106. package/src/plugins/sharky/structs.js +103 -0
  107. package/src/plugins/sharky/structs.js.map +1 -0
  108. package/src/plugins/sharky/types.d.ts +0 -15
  109. package/src/plugins/sharky/types.js +0 -8
  110. package/src/plugins/sharky/types.js.map +1 -1
  111. package/src/plugins/stabble/constants.d.ts +0 -3
  112. package/src/plugins/stabble/constants.js +1 -13
  113. package/src/plugins/stabble/constants.js.map +1 -1
  114. package/src/plugins/stabble/poolsJob.js +14 -9
  115. package/src/plugins/stabble/poolsJob.js.map +1 -1
  116. package/src/plugins/stabble/structs.d.ts +43 -0
  117. package/src/plugins/stabble/structs.js +42 -0
  118. package/src/plugins/stabble/structs.js.map +1 -0
  119. package/src/plugins/sushiswap/helpers.js +24 -24
  120. package/src/plugins/uniswap-v2/helpers.js +22 -22
  121. package/src/plugins/zeta/constants.d.ts +0 -2
  122. package/src/plugins/zeta/constants.js +1 -7
  123. package/src/plugins/zeta/constants.js.map +1 -1
  124. package/src/plugins/zeta/stakingFetcher.js +6 -3
  125. package/src/plugins/zeta/stakingFetcher.js.map +1 -1
  126. package/src/plugins/zeta/structs.d.ts +24 -1
  127. package/src/plugins/zeta/structs.js +30 -1
  128. package/src/plugins/zeta/structs.js.map +1 -1
  129. package/src/plugins/zeta/types.d.ts +0 -26
  130. package/src/plugins/zeta/types.js +0 -7
  131. package/src/plugins/zeta/types.js.map +1 -1
  132. package/src/utils/sei/constants.js +8 -8
  133. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  134. package/src/utils/solana/beets/ParsedGpa.d.ts +1 -0
  135. package/src/utils/solana/beets/ParsedGpa.js +9 -0
  136. package/src/utils/solana/beets/ParsedGpa.js.map +1 -1
  137. package/src/plugins/divvy/types.d.ts +0 -28
  138. package/src/plugins/divvy/types.js +0 -3
  139. package/src/plugins/divvy/types.js.map +0 -1
  140. package/src/plugins/picasso/types.d.ts +0 -17
  141. package/src/plugins/picasso/types.js +0 -3
  142. package/src/plugins/picasso/types.js.map +0 -1
  143. package/src/plugins/ratex/idl.json +0 -8806
  144. package/src/plugins/sharky/filters.d.ts +0 -8
  145. package/src/plugins/sharky/filters.js +0 -43
  146. package/src/plugins/sharky/filters.js.map +0 -1
  147. package/src/plugins/stabble/filters.d.ts +0 -5
  148. package/src/plugins/stabble/filters.js +0 -20
  149. package/src/plugins/stabble/filters.js.map +0 -1
  150. package/src/plugins/stabble/types.d.ts +0 -40
  151. package/src/plugins/stabble/types.js +0 -3
  152. 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,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG,qBAAa,gDAAgD,KAAK,EAAE;QACzE,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,qBAAqB;YACzB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,wBAAwB;YACnC,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,IAAI,EAAE,6CAA6C;QACnD,QAAQ,EAAE,CAAC;QACX,kBAAkB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;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,EAAE,6CAA6C;QACjE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG,qBAAa,gDAAgD,KAAK,IACnE,mBAAW,aAAX,mBAAW,cAAX,mBAAW,GAAI,EACjB,EAAE;QACJ,OAAO,EAAE;YACP,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,aAAa;YACvB,EAAE,EAAE,qBAAqB;YACzB,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,SAAS;YACtB,WAAW,EAAE,iBAAiB;YAC9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AE,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/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AAE;QAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,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"}
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;AAEpD,qDAAoD;AAEpD,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;I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AAC,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;AACr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A,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,MAAK,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,CACxD,0CAAE,KAAK,CAAC,KAAK,EAAE,MAAM;aACvB,CAAC,CAAC;YAEH,MAAM,cAAc,GAAG,IAAA,iCAAkB,EACvC,aAAa,EACb,YAAY,EACZ,UAAU,CACX,CAAC;YAEF,IAAI,cAAc,EAAE,CAAC;gBACnB,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,cAAc,CAAC,QAAQ;iBAChC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,cAAc,CAAC,QAAQ;iBAChC,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;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;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"}
1
+ {"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;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lUsdc: 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,6CAA4C;AAC5C,+DAQoC;AACpC,gEAAqC;AAErC,2CAA+E;AAC/E,qGAA6E;AAC7E,+CAAuE;AAEvE,iDAAsD;AAE/C,MAAM,oBAAoB,GAAG,CAAC,EAAa,EAAE,EAAE;IACpD,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,EACrD,8BAAkB,CACnB,CAAC;IACF,OAAO,cAAc,CAAC;AACxB,CAAC,CAAC;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CAAC;YACxB,IAAI,KAAK,EAAE,CAAC;gBACV,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;gBACpD,IAAI,CAAC,UAAU;oBAAE,OAAO;gBACxB,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,KAAK,CAAC,SAAS,EACf,IAAI,sBAAS,CAAC,KAAK,CAAC,WAAW,CAAC;qBAC7B,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE,EACb,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEnC,MAAM,OAAO,GAA6B;YACxC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,QAAQ;YACf,UAAU,EAAV,sBAAU;YACV,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;AA5DD,gEA4DC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,+DAQoC;AACpC,gEAAqC;AAErC,2CAA6D;AAC7D,qGAA6E;AAC7E,+CAAmE;AACnE,iDAAsD;AACtD,uCAAwC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,EAAa,EAAE,EAAE;IACpD,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,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ana/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;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AssetToAssetCollectible_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/unstakingNftsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAGoC;AACpC,6CAA4C;AAG5C,2CAMqB;AACrB,oGAA4E;AAE5E,oFAAiF;AACjF,wGAAqG;AACrG,iDAAsD;AACtD,+CAAuE;AAEvE,uCAAoE;AAEpE,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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AAC;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,CAAC;IAC7C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,GAAG,GAAG,IAAA,6DAA6B,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,IAAI,CAAC,GAAG;YAAE,SAAS;QACnB,IAAI,MAAA,GAAG,CAAC,UAAU,CAAC,IAAI,0CAAE,QAAQ,CAAC,YAAY,CAAC;YAAE,SAAS;QAC1D,IAAI,CAAC,IAAA,2BAAiB,EAAC,GAAG,CAAC;YAAE,SAAS;QACtC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjB,CAAC;IAED,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,MAAM,GAAG,MAAM,IAAA,sCAA6B,EAChD,UAAU,EACV,qBAAW,EACX,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,8BAAoB,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"}
@@ -27,16 +27,16 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
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":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AAErC,2CAIqB;AAErB,qGAA6E;AAE7E,kEAA+D;AAG/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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,IAAI,sBAAS,CAAC,KAAK,CAAC,WAAW,CAAC;aAC7B,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC;aACpC,QAAQ,EAAE,EACb,0BAAS,CAAC,MAAM,EAChB,UAAU,EACV,SAAS,EACT;YACE,WAAW;YACX,WAAW,EAAE,WAAW,CAAC,OAAO,EAAE;SACnC,CACF,KACD,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,IAC5B,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,QAAQ;YACf,UAAU,EAAV,sBAAU;YACV,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;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"}
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,0B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/@solana/web3.js" />
2
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { IdlItem } from '@solanafm/explorer-kit-idls';
4
3
  import { PublicKey } from '@solana/web3.js';
5
4
  import { Cache } from '../../Cache';
6
5
  import { YieldMarketWithOracle } from './types';
7
- export declare const getPool: (poolId: PublicKey, idlItem: IdlItem, cache: Cache) => Promise<YieldMarketWithOracle | undefined>;
6
+ export declare const getPool: (poolId: PublicKey, cache: Cache) => Promise<YieldMarketWithOracle | undefined>;
@@ -15,7 +15,8 @@ const web3_js_1 = require("@solana/web3.js");
15
15
  const constants_1 = require("./constants");
16
16
  const solana_1 = require("../../utils/solana");
17
17
  const clients_1 = require("../../utils/clients");
18
- const getPool = (poolId, idlItem, cache) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const structs_1 = require("./structs");
19
+ const getPool = (poolId, cache) => __awaiter(void 0, void 0, void 0, function* () {
19
20
  const cacheOpts = {
20
21
  prefix: constants_1.poolPrefix,
21
22
  networkId: portfolio_core_1.NetworkId.solana,
@@ -24,10 +25,10 @@ const getPool = (poolId, idlItem, cache) => __awaiter(void 0, void 0, void 0, fu
24
25
  if (cachedPool)
25
26
  return cachedPool;
26
27
  const connection = (0, clients_1.getClientSolana)();
27
- const pools = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, idlItem, [poolId]);
28
+ const pools = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.yieldMarketStruct, [poolId]);
28
29
  if (!pools[0])
29
30
  return undefined;
30
- const oracles = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, idlItem, [new web3_js_1.PublicKey(pools[0].oracle)]);
31
+ const oracles = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.oracleStruct, [new web3_js_1.PublicKey(pools[0].oracle)]);
31
32
  if (!oracles[0])
32
33
  return undefined;
33
34
  const poolWithOracle = Object.assign(Object.assign({}, pools[0]), { rate: oracles[0].rate });
@@ -1 +1 @@
1
- {"version":3,"file":"getPool.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/ratex/getPool.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAAuD;AAEvD,6CAA4C;AAE5C,2CAAyC;AAEzC,+CAAuE;AACvE,iDAAsD;AAE/C,MAAM,OAAO,GAAG,CACrB,MAAiB,EACjB,OAAgB,EAChB,KAAY,EACgC,EAAE;IAC9C,MAAM,SAAS,GAAG;QAChB,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC;IACF,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,OAAO,CACpC,MAAM,CAAC,QAAQ,EAAE,EACjB,SAAS,CACV,CAAC;IACF,IAAI,UAAU;QAAE,OAAO,UAAU,CAAC;IAElC,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,KAAK,GAAG,MAAM,IAAA,0CAAiC,EACnD,UAAU,EACV,OAAO,EACP,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAEhC,MAAM,OAAO,GAAG,MAAM,IAAA,0CAAiC,EACrD,UAAU,EACV,OAAO,EACP,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CACjC,CAAC;IAEF,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,SAAS,CAAC;IAElC,MAAM,cAAc,mCACf,KAAK,CAAC,CAAC,CAAC,KACX,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,GACtB,CAAC;IAEF,MAAM,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAElE,OAAO,cAAc,CAAC;AACxB,CAAC,CAAA,CAAC;AAzCW,QAAA,OAAO,WAyClB"}
1
+ {"version":3,"file":"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@@
1
- import { IdlItem } from '@solanafm/explorer-kit-idls';
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';
2
4
  import { ParsedAccount } from '../../utils/solana';
3
- import { LP, Program, User, UserStats, YieldMarketWithOracle } from './types';
5
+ import { Program, YieldMarketWithOracle } from './types';
4
6
  import { Cache } from '../../Cache';
7
+ import { LP, User, UserStats } from './structs';
5
8
  export declare const getUserStatsByProgram: (programs: Program[], owner: string) => Promise<Map<string, UserStats>>;
6
9
  export declare const getUsersByProgram: (programs: Program[], userStatsByProgram: Map<string, UserStats>, owner: string) => Promise<Map<string, ParsedAccount<User>[]>>;
7
10
  export declare const getLpDatasByProgram: (programs: Program[], userStatsByProgram: Map<string, UserStats>, owner: string) => Promise<Map<string, ParsedAccount<LP>[]>>;
8
11
  export declare const getPools: (programs: Program[], lpDatasByProgram: Map<string, ParsedAccount<LP>[]>, cache: Cache) => Promise<Map<string, YieldMarketWithOracle>>;
9
- export declare const getUsers: (owner: string, numberOfSubAccountsCreated: number, idlItem: IdlItem) => Promise<(ParsedAccount<User> | null)[]>;
10
- export declare const getLpDatas: (owner: string, numberOfSubAccountsCreated: number, idlItem: IdlItem) => Promise<(ParsedAccount<LP> | null)[]>;
12
+ export declare const getUsers: (owner: string, numberOfSubAccountsCreated: number, program: PublicKey) => Promise<(ParsedAccount<User> | null)[]>;
13
+ export declare const getLpDatas: (owner: string, numberOfSubAccountsCreated: number, programId: PublicKey) => Promise<(ParsedAccount<LP> | null)[]>;
@@ -17,19 +17,15 @@ const web3_js_1 = require("@solana/web3.js");
17
17
  const bn_js_1 = __importDefault(require("bn.js"));
18
18
  const solana_1 = require("../../utils/solana");
19
19
  const clients_1 = require("../../utils/clients");
20
- const idl_json_1 = __importDefault(require("./idl.json"));
21
20
  const getPool_1 = require("./getPool");
21
+ const structs_1 = require("./structs");
22
22
  const getUserStatsByProgram = (programs, owner) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  const connection = (0, clients_1.getClientSolana)();
24
24
  const userStatsPdas = programs.map((program) => {
25
25
  const [userStatsPda] = web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('user_stats'), new web3_js_1.PublicKey(owner).toBuffer()], new web3_js_1.PublicKey(program.programId));
26
26
  return userStatsPda;
27
27
  });
28
- const userStatss = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, {
29
- programId: programs[0].programId,
30
- idl: idl_json_1.default,
31
- idlType: 'anchor',
32
- }, userStatsPdas);
28
+ const userStatss = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.userStatsStruct, userStatsPdas);
33
29
  const userStatsByProgram = new Map();
34
30
  programs.forEach((program, i) => {
35
31
  const userStats = userStatss[i];
@@ -45,12 +41,7 @@ const getUsersByProgram = (programs, userStatsByProgram, owner) => __awaiter(voi
45
41
  const userStats = userStatsByProgram.get(program.programId);
46
42
  if (!userStats || userStats.numberOfSubAccountsCreated === 0)
47
43
  return null;
48
- const idlItem = {
49
- programId: program.programId,
50
- idl: idl_json_1.default,
51
- idlType: 'anchor',
52
- };
53
- return (0, exports.getUsers)(owner, userStats.numberOfSubAccountsCreated, idlItem);
44
+ return (0, exports.getUsers)(owner, userStats.numberOfSubAccountsCreated, new web3_js_1.PublicKey(program.programId));
54
45
  }));
55
46
  const usersByProgram = new Map();
56
47
  programs.forEach((program, i) => {
@@ -67,12 +58,7 @@ const getLpDatasByProgram = (programs, userStatsByProgram, owner) => __awaiter(v
67
58
  const userStats = userStatsByProgram.get(program.programId);
68
59
  if (!userStats || userStats.numberOfSubAccountsCreated === 0)
69
60
  return null;
70
- const idlItem = {
71
- programId: program.programId,
72
- idl: idl_json_1.default,
73
- idlType: 'anchor',
74
- };
75
- return (0, exports.getLpDatas)(owner, userStats.numberOfSubAccountsCreated, idlItem);
61
+ return (0, exports.getLpDatas)(owner, userStats.numberOfSubAccountsCreated, new web3_js_1.PublicKey(program.programId));
76
62
  }));
77
63
  const lpDatasByProgram = new Map();
78
64
  programs.forEach((program, i) => {
@@ -90,13 +76,7 @@ const getPools = (programs, lpDatasByProgram, cache) => __awaiter(void 0, void 0
90
76
  const lpDatas = lpDatasByProgram.get(program.programId);
91
77
  if (!lpDatas)
92
78
  return null;
93
- const idlItem = {
94
- programId: program.programId,
95
- idl: idl_json_1.default,
96
- idlType: 'anchor',
97
- };
98
- return Promise.all(lpDatas.map((lpData) => lpData &&
99
- (0, getPool_1.getPool)(new web3_js_1.PublicKey(lpData.ammPosition.ammpool), idlItem, cache))).then((lpDatasPools) => {
79
+ return Promise.all(lpDatas.map((lpData) => lpData && (0, getPool_1.getPool)(new web3_js_1.PublicKey(lpData.ammPosition.ammpool), cache))).then((lpDatasPools) => {
100
80
  lpDatasPools.forEach((p) => {
101
81
  if (p) {
102
82
  pools.set(p.pubkey.toString(), p);
@@ -107,32 +87,32 @@ const getPools = (programs, lpDatasByProgram, cache) => __awaiter(void 0, void 0
107
87
  return pools;
108
88
  });
109
89
  exports.getPools = getPools;
110
- const getUsers = (owner, numberOfSubAccountsCreated, idlItem) => {
90
+ const getUsers = (owner, numberOfSubAccountsCreated, program) => {
111
91
  const userPdas = [];
112
92
  for (let subaccountId = 0; subaccountId < numberOfSubAccountsCreated; subaccountId++) {
113
93
  const [userPda] = web3_js_1.PublicKey.findProgramAddressSync([
114
94
  Buffer.from('user'),
115
95
  new web3_js_1.PublicKey(owner).toBuffer(),
116
96
  new bn_js_1.default(subaccountId).toArrayLike(Buffer, 'le', 2),
117
- ], new web3_js_1.PublicKey(idlItem.programId));
97
+ ], program);
118
98
  userPdas.push(userPda);
119
99
  }
120
100
  const connection = (0, clients_1.getClientSolana)();
121
- return (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, idlItem, userPdas);
101
+ return (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.userStruct, userPdas);
122
102
  };
123
103
  exports.getUsers = getUsers;
124
- const getLpDatas = (owner, numberOfSubAccountsCreated, idlItem) => {
104
+ const getLpDatas = (owner, numberOfSubAccountsCreated, programId) => {
125
105
  const lpPdas = [];
126
106
  for (let subaccountId = 0; subaccountId < numberOfSubAccountsCreated; subaccountId++) {
127
107
  const [lpPda] = web3_js_1.PublicKey.findProgramAddressSync([
128
108
  Buffer.from('lp'),
129
109
  new web3_js_1.PublicKey(owner).toBuffer(),
130
110
  new bn_js_1.default(subaccountId).toArrayLike(Buffer, 'le', 2),
131
- ], new web3_js_1.PublicKey(idlItem.programId));
111
+ ], programId);
132
112
  lpPdas.push(lpPda);
133
113
  }
134
114
  const connection = (0, clients_1.getClientSolana)();
135
- return (0, solana_1.getAutoParsedMultipleAccountsInfo)(connection, idlItem, lpPdas);
115
+ return (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.lpStruct, lpPdas);
136
116
  };
137
117
  exports.getLpDatas = getLpDatas;
138
118
  //# sourceMappingURL=helpers.js.map