@sonarwatch/portfolio-plugins 0.14.151 → 0.14.153

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 (184) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/allbridge/constants.d.ts +0 -6
  4. package/src/plugins/allbridge/constants.js +1 -9
  5. package/src/plugins/allbridge/constants.js.map +1 -1
  6. package/src/plugins/allbridge/helpers.d.ts +1 -1
  7. package/src/plugins/allbridge/helpers.js +1 -3
  8. package/src/plugins/allbridge/helpers.js.map +1 -1
  9. package/src/plugins/allbridge/positionsFetcher.js +2 -1
  10. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  11. package/src/plugins/allbridge/structs.d.ts +13 -0
  12. package/src/plugins/allbridge/structs.js +14 -0
  13. package/src/plugins/allbridge/structs.js.map +1 -0
  14. package/src/plugins/allbridge/types.d.ts +0 -6
  15. package/src/plugins/bonfida/constants.js +1 -1
  16. package/src/plugins/bonfida/constants.js.map +1 -1
  17. package/src/plugins/divvy/constants.d.ts +0 -2
  18. package/src/plugins/divvy/constants.js +1 -7
  19. package/src/plugins/divvy/constants.js.map +1 -1
  20. package/src/plugins/divvy/houseJob.js +6 -3
  21. package/src/plugins/divvy/houseJob.js.map +1 -1
  22. package/src/plugins/divvy/housePoolFetcher.js +9 -11
  23. package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
  24. package/src/plugins/divvy/stakingFetcher.js +7 -12
  25. package/src/plugins/divvy/stakingFetcher.js.map +1 -1
  26. package/src/plugins/divvy/structs.d.ts +57 -0
  27. package/src/plugins/divvy/structs.js +57 -0
  28. package/src/plugins/divvy/structs.js.map +1 -0
  29. package/src/plugins/drift/spotMarketsJob.js +0 -1
  30. package/src/plugins/drift/spotMarketsJob.js.map +1 -1
  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/index.js +2 -1
  48. package/src/plugins/ensofi/index.js.map +1 -1
  49. package/src/plugins/ensofi/solanaLoansFetcher.js +23 -37
  50. package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
  51. package/src/plugins/ensofi/solanaLoansJob.d.ts +3 -0
  52. package/src/plugins/ensofi/solanaLoansJob.js +63 -0
  53. package/src/plugins/ensofi/solanaLoansJob.js.map +1 -0
  54. package/src/plugins/ensofi/structs.d.ts +58 -0
  55. package/src/plugins/ensofi/structs.js +60 -0
  56. package/src/plugins/ensofi/structs.js.map +1 -0
  57. package/src/plugins/jupiter/governance/constants.js +3 -3
  58. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  59. package/src/plugins/jupiter/launchpad/constants.d.ts +1 -0
  60. package/src/plugins/jupiter/launchpad/constants.js +8 -7
  61. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  62. package/src/plugins/jupiter/pricingJob.js +2 -1
  63. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  64. package/src/plugins/kamino/reservesJob.js +35 -0
  65. package/src/plugins/kamino/reservesJob.js.map +1 -1
  66. package/src/plugins/loopscale/constants.d.ts +2 -3
  67. package/src/plugins/loopscale/constants.js +3 -4
  68. package/src/plugins/loopscale/constants.js.map +1 -1
  69. package/src/plugins/loopscale/helpers.d.ts +6 -33
  70. package/src/plugins/loopscale/helpers.js +39 -142
  71. package/src/plugins/loopscale/helpers.js.map +1 -1
  72. package/src/plugins/loopscale/index.js +10 -3
  73. package/src/plugins/loopscale/index.js.map +1 -1
  74. package/src/plugins/loopscale/lendFetcher.js +57 -0
  75. package/src/plugins/loopscale/lendFetcher.js.map +1 -0
  76. package/src/plugins/loopscale/lendVaultsFetcher.d.ts +6 -0
  77. package/src/plugins/loopscale/lendVaultsFetcher.js +68 -0
  78. package/src/plugins/loopscale/lendVaultsFetcher.js.map +1 -0
  79. package/src/plugins/loopscale/loansFetcher.d.ts +3 -0
  80. package/src/plugins/loopscale/loansFetcher.js +79 -0
  81. package/src/plugins/loopscale/loansFetcher.js.map +1 -0
  82. package/src/plugins/loopscale/structs.d.ts +116 -86
  83. package/src/plugins/loopscale/structs.js +101 -79
  84. package/src/plugins/loopscale/structs.js.map +1 -1
  85. package/src/plugins/loopscale/types.d.ts +6 -0
  86. package/src/plugins/loopscale/types.js.map +1 -0
  87. package/src/plugins/loopscale/vaultsJob.d.ts +3 -0
  88. package/src/plugins/loopscale/vaultsJob.js +121 -0
  89. package/src/plugins/loopscale/vaultsJob.js.map +1 -0
  90. package/src/plugins/lulo/depositsFetcher.js +9 -29
  91. package/src/plugins/lulo/depositsFetcher.js.map +1 -1
  92. package/src/plugins/marginfi/banksJob.js +6 -2
  93. package/src/plugins/marginfi/banksJob.js.map +1 -1
  94. package/src/plugins/marginfi/constants.d.ts +5 -3
  95. package/src/plugins/marginfi/constants.js +8 -7
  96. package/src/plugins/marginfi/constants.js.map +1 -1
  97. package/src/plugins/marginfi/depositsFetcher.js +50 -27
  98. package/src/plugins/marginfi/depositsFetcher.js.map +1 -1
  99. package/src/plugins/marginfi/getMarginFiAccounts.d.ts +6 -0
  100. package/src/plugins/marginfi/getMarginFiAccounts.js +44 -0
  101. package/src/plugins/marginfi/getMarginFiAccounts.js.map +1 -0
  102. package/src/plugins/marginfi/helpers.d.ts +0 -5
  103. package/src/plugins/marginfi/helpers.js +1 -81
  104. package/src/plugins/marginfi/helpers.js.map +1 -1
  105. package/src/plugins/marginfi/structs/MarginfiAccount.d.ts +5 -0
  106. package/src/plugins/marginfi/structs/MarginfiAccount.js.map +1 -1
  107. package/src/plugins/orca/getWhirlpoolPositions.js +7 -7
  108. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  109. package/src/plugins/orca/types.d.ts +2 -0
  110. package/src/plugins/picasso/constants.d.ts +0 -2
  111. package/src/plugins/picasso/constants.js +1 -7
  112. package/src/plugins/picasso/constants.js.map +1 -1
  113. package/src/plugins/picasso/helpers.js +7 -4
  114. package/src/plugins/picasso/helpers.js.map +1 -1
  115. package/src/plugins/picasso/structs.d.ts +39 -0
  116. package/src/plugins/picasso/structs.js +37 -0
  117. package/src/plugins/picasso/structs.js.map +1 -0
  118. package/src/plugins/picasso/unstakingNftsJob.js +2 -1
  119. package/src/plugins/picasso/unstakingNftsJob.js.map +1 -1
  120. package/src/plugins/picasso/unstakingPositionsFetcher.js +4 -4
  121. package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
  122. package/src/plugins/raydium/ammV2ApiJob.js +24 -0
  123. package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
  124. package/src/plugins/raydium/constants.d.ts +1 -0
  125. package/src/plugins/raydium/constants.js +2 -1
  126. package/src/plugins/raydium/constants.js.map +1 -1
  127. package/src/plugins/raydium/getRaydiumCLMMPositions.js +9 -5
  128. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  129. package/src/plugins/raydium/types.d.ts +14 -4
  130. package/src/plugins/sanctum/s1AirdropFetcher.js +2 -2
  131. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  132. package/src/plugins/sharky/collectionsJob.js +8 -9
  133. package/src/plugins/sharky/collectionsJob.js.map +1 -1
  134. package/src/plugins/sharky/constants.d.ts +0 -2
  135. package/src/plugins/sharky/constants.js +1 -7
  136. package/src/plugins/sharky/constants.js.map +1 -1
  137. package/src/plugins/sharky/loansFetcher.js +25 -19
  138. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  139. package/src/plugins/sharky/structs.d.ts +96 -0
  140. package/src/plugins/sharky/structs.js +103 -0
  141. package/src/plugins/sharky/structs.js.map +1 -0
  142. package/src/plugins/sharky/types.d.ts +0 -15
  143. package/src/plugins/sharky/types.js +0 -8
  144. package/src/plugins/sharky/types.js.map +1 -1
  145. package/src/plugins/stabble/constants.d.ts +0 -3
  146. package/src/plugins/stabble/constants.js +1 -13
  147. package/src/plugins/stabble/constants.js.map +1 -1
  148. package/src/plugins/stabble/poolsJob.js +14 -9
  149. package/src/plugins/stabble/poolsJob.js.map +1 -1
  150. package/src/plugins/stabble/structs.d.ts +43 -0
  151. package/src/plugins/stabble/structs.js +42 -0
  152. package/src/plugins/stabble/structs.js.map +1 -0
  153. package/src/plugins/suilend/helpers.js +2 -0
  154. package/src/plugins/suilend/helpers.js.map +1 -1
  155. package/src/utils/misc/getLendingMarketAprs.d.ts +3 -1
  156. package/src/utils/misc/getLendingMarketAprs.js +24 -1
  157. package/src/utils/misc/getLendingMarketAprs.js.map +1 -1
  158. package/src/utils/solana/beets/ParsedGpa.d.ts +1 -0
  159. package/src/utils/solana/beets/ParsedGpa.js +9 -0
  160. package/src/utils/solana/beets/ParsedGpa.js.map +1 -1
  161. package/src/plugins/divvy/types.d.ts +0 -28
  162. package/src/plugins/divvy/types.js.map +0 -1
  163. package/src/plugins/loopscale/filters.d.ts +0 -9
  164. package/src/plugins/loopscale/filters.js +0 -62
  165. package/src/plugins/loopscale/filters.js.map +0 -1
  166. package/src/plugins/loopscale/positionsFetcher.js +0 -119
  167. package/src/plugins/loopscale/positionsFetcher.js.map +0 -1
  168. package/src/plugins/marginfi/filters.d.ts +0 -5
  169. package/src/plugins/marginfi/filters.js +0 -45
  170. package/src/plugins/marginfi/filters.js.map +0 -1
  171. package/src/plugins/picasso/types.d.ts +0 -17
  172. package/src/plugins/picasso/types.js +0 -3
  173. package/src/plugins/picasso/types.js.map +0 -1
  174. package/src/plugins/sharky/filters.d.ts +0 -8
  175. package/src/plugins/sharky/filters.js +0 -43
  176. package/src/plugins/sharky/filters.js.map +0 -1
  177. package/src/plugins/stabble/filters.d.ts +0 -5
  178. package/src/plugins/stabble/filters.js +0 -20
  179. package/src/plugins/stabble/filters.js.map +0 -1
  180. package/src/plugins/stabble/types.d.ts +0 -40
  181. package/src/plugins/stabble/types.js +0 -3
  182. package/src/plugins/stabble/types.js.map +0 -1
  183. /package/src/plugins/loopscale/{positionsFetcher.d.ts → lendFetcher.d.ts} +0 -0
  184. /package/src/plugins/{divvy → loopscale}/types.js +0 -0
@@ -76,7 +76,7 @@ exports.asr1Config = {
76
76
  { label: 'SHARK', decimals: 6 },
77
77
  ],
78
78
  ]),
79
- api: (owner) => `https://worker.jup.ag/jup-asr-july-2024-claim-proof/${owner}`,
79
+ api: (owner) => `https://worker.jup.ag/jup-asr-july-2024-claim-proof/${owner}?${constants_1.jupApiToken !== null && constants_1.jupApiToken !== void 0 ? constants_1.jupApiToken : ''}`,
80
80
  };
81
81
  exports.asr2Config = {
82
82
  statics: exports.asr2Statics,
@@ -87,7 +87,7 @@ exports.asr2Config = {
87
87
  { label: 'CLOUD', decimals: 9 },
88
88
  ],
89
89
  ]),
90
- api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=oct-2024&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CCLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu`,
90
+ api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=oct-2024&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CCLoUDKc4Ane7HeQcPpE3YHnznRxhMimJ4MyaUqyHFzAu&${constants_1.jupApiToken !== null && constants_1.jupApiToken !== void 0 ? constants_1.jupApiToken : ''}`,
91
91
  };
92
92
  exports.asr3Config = {
93
93
  statics: exports.asr3Statics,
@@ -95,6 +95,6 @@ exports.asr3Config = {
95
95
  [constants_1.jupMint, { label: 'JUP', decimals: constants_1.jupDecimals }],
96
96
  [constants_2.dbrMint, { label: 'DBR', decimals: constants_2.dbrDecimals }],
97
97
  ]),
98
- api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=jan-2025&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CDBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5`,
98
+ api: (owner) => `https://worker.jup.ag/asr-claim-proof/${owner}?asrTimeline=jan-2025&mints=JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN%2CDBRiDgJAMsM95moTzJs7M9LnkGErpbv9v6CUR1DXnUu5&${constants_1.jupApiToken !== null && constants_1.jupApiToken !== void 0 ? constants_1.jupApiToken : ''}`,
99
99
  };
100
100
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/constants.ts"],"names":[],"mappings":";;;AAEA,sDAA8D;AAC9D,wDAAgE;AAEnD,QAAA,UAAU,GAAG,oBAAoB,CAAC;AAC/C,MAAM,YAAY,GAAG,aAAa,CAAC;AACnC,MAAM,aAAa,GAAG,mDAAmD,CAAC;AAC1E,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAElC,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAC/D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,eAAe;IACxB,OAAO,EAAE,uBAAuB;IAChC,WAAW,EAAE,gDAAgD;IAC7D,MAAM,EAAE,CAAC,mBAAO,CAAC;CAClB,CAAC;AAEW,QAAA,WAAW,GAAmB;IACzC,EAA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EAAE,CAAC,EAAE;SAC9B;QACD;YACE,6CAA6C;YAC7C,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE;SAC9B;QACD;YACE,6CAA6C;YAC7C,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;SAChC;KACF,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,uDAAuD,KAAK,EAAE;CACjE,CAAC;AAEW,QAAA,UAAU,GAAc;IACnC,OAAO,EAAE,mBAAW;IACpB,KAAK,EAAE,IAAI,GAAG,CAAC;QACb,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QACxC;YACE,8CAA8C;YAC9C,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE;SAChC;KACF,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,yCAAyC,KAAK,wHAAwH;CACzK,CAAC;AAEW,QAAA,UAAU,GAAc;IACnC,OAAO,EAAE,mBAAW;IACpB,KAAK,EAAE,IAAI,GAAG,CAAC;QACb,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,uBAAW,EAAE,CAAC;QAClD,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,uBAAW,EAAE,CAAC;KACnD,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,yCAAyC,KAAK,wHAAwH;CACzK,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/constants.ts"],"names":[],"mappings":";;;AAEA,sDAA2E;AAC3E,wDAAgE;AAEnD,QAAA,UAAU,GAAG,oBAAoB,CAAC;AAC/C,MAAM,YAAY,GAAG,aAAa,CAAC;AACnC,MAAM,aAAa,GAAG,mDAAmD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AQ,EAAE,uBAAW,EAAE,CAAC;QAClD,CAAC,mBAAO,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,uBAAW,EAAE,CAAC;KACnD,CAAC;IACF,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE,CACrB,yCAAyC,KAAK,0HAC5C,uBAAW,aAAX,uBAAW,cAAX,uBAAW,GAAI,EACjB,EAAE;CACL,CAAC"}
@@ -9,6 +9,7 @@ export declare const voteProgramId: PublicKey;
9
9
  export declare const lockerPubkey: PublicKey;
10
10
  export declare const jupMint = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
11
11
  export declare const jupDecimals = 6;
12
+ export declare const jupApiToken: string | undefined;
12
13
  export declare const lfgApiBaseUrl = "https://worker.jup.ag/jup-claim-proof";
13
14
  export declare const lfgDisProgram = "DiSLRwcSFvtwvMWSs7ubBMvYRaYNYupa76ZSuYLe6D7j";
14
15
  export declare const airdropConfigs: AirdropConfig[];
@@ -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;YACz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B,+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,EAAE,6CAA6C;QACjE,KAAK,EAAE,KAAK;QACZ,UAAU,EAAV,kBAAU;QACV,UAAU,EAAE,CAAC,KAAa,EAAE,EAAE,CAC5B,GAAG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AE,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,GAAG,MAAM,KAAK,CAAC,OAAO,CAAW,mBAAO,EAAE;QAC1D,MAAM,EAAE,sBAAiB;QACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;K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;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"}
@@ -18,14 +18,18 @@ const klend_1 = require("./structs/klend");
18
18
  const apr_1 = require("./helpers/apr");
19
19
  const common_1 = require("./helpers/common");
20
20
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
21
+ var _a;
21
22
  const client = (0, clients_1.getClientSolana)();
22
23
  const reservesAccounts = (yield Promise.all([
23
24
  (0, solana_1.getParsedProgramAccounts)(client, klend_1.reserveStruct, constants_1.klendProgramId, (0, filters_1.dataSizeFilter)(8624)),
24
25
  (0, solana_1.getParsedProgramAccounts)(client, klend_1.reserveStruct, constants_1.klendProgramId, (0, filters_1.dataSizeFilter)(8464)),
25
26
  ])).flat();
27
+ const items = [];
26
28
  if (reservesAccounts.length !== 0) {
27
29
  const reserveById = {};
28
30
  for (const reserve of reservesAccounts) {
31
+ if (reserve.lendingMarket.toString() === '11111111111111111111111111111111')
32
+ continue;
29
33
  const borrowApr = (0, apr_1.calculateBorrowAPR)(reserve);
30
34
  const supplyApr = (0, apr_1.calculateSupplyAPR)(reserve);
31
35
  const exchangeRate = (0, common_1.getEchangeRate)(reserve);
@@ -34,7 +38,38 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
34
38
  supplyApr,
35
39
  exchangeRate,
36
40
  cumulativeBorrowRate });
41
+ const borrowedAmountRaw = reserve.liquidity.borrowedAmountSf.dividedBy(Math.pow(2, 60));
42
+ const depositedAmountRaw = reserve.liquidity.availableAmount.plus(borrowedAmountRaw);
43
+ const decimalsFactor = Math.pow(10, reserve.liquidity.mintDecimals.toNumber());
44
+ const rate = {
45
+ tokenAddress: reserve.liquidity.mintPubkey.toString(),
46
+ depositedAmount: depositedAmountRaw
47
+ .dividedBy(decimalsFactor)
48
+ .toNumber(),
49
+ depositYield: {
50
+ apy: (0, portfolio_core_1.aprToApy)(supplyApr),
51
+ apr: supplyApr,
52
+ },
53
+ borrowedAmount: borrowedAmountRaw.dividedBy(decimalsFactor).toNumber(),
54
+ borrowYield: {
55
+ apy: (0, portfolio_core_1.aprToApy)(borrowApr),
56
+ apr: borrowApr,
57
+ },
58
+ utilizationRatio: borrowedAmountRaw
59
+ .dividedBy(depositedAmountRaw)
60
+ .toNumber(),
61
+ platformId: constants_1.platformId,
62
+ poolName: (_a = constants_1.lendingConfigs.get(reserve.lendingMarket.toString())) === null || _a === void 0 ? void 0 : _a.name,
63
+ };
64
+ items.push({
65
+ key: `${reserve.pubkey.toString()}-${reserve.liquidity.mintPubkey.toString()}`,
66
+ value: rate,
67
+ });
37
68
  }
69
+ yield cache.setItems(items, {
70
+ prefix: portfolio_core_1.borrowLendRatesPrefix,
71
+ networkId: portfolio_core_1.NetworkId.solana,
72
+ });
38
73
  yield cache.setItem(constants_1.reservesKey, reserveById, {
39
74
  prefix: constants_1.platformId,
40
75
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/reservesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAAsE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,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/reservesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAGpC,iDAAsD;AACtD,+CAA8D;AAC9D,wDAA4D;AAC5D,2CAKqB;AACrB,2CAAgD;AAChD,uCAAuE;AAEvE,6CAA2E;AAE3E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,gBAAgB,GAAG,CACvB,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,iCAAwB,EACtB,MAAM,EACN,qBAAa,EACb,0BAAc,EACd,IAAA,wBAAc,EAAC,IAAI,CAAC,CACrB;QACD,IAAA,iCAAwB,EACtB,MAAM,EACN,qBAAa,EACb,0BAAc,EACd,IAAA,wBAAc,EAAC,IAAI,CAAC,CACrB;KACF,CAAC,CACH,CAAC,IAAI,EAAE,CAAC;IACT,MAAM,KAAK,GAAG,EAAE,CAAC;IACjB,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,MAAM,WAAW,GAAoC,EAAE,CAAC;QACxD,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE,CAAC;YACvC,IACE,OAAO,CAAC,aAAa,CAAC,QAAQ,EAAE,KAAK,kCAAkC;gBAEvE,SAAS;YACX,MAAM,SAAS,GAAG,IAAA,wBAAkB,EAAC,OAAO,CAAC,CAAC;YAC9C,MAAM,SAAS,GAAG,IAAA,wBAAkB,EAAC,OAAO,CAAC,CAAC;YAC9C,MAAM,YAAY,GAAG,IAAA,uBAAc,EAAC,OAAO,CAAC,CAAC;YAC7C,MAAM,oBAAoB,GAAG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AAC,IAAI,CAAC;gBACT,GAAG,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE;gBAC9E,KAAK,EAAE,IAAI;aACZ,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE;YAC1B,MAAM,EAAE,sCAAqB;YAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,KAAK,CAAC,OAAO,CAAC,uBAAW,EAAE,WAAW,EAAE;YAC5C,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -4,6 +4,5 @@ import { Platform } from '@sonarwatch/portfolio-core';
4
4
  import { PublicKey } from '@solana/web3.js';
5
5
  export declare const platformId = "loopscale";
6
6
  export declare const platform: Platform;
7
- export declare const marketsCachePrefix = "loopscale-markets";
8
- export declare const creditbookProgramId: PublicKey;
9
- export declare const lockboxProgramId: PublicKey;
7
+ export declare const vaultsCacheKey = "vaults";
8
+ export declare const loopscaleProgramId: PublicKey;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.lockboxProgramId = exports.creditbookProgramId = exports.marketsCachePrefix = exports.platform = exports.platformId = void 0;
3
+ exports.loopscaleProgramId = exports.vaultsCacheKey = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'loopscale';
6
6
  exports.platform = {
@@ -15,7 +15,6 @@ exports.platform = {
15
15
  github: 'https://github.com/bridgesplit',
16
16
  description: 'Loopscale is a new way to lend and borrow onchain with the best rates, any asset, and less risk.',
17
17
  };
18
- exports.marketsCachePrefix = `${exports.platformId}-markets`;
19
- exports.creditbookProgramId = new web3_js_1.PublicKey('abfcSQac2vK2Pa6UAJb37DzarVxF15bDTdphJzAqYYp');
20
- exports.lockboxProgramId = new web3_js_1.PublicKey('1oCkVqJ2uk4SuHyCuZKi8q3J6gjoe9Pux3XvHnHFVy4');
18
+ exports.vaultsCacheKey = `vaults`;
19
+ exports.loopscaleProgramId = new web3_js_1.PublicKey('1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78');
21
20
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EACH,+EAA+E;IACjF,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,6BAA6B;IACtC,qEAAqE;IACrE,aAAa,EAAE,6BAA6B;IAC5C,OAAO,EAAE,8BAA8B;IACvC,MAAM,EAAE,gCAAgC;IACxC,WAAW,EACT,kGAAkG;CACrG,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC;AAE7C,QAAA,mBAAmB,GAAG,IAAI,mBAAS,CAC9C,6CAA6C,CAC9C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,WAAW,CAAC;AACzB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EACH,+EAA+E;IACjF,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,6BAA6B;IACtC,qEAAqE;IACrE,aAAa,EAAE,6BAA6B;IAC5C,OAAO,EAAE,8BAA8B;IACvC,MAAM,EAAE,gCAAgC;IACxC,WAAW,EACT,kGAAkG;CACrG,CAAC;AACW,QAAA,cAAc,GAAG,QAAQ,CAAC;AAE1B,QAAA,kBAAkB,GAAG,IAAI,mBAAS,CAC7C,6CAA6C,CAC9C,CAAC"}
@@ -1,35 +1,8 @@
1
+ /// <reference types="node" />
1
2
  /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
3
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { Connection, PublicKey } from '@solana/web3.js';
4
- import { ParsedAccount } from '../../utils/solana';
5
- import { EscrowAccount, Ledger, LoanVault, Order } from './structs';
6
- export declare const getAdminOrgs: (connection: Connection, owner: string) => Promise<PublicKey[]>;
7
- export declare const getEscrows: (connection: Connection, adminOrgs: PublicKey[]) => Promise<ParsedAccount<EscrowAccount>[]>;
8
- export declare const getLoanVaults: (connection: Connection, escrowAccounts: ParsedAccount<EscrowAccount>[]) => Promise<{
9
- loansLent: ParsedAccount<LoanVault>[][];
10
- loansBorrowed: ParsedAccount<LoanVault>[][];
11
- }>;
12
- export declare const getOrdersForLoans: (connection: Connection, loans: ParsedAccount<LoanVault>[]) => Promise<{
13
- order: ParsedAccount<Order> | null;
14
- ledgers: Ledger[];
15
- orderAddress: PublicKey;
16
- }[]>;
17
- export declare const getLenderOrderValues: (orders: {
18
- order: ParsedAccount<Order> | null;
19
- ledgers: Ledger[];
20
- orderAddress: PublicKey;
21
- }[]) => Balances;
22
- export declare const getBorrowerOrderValues: (orders: {
23
- order: ParsedAccount<Order> | null;
24
- ledgers: Ledger[];
25
- orderAddress: PublicKey;
26
- }[]) => Balances;
27
- export declare const getBorrowerCollateralValues: (connection: Connection, orders: {
28
- order: ParsedAccount<Order> | null;
29
- ledgers: Ledger[];
30
- orderAddress: PublicKey;
31
- }[]) => Promise<Balances>;
32
- export declare const getTokensBalance: (owner: string) => Promise<Balances>;
33
- export type Balances = {
34
- [key: string]: number;
35
- };
4
+ import { PublicKey } from '@solana/web3.js';
5
+ import { Cache } from '../../Cache';
6
+ export declare const getProgramAddress: (seeds: (Uint8Array | Buffer)[], programId: PublicKey) => PublicKey;
7
+ export declare function bytesToNumberLE(bytes: Uint8Array): number;
8
+ export declare function getMarginFiAccountBalance(account: PublicKey, cache: Cache): Promise<number>;
@@ -12,151 +12,48 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getTokensBalance = exports.getBorrowerCollateralValues = exports.getBorrowerOrderValues = exports.getLenderOrderValues = exports.getOrdersForLoans = exports.getLoanVaults = exports.getEscrows = exports.getAdminOrgs = void 0;
15
+ exports.getMarginFiAccountBalance = exports.bytesToNumberLE = exports.getProgramAddress = void 0;
16
16
  const web3_js_1 = require("@solana/web3.js");
17
- const solana_1 = require("../../utils/solana");
18
- const constants_1 = require("./constants");
19
- const structs_1 = require("./structs");
20
- const filters_1 = require("./filters");
21
- const getSolanaDasEndpoint_1 = __importDefault(require("../../utils/clients/getSolanaDasEndpoint"));
22
- const getAssetsByOwnerDas_1 = require("../../utils/solana/das/getAssetsByOwnerDas");
23
- const isHeliusFungibleAsset_1 = require("../../utils/solana/das/isHeliusFungibleAsset");
24
- const getAdminOrgs = (connection, owner) => __awaiter(void 0, void 0, void 0, function* () {
25
- const roles = yield (0, solana_1.getParsedProgramAccounts)(connection, structs_1.roleAccountStruct, constants_1.creditbookProgramId, (0, filters_1.roleFilters)(owner));
26
- return roles
27
- .filter((r) => r.type === 4 || r.type === 5)
28
- .map((r) => r.organization);
29
- });
30
- exports.getAdminOrgs = getAdminOrgs;
31
- const getEscrows = (connection, adminOrgs) => __awaiter(void 0, void 0, void 0, function* () {
32
- return (yield Promise.all(adminOrgs.map((organizationIdentifier) => (0, solana_1.getParsedProgramAccounts)(connection, structs_1.escrowAccountStruct, constants_1.creditbookProgramId, (0, filters_1.escrowFilters)(organizationIdentifier.toString()))))).flat();
33
- });
34
- exports.getEscrows = getEscrows;
35
- const getLoanVaults = (connection, escrowAccounts) => __awaiter(void 0, void 0, void 0, function* () {
36
- const [loansBorrowed, loansLent] = yield Promise.all([
37
- yield Promise.all(escrowAccounts.map((escrowAccount) => (0, solana_1.getParsedProgramAccounts)(connection, structs_1.loanVaultStruct, constants_1.creditbookProgramId, (0, filters_1.loanVaultBorrowedFilters)(escrowAccount.pubkey.toString())))),
38
- yield Promise.all(escrowAccounts.map((escrowAccount) => (0, solana_1.getParsedProgramAccounts)(connection, structs_1.loanVaultStruct, constants_1.creditbookProgramId, (0, filters_1.loanVaultLentFilters)(escrowAccount.pubkey.toString())))),
39
- ]);
40
- return {
41
- loansLent,
42
- loansBorrowed,
43
- };
44
- });
45
- exports.getLoanVaults = getLoanVaults;
46
- const getOrdersForLoans = (connection, loans) => __awaiter(void 0, void 0, void 0, function* () {
47
- const orderAddresses = loans.map((l) => l.order);
48
- const orders = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.orderStruct, orderAddresses);
49
- const orderLedgerAddresses = orderAddresses.map((o) => web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('order_ledgers'), o.toBytes()], constants_1.creditbookProgramId)[0]);
50
- const orderLedgers = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.orderLedgerStruct, orderLedgerAddresses);
51
- const orderData = [];
52
- for (let i = 0; i < orderAddresses.length; i++) {
53
- const order = orders[i];
54
- const orderLedger = orderLedgers[i];
55
- if (!orderLedger)
56
- continue;
57
- const { ledgers } = orderLedger;
58
- const orderAddress = orderAddresses[i];
59
- orderData.push({ order, ledgers, orderAddress });
60
- }
61
- return orderData;
62
- });
63
- exports.getOrdersForLoans = getOrdersForLoans;
64
- const getLenderOrderValues = (orders) => {
65
- const loanValues = {};
66
- for (let i = 0; i < orders.length; i++) {
67
- const order = orders[i];
68
- if (!order.order || !order.order.principal_mint)
69
- continue;
70
- const principal = order.order.principal_mint.toString();
71
- const totalOwed = getOrderDueAmount(order.ledgers);
72
- if (!Object.keys(loanValues).includes(principal)) {
73
- loanValues[principal] = totalOwed;
74
- }
75
- else {
76
- loanValues[principal] += totalOwed;
77
- }
78
- }
79
- return loanValues;
17
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
+ const getMarginFiAccounts_1 = require("../marginfi/getMarginFiAccounts");
19
+ const helpers_1 = require("../marginfi/helpers");
20
+ const getProgramAddress = (seeds, programId) => {
21
+ const [key] = web3_js_1.PublicKey.findProgramAddressSync(seeds, programId);
22
+ return key;
80
23
  };
81
- exports.getLenderOrderValues = getLenderOrderValues;
82
- const getBorrowerOrderValues = (orders) => {
83
- const loanValues = {};
84
- for (let i = 0; i < orders.length; i++) {
85
- const order = orders[i];
86
- if (!order.order || !order.order.principal_mint)
87
- continue;
88
- const principal = order.order.principal_mint.toString();
89
- const totalDue = getOrderDueAmount(order.ledgers);
90
- if (!Object.keys(loanValues).includes(principal)) {
91
- loanValues[principal] = totalDue;
92
- }
93
- else {
94
- loanValues[principal] += totalDue;
95
- }
24
+ exports.getProgramAddress = getProgramAddress;
25
+ function bytesToNumberLE(bytes) {
26
+ let result = BigInt(0);
27
+ for (let i = bytes.length - 1; i >= 0; i--) {
28
+ // eslint-disable-next-line no-bitwise
29
+ result = (result << BigInt(8)) | BigInt(bytes[i]);
96
30
  }
97
- return loanValues;
98
- };
99
- exports.getBorrowerOrderValues = getBorrowerOrderValues;
100
- function getOrderDueAmount(ledgers) {
101
- return ledgers.reduce((prev, curr) => prev +
102
- (curr.principal_due.toNumber() - curr.principal_repaid.toNumber()) +
103
- (curr.interest_due.toNumber() - curr.interest_repaid.toNumber()), 0);
31
+ return Number(result);
104
32
  }
105
- const getBorrowerCollateralValues = (connection, orders) => __awaiter(void 0, void 0, void 0, function* () {
106
- const lbNfts = orders.map((o) => { var _a; return (_a = o.order) === null || _a === void 0 ? void 0 : _a.collateral_mint; });
107
- const lockboxes = yield fetchLockboxesFromNFTs(connection, lbNfts.filter((p) => p !== null));
108
- const balances = yield Promise.all(lockboxes.map((lockbox) => (0, exports.getTokensBalance)(lockbox.toString())));
109
- return mergeBalances(balances);
110
- });
111
- exports.getBorrowerCollateralValues = getBorrowerCollateralValues;
112
- const fetchLockboxesFromNFTs = (connection, nfts) => __awaiter(void 0, void 0, void 0, function* () {
113
- const lbs = [];
114
- for (let i = 0; i < nfts.length; i++) {
115
- const lb = yield (0, solana_1.getParsedProgramAccounts)(connection, structs_1.lockboxStruct, constants_1.lockboxProgramId, (0, filters_1.lockboxFilters)(nfts[i].toString()));
116
- if (lb.length > 0)
117
- lbs.push(lb[0].pubkey);
118
- }
119
- return lbs;
120
- });
121
- const getTokensBalance = (owner) => __awaiter(void 0, void 0, void 0, function* () {
122
- const dasEndpoint = (0, getSolanaDasEndpoint_1.default)();
123
- const items = yield (0, getAssetsByOwnerDas_1.getAssetsByOwnerDas)(dasEndpoint, owner, {
124
- showNativeBalance: false,
125
- showGrandTotal: false,
126
- showInscription: false,
127
- });
128
- const escrowValues = {};
129
- items.filter(isHeliusFungibleAsset_1.isHeliusFungibleAsset).forEach((asset) => {
130
- var _a;
131
- if (!((_a = asset.token_info) === null || _a === void 0 ? void 0 : _a.balance))
132
- return;
133
- if (!Object.keys(escrowValues).includes(asset.id)) {
134
- escrowValues[asset.id] = asset.token_info.balance;
135
- }
136
- else {
137
- escrowValues[asset.id] += asset.token_info.balance;
138
- }
139
- });
140
- return escrowValues;
141
- });
142
- exports.getTokensBalance = getTokensBalance;
143
- const mergeBalances = (balances) => {
144
- if (!balances.length)
145
- return {};
146
- if (balances.length === 1)
147
- return balances[0];
148
- const mainBalance = balances[0];
149
- for (let i = 1; i < balances.length; i++) {
150
- Object.keys(balances[i]).forEach((mint) => {
151
- const amount = balances[i][mint];
152
- if (!Object.keys(mainBalance).includes(mint)) {
153
- mainBalance[mint] = amount;
154
- }
155
- else {
156
- mainBalance[mint] += amount;
157
- }
33
+ exports.bytesToNumberLE = bytesToNumberLE;
34
+ function getMarginFiAccountBalance(account, cache) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ const marginFiAccounts = yield (0, getMarginFiAccounts_1.getMarginFiAccounts)(account.toString(), cache);
37
+ let accountBalance = 0;
38
+ marginFiAccounts.forEach((acc) => {
39
+ if (!acc)
40
+ return;
41
+ acc.balances.forEach((balance) => {
42
+ if (!balance)
43
+ return;
44
+ const shareBalance = (0, helpers_1.wrappedI80F48toBigNumber)(balance.assetShares);
45
+ const { bank } = balance;
46
+ if (bank !== undefined) {
47
+ const shareValue = (0, helpers_1.wrappedI80F48toBigNumber)({
48
+ value: new bignumber_js_1.default(bank.assetShareValue.value),
49
+ });
50
+ const totalValue = shareBalance.multipliedBy(shareValue);
51
+ accountBalance += totalValue.toNumber();
52
+ }
53
+ });
158
54
  });
159
- }
160
- return mainBalance;
161
- };
55
+ return accountBalance;
56
+ });
57
+ }
58
+ exports.getMarginFiAccountBalance = getMarginFiAccountBalance;
162
59
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAAwD;AACxD,+CAI4B;AAC5B,2CAAoE;AACpE,uCAYmB;AACnB,uCAMmB;AACnB,oGAA4E;AAC5E,oFAAiF;AACjF,wFAAqF;AAE9E,MAAM,YAAY,GAAG,CAC1B,UAAsB,EACtB,KAAa,EACS,EAAE;IACxB,MAAM,KAAK,GAAG,MAAM,IAAA,iCAAwB,EAC1C,UAAU,EACV,2BAAiB,EACjB,+BAAmB,EACnB,IAAA,qBAAW,EAAC,KAAK,CAAC,CACnB,C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AW,CAAC,CAAC;gBAEnE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;gBACzB,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvB,MAAM,UAAU,GAAG,IAAA,kCAAwB,EAAC;wBAC1C,KAAK,EAAE,IAAI,sBAAS,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;qBACjD,CAAC,CAAC;oBACH,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;oBACzD,cAAc,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBAC1C,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO,cAAc,CAAC;IACxB,CAAC;CAAA;AAxBD,8DAwBC"}
@@ -5,8 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
- const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
8
+ const lendVaultsFetcher_1 = __importDefault(require("./lendVaultsFetcher"));
9
+ const vaultsJob_1 = __importDefault(require("./vaultsJob"));
10
+ const lendFetcher_1 = __importDefault(require("./lendFetcher"));
11
+ const loansFetcher_1 = __importDefault(require("./loansFetcher"));
9
12
  exports.platforms = [constants_1.platform];
10
- exports.jobs = [];
11
- exports.fetchers = [positionsFetcher_1.default];
13
+ exports.jobs = [vaultsJob_1.default];
14
+ exports.fetchers = [
15
+ lendVaultsFetcher_1.default,
16
+ lendFetcher_1.default,
17
+ loansFetcher_1.default,
18
+ ];
12
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,4EAAoD;AACpD,4DAAoC;AACpC,gEAAwC;AACxC,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc;IACjC,2BAAiB;IACjB,qBAAW;IACX,sBAAY;CACb,CAAC"}