@sonarwatch/portfolio-plugins 0.11.184 → 0.11.185

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. package/CHANGELOG.md +1468 -1459
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/index.js +2 -0
  5. package/src/index.js.map +1 -1
  6. package/src/plugins/aave/constants.d.ts +1 -1
  7. package/src/plugins/aave/constants.js +2 -2
  8. package/src/plugins/aave/constants.js.map +1 -1
  9. package/src/plugins/aave/index.js +1 -1
  10. package/src/plugins/aave/index.js.map +1 -1
  11. package/src/plugins/aftermath/constants.d.ts +1 -1
  12. package/src/plugins/aftermath/constants.js +2 -2
  13. package/src/plugins/aftermath/constants.js.map +1 -1
  14. package/src/plugins/aftermath/index.js +1 -1
  15. package/src/plugins/aftermath/index.js.map +1 -1
  16. package/src/plugins/aptin/constants.d.ts +3 -0
  17. package/src/plugins/aptin/constants.js +5 -2
  18. package/src/plugins/aptin/constants.js.map +1 -1
  19. package/src/plugins/aptin/depositsFetcher.js +2 -2
  20. package/src/plugins/aptin/depositsFetcher.js.map +1 -1
  21. package/src/plugins/armada-staking/constants.js +6 -6
  22. package/src/plugins/armada-staking/constants.js.map +1 -1
  23. package/src/plugins/aurory/constants.d.ts +1 -1
  24. package/src/plugins/aurory/constants.js +3 -3
  25. package/src/plugins/aurory/constants.js.map +1 -1
  26. package/src/plugins/aurory/stakingFetcher.js +2 -2
  27. package/src/plugins/aurory/stakingFetcher.js.map +1 -1
  28. package/src/plugins/auxexchange/aptosLpJob.js +2 -2
  29. package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
  30. package/src/plugins/auxexchange/constants.d.ts +2 -2
  31. package/src/plugins/auxexchange/constants.js +4 -4
  32. package/src/plugins/auxexchange/constants.js.map +1 -1
  33. package/src/plugins/auxexchange/index.js +1 -1
  34. package/src/plugins/auxexchange/index.js.map +1 -1
  35. package/src/plugins/balancer/helpers/pools.js +21 -21
  36. package/src/plugins/banx/constants.js +1 -1
  37. package/src/plugins/banx/constants.js.map +1 -1
  38. package/src/plugins/bucket/constants.d.ts +1 -1
  39. package/src/plugins/bucket/constants.js +2 -2
  40. package/src/plugins/bucket/constants.js.map +1 -1
  41. package/src/plugins/bucket/index.js +1 -1
  42. package/src/plugins/bucket/index.js.map +1 -1
  43. package/src/plugins/cetus/constants.d.ts +1 -1
  44. package/src/plugins/cetus/constants.js +2 -2
  45. package/src/plugins/cetus/constants.js.map +1 -1
  46. package/src/plugins/cetus/index.js +1 -1
  47. package/src/plugins/cetus/index.js.map +1 -1
  48. package/src/plugins/clone/constants.js +1 -1
  49. package/src/plugins/clone/constants.js.map +1 -1
  50. package/src/plugins/compound/constants.d.ts +1 -1
  51. package/src/plugins/compound/constants.js +2 -2
  52. package/src/plugins/compound/constants.js.map +1 -1
  53. package/src/plugins/compound/index.js +1 -1
  54. package/src/plugins/compound/index.js.map +1 -1
  55. package/src/plugins/curve/constants.d.ts +1 -1
  56. package/src/plugins/curve/constants.js +2 -2
  57. package/src/plugins/curve/constants.js.map +1 -1
  58. package/src/plugins/curve/index.js +1 -1
  59. package/src/plugins/curve/index.js.map +1 -1
  60. package/src/plugins/daos/constants.js +2 -1
  61. package/src/plugins/daos/constants.js.map +1 -1
  62. package/src/plugins/drift/constants.d.ts +1 -1
  63. package/src/plugins/drift/constants.js +2 -2
  64. package/src/plugins/drift/constants.js.map +1 -1
  65. package/src/plugins/drift/index.js +1 -1
  66. package/src/plugins/drift/index.js.map +1 -1
  67. package/src/plugins/flash/poolJob.js +23 -8
  68. package/src/plugins/flash/poolJob.js.map +1 -1
  69. package/src/plugins/flash/stakeFetcher.js +20 -6
  70. package/src/plugins/flash/stakeFetcher.js.map +1 -1
  71. package/src/plugins/flash/types.d.ts +1 -0
  72. package/src/plugins/flexlend/constants.d.ts +1 -1
  73. package/src/plugins/flexlend/constants.js +2 -2
  74. package/src/plugins/flexlend/constants.js.map +1 -1
  75. package/src/plugins/flexlend/depositsFetcher.js +1 -1
  76. package/src/plugins/flexlend/depositsFetcher.js.map +1 -1
  77. package/src/plugins/flexlend/index.js +1 -1
  78. package/src/plugins/flexlend/index.js.map +1 -1
  79. package/src/plugins/goosefx/constants.d.ts +1 -1
  80. package/src/plugins/goosefx/constants.js +2 -2
  81. package/src/plugins/goosefx/constants.js.map +1 -1
  82. package/src/plugins/goosefx/index.js +1 -1
  83. package/src/plugins/goosefx/index.js.map +1 -1
  84. package/src/plugins/hawksight/constants.d.ts +1 -1
  85. package/src/plugins/hawksight/constants.js +2 -2
  86. package/src/plugins/hawksight/constants.js.map +1 -1
  87. package/src/plugins/hawksight/index.js +1 -1
  88. package/src/plugins/hawksight/index.js.map +1 -1
  89. package/src/plugins/jito/constants.d.ts +1 -1
  90. package/src/plugins/jito/constants.js +2 -2
  91. package/src/plugins/jito/constants.js.map +1 -1
  92. package/src/plugins/jito/index.js +1 -1
  93. package/src/plugins/jito/index.js.map +1 -1
  94. package/src/plugins/jupiter/exchange/constants.d.ts +1 -1
  95. package/src/plugins/jupiter/exchange/constants.js +2 -2
  96. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  97. package/src/plugins/jupiter/exchange/dcaFetcher.js +1 -1
  98. package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
  99. package/src/plugins/jupiter/governance/constants.d.ts +2 -2
  100. package/src/plugins/jupiter/governance/constants.js +4 -4
  101. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  102. package/src/plugins/jupiter/governance/voteFetcher.js +2 -2
  103. package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -1
  104. package/src/plugins/jupiter/index.js +3 -3
  105. package/src/plugins/jupiter/index.js.map +1 -1
  106. package/src/plugins/jupiter/launchpad/allocationsFetcher.js +2 -2
  107. package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
  108. package/src/plugins/jupiter/launchpad/constants.d.ts +2 -2
  109. package/src/plugins/jupiter/launchpad/constants.js +4 -4
  110. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  111. package/src/plugins/kamino/airdropFetcher.js +2 -2
  112. package/src/plugins/kamino/airdropFetcher.js.map +1 -1
  113. package/src/plugins/kamino/constants.d.ts +1 -1
  114. package/src/plugins/kamino/constants.js +2 -2
  115. package/src/plugins/kamino/constants.js.map +1 -1
  116. package/src/plugins/kamino/index.js +1 -1
  117. package/src/plugins/kamino/index.js.map +1 -1
  118. package/src/plugins/lido/constants.d.ts +1 -1
  119. package/src/plugins/lido/constants.js +2 -2
  120. package/src/plugins/lido/constants.js.map +1 -1
  121. package/src/plugins/lido/index.js +1 -1
  122. package/src/plugins/lido/index.js.map +1 -1
  123. package/src/plugins/liquidswap/constants.d.ts +1 -1
  124. package/src/plugins/liquidswap/constants.js +2 -2
  125. package/src/plugins/liquidswap/constants.js.map +1 -1
  126. package/src/plugins/liquidswap/index.js +1 -1
  127. package/src/plugins/liquidswap/index.js.map +1 -1
  128. package/src/plugins/magiceden/constants.d.ts +1 -1
  129. package/src/plugins/magiceden/constants.js +2 -2
  130. package/src/plugins/magiceden/constants.js.map +1 -1
  131. package/src/plugins/magiceden/index.js +1 -1
  132. package/src/plugins/magiceden/index.js.map +1 -1
  133. package/src/plugins/maker/constants.d.ts +1 -1
  134. package/src/plugins/maker/constants.js +2 -2
  135. package/src/plugins/maker/constants.js.map +1 -1
  136. package/src/plugins/maker/index.js +1 -1
  137. package/src/plugins/maker/index.js.map +1 -1
  138. package/src/plugins/mango/constants.d.ts +1 -1
  139. package/src/plugins/mango/constants.js +2 -2
  140. package/src/plugins/mango/constants.js.map +1 -1
  141. package/src/plugins/mango/index.js +1 -1
  142. package/src/plugins/mango/index.js.map +1 -1
  143. package/src/plugins/maple/constants.d.ts +1 -1
  144. package/src/plugins/maple/constants.js +2 -2
  145. package/src/plugins/maple/constants.js.map +1 -1
  146. package/src/plugins/maple/index.js +1 -1
  147. package/src/plugins/maple/index.js.map +1 -1
  148. package/src/plugins/marginfi/constants.d.ts +2 -2
  149. package/src/plugins/marginfi/constants.js +3 -3
  150. package/src/plugins/marginfi/constants.js.map +1 -1
  151. package/src/plugins/marginfi/index.js +1 -1
  152. package/src/plugins/marginfi/index.js.map +1 -1
  153. package/src/plugins/marinade/constants.d.ts +1 -1
  154. package/src/plugins/marinade/constants.js +2 -2
  155. package/src/plugins/marinade/constants.js.map +1 -1
  156. package/src/plugins/marinade/index.js +1 -1
  157. package/src/plugins/marinade/index.js.map +1 -1
  158. package/src/plugins/meteora/constants.d.ts +1 -1
  159. package/src/plugins/meteora/constants.js +2 -2
  160. package/src/plugins/meteora/constants.js.map +1 -1
  161. package/src/plugins/meteora/index.js +1 -1
  162. package/src/plugins/meteora/index.js.map +1 -1
  163. package/src/plugins/morpho/constants.d.ts +1 -1
  164. package/src/plugins/morpho/constants.js +2 -2
  165. package/src/plugins/morpho/constants.js.map +1 -1
  166. package/src/plugins/morpho/index.js +1 -1
  167. package/src/plugins/morpho/index.js.map +1 -1
  168. package/src/plugins/native-stake/solana/solanaFetcher.js +7 -7
  169. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  170. package/src/plugins/navi/constants.d.ts +1 -1
  171. package/src/plugins/navi/constants.js +2 -2
  172. package/src/plugins/navi/constants.js.map +1 -1
  173. package/src/plugins/navi/index.js +1 -1
  174. package/src/plugins/navi/index.js.map +1 -1
  175. package/src/plugins/nosana/constants.js +1 -1
  176. package/src/plugins/nosana/constants.js.map +1 -1
  177. package/src/plugins/orca/constants.d.ts +1 -1
  178. package/src/plugins/orca/constants.js +2 -2
  179. package/src/plugins/orca/constants.js.map +1 -1
  180. package/src/plugins/orca/index.js +1 -1
  181. package/src/plugins/orca/index.js.map +1 -1
  182. package/src/plugins/pancakeswap/constants.d.ts +1 -1
  183. package/src/plugins/pancakeswap/constants.js +2 -2
  184. package/src/plugins/pancakeswap/constants.js.map +1 -1
  185. package/src/plugins/pancakeswap/index.js +1 -1
  186. package/src/plugins/pancakeswap/index.js.map +1 -1
  187. package/src/plugins/paraswap/constants.d.ts +1 -1
  188. package/src/plugins/paraswap/constants.js +2 -2
  189. package/src/plugins/paraswap/constants.js.map +1 -1
  190. package/src/plugins/paraswap/index.js +1 -1
  191. package/src/plugins/paraswap/index.js.map +1 -1
  192. package/src/plugins/parcl/constants.d.ts +1 -1
  193. package/src/plugins/parcl/constants.js +2 -2
  194. package/src/plugins/parcl/constants.js.map +1 -1
  195. package/src/plugins/parcl/index.js +1 -1
  196. package/src/plugins/parcl/index.js.map +1 -1
  197. package/src/plugins/rain/constants.js +1 -1
  198. package/src/plugins/rain/constants.js.map +1 -1
  199. package/src/plugins/raydium/constants.d.ts +1 -1
  200. package/src/plugins/raydium/constants.js +2 -2
  201. package/src/plugins/raydium/constants.js.map +1 -1
  202. package/src/plugins/raydium/index.js +1 -1
  203. package/src/plugins/raydium/index.js.map +1 -1
  204. package/src/plugins/rocket-pool/constants.d.ts +1 -1
  205. package/src/plugins/rocket-pool/constants.js +2 -2
  206. package/src/plugins/rocket-pool/constants.js.map +1 -1
  207. package/src/plugins/rocket-pool/index.js +1 -1
  208. package/src/plugins/rocket-pool/index.js.map +1 -1
  209. package/src/plugins/saber/constants.d.ts +1 -1
  210. package/src/plugins/saber/constants.js +2 -2
  211. package/src/plugins/saber/constants.js.map +1 -1
  212. package/src/plugins/saber/index.js +1 -1
  213. package/src/plugins/saber/index.js.map +1 -1
  214. package/src/plugins/scallop/constants.d.ts +1 -1
  215. package/src/plugins/scallop/constants.js +9 -9
  216. package/src/plugins/scallop/constants.js.map +1 -1
  217. package/src/plugins/scallop/index.js +1 -1
  218. package/src/plugins/scallop/index.js.map +1 -1
  219. package/src/plugins/solend/constants.d.ts +1 -1
  220. package/src/plugins/solend/constants.js +2 -2
  221. package/src/plugins/solend/constants.js.map +1 -1
  222. package/src/plugins/solend/index.js +1 -1
  223. package/src/plugins/solend/index.js.map +1 -1
  224. package/src/plugins/stader/constants.d.ts +1 -1
  225. package/src/plugins/stader/constants.js +2 -2
  226. package/src/plugins/stader/constants.js.map +1 -1
  227. package/src/plugins/stader/index.js +1 -1
  228. package/src/plugins/stader/index.js.map +1 -1
  229. package/src/plugins/stargate/constants.d.ts +1 -1
  230. package/src/plugins/stargate/constants.js +2 -2
  231. package/src/plugins/stargate/constants.js.map +1 -1
  232. package/src/plugins/stargate/index.js +1 -1
  233. package/src/plugins/stargate/index.js.map +1 -1
  234. package/src/plugins/sushiswap/helpers.js +24 -24
  235. package/src/plugins/switchboard/constants.d.ts +1 -0
  236. package/src/plugins/switchboard/constants.js +5 -0
  237. package/src/plugins/switchboard/constants.js.map +1 -0
  238. package/src/plugins/switchboard/helpers/getSwitchboardPrice.d.ts +3 -0
  239. package/src/plugins/switchboard/helpers/getSwitchboardPrice.js +20 -0
  240. package/src/plugins/switchboard/helpers/getSwitchboardPrice.js.map +1 -0
  241. package/src/plugins/switchboard/helpers/getSwitchboardPrices.d.ts +3 -0
  242. package/src/plugins/switchboard/helpers/getSwitchboardPrices.js +23 -0
  243. package/src/plugins/switchboard/helpers/getSwitchboardPrices.js.map +1 -0
  244. package/src/plugins/switchboard/helpers/misc.d.ts +2 -0
  245. package/src/plugins/switchboard/helpers/misc.js +26 -0
  246. package/src/plugins/switchboard/helpers/misc.js.map +1 -0
  247. package/src/plugins/switchboard/index.d.ts +4 -0
  248. package/src/plugins/switchboard/index.js +10 -0
  249. package/src/plugins/switchboard/index.js.map +1 -0
  250. package/src/plugins/switchboard/pricingJob.d.ts +3 -0
  251. package/src/plugins/switchboard/pricingJob.js +57 -0
  252. package/src/plugins/switchboard/pricingJob.js.map +1 -0
  253. package/src/plugins/switchboard/structs.d.ts +74 -0
  254. package/src/plugins/switchboard/structs.js +72 -0
  255. package/src/plugins/switchboard/structs.js.map +1 -0
  256. package/src/plugins/tensor/constants.d.ts +1 -1
  257. package/src/plugins/tensor/constants.js +2 -2
  258. package/src/plugins/tensor/constants.js.map +1 -1
  259. package/src/plugins/tensor/index.js +1 -1
  260. package/src/plugins/tensor/index.js.map +1 -1
  261. package/src/plugins/thala/constants.d.ts +12 -5
  262. package/src/plugins/thala/constants.js +9 -9
  263. package/src/plugins/thala/constants.js.map +1 -1
  264. package/src/plugins/thala/index.js +1 -1
  265. package/src/plugins/thala/index.js.map +1 -1
  266. package/src/plugins/thala/vaultsRatesJob.js +1 -1
  267. package/src/plugins/thala/vaultsRatesJob.js.map +1 -1
  268. package/src/plugins/turbos/constants.d.ts +1 -1
  269. package/src/plugins/turbos/constants.js +2 -2
  270. package/src/plugins/turbos/constants.js.map +1 -1
  271. package/src/plugins/turbos/index.js +1 -1
  272. package/src/plugins/turbos/index.js.map +1 -1
  273. package/src/plugins/uniswap/constants.d.ts +1 -1
  274. package/src/plugins/uniswap/constants.js +2 -2
  275. package/src/plugins/uniswap/constants.js.map +1 -1
  276. package/src/plugins/uniswap/index.js +1 -1
  277. package/src/plugins/uniswap/index.js.map +1 -1
  278. package/src/plugins/uniswap-v2/helpers.js +22 -22
  279. package/src/plugins/venus/constants.d.ts +1 -1
  280. package/src/plugins/venus/constants.js +3 -7
  281. package/src/plugins/venus/constants.js.map +1 -1
  282. package/src/plugins/venus/index.js +1 -1
  283. package/src/plugins/venus/index.js.map +1 -1
  284. package/src/plugins/wormhole/constants.js +1 -1
  285. package/src/plugins/wormhole/constants.js.map +1 -1
  286. package/src/plugins/x-staking-solana/constants.js +2 -2
  287. package/src/plugins/x-staking-solana/constants.js.map +1 -1
  288. package/src/plugins/zeta/constants.d.ts +1 -1
  289. package/src/plugins/zeta/constants.js +2 -2
  290. package/src/plugins/zeta/constants.js.map +1 -1
  291. package/src/plugins/zeta/index.js +1 -1
  292. package/src/plugins/zeta/index.js.map +1 -1
  293. package/src/utils/sei/constants.js +8 -8
  294. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -1,4 +1,4 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  export declare const platformId = "saber";
3
- export declare const saberPlatform: Platform;
3
+ export declare const platform: Platform;
4
4
  export declare const SABER_SWAPS = "https://raw.githubusercontent.com/saber-hq/saber-registry-dist/master/data/swaps.mainnet.json";
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SABER_SWAPS = exports.saberPlatform = exports.platformId = void 0;
3
+ exports.SABER_SWAPS = exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'saber';
5
- exports.saberPlatform = {
5
+ exports.platform = {
6
6
  id: exports.platformId,
7
7
  name: 'Saber',
8
8
  image: 'https://sonar.watch/img/platforms/saber.png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAa;IACrC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}
@@ -6,6 +6,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.jobs = exports.platforms = void 0;
7
7
  const lpTokensJob_1 = __importDefault(require("./lpTokensJob"));
8
8
  const constants_1 = require("./constants");
9
- exports.platforms = [constants_1.saberPlatform];
9
+ exports.platforms = [constants_1.platform];
10
10
  exports.jobs = [lpTokensJob_1.default];
11
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/index.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAwC;AACxC,2CAA4C;AAE/B,QAAA,SAAS,GAAe,CAAC,yBAAa,CAAC,CAAC;AACxC,QAAA,IAAI,GAAU,CAAC,qBAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/index.ts"],"names":[],"mappings":";;;;;;AAEA,gEAAwC;AACxC,2CAAuC;AAE1B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,qBAAW,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  export declare const platformId = "scallop";
3
+ export declare const platform: Platform;
3
4
  export declare const addressPrefix = "scallop-address";
4
5
  export declare const marketPrefix = "scallop-market";
5
6
  export declare const poolsPrefix = "scallop-pools";
@@ -12,7 +13,6 @@ export declare const spoolsKey = "scallop-spoolsmarket-key";
12
13
  export declare const spoolAccountPackageId = "0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount";
13
14
  export declare const marketCoinPackageId = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::reserve::MarketCoin";
14
15
  export declare const obligationKeyPackageId = "0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf::obligation::ObligationKey";
15
- export declare const scallopPlatform: Platform;
16
16
  export declare const baseIndexRate = 1000000000;
17
17
  export declare const scaAddress = "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA";
18
18
  export declare const scaDecimals = 9;
@@ -1,8 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.scallopPlatform = exports.obligationKeyPackageId = exports.marketCoinPackageId = exports.spoolAccountPackageId = exports.spoolsKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.marketPrefix = exports.addressPrefix = exports.platformId = void 0;
4
- const PROTOCOL_OBJECT_ID = '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf';
3
+ exports.scaDecimals = exports.scaAddress = exports.baseIndexRate = exports.obligationKeyPackageId = exports.marketCoinPackageId = exports.spoolAccountPackageId = exports.spoolsKey = exports.poolsKey = exports.marketKey = exports.addressKey = exports.addressEndpoint = exports.spoolsPrefix = exports.poolsPrefix = exports.marketPrefix = exports.addressPrefix = exports.platform = exports.platformId = void 0;
5
4
  exports.platformId = 'scallop';
5
+ exports.platform = {
6
+ id: exports.platformId,
7
+ name: 'Scallop',
8
+ image: `https://sonar.watch/img/platforms/${exports.platformId}.png`,
9
+ defiLlamaId: 'parent#scallop',
10
+ website: 'https://app.scallop.io/',
11
+ };
6
12
  exports.addressPrefix = `${exports.platformId}-address`;
7
13
  exports.marketPrefix = `${exports.platformId}-market`;
8
14
  exports.poolsPrefix = `${exports.platformId}-pools`;
@@ -13,15 +19,9 @@ exports.marketKey = 'scallop-market-key';
13
19
  exports.poolsKey = 'scallop-pools-key';
14
20
  exports.spoolsKey = 'scallop-spoolsmarket-key';
15
21
  exports.spoolAccountPackageId = `0xe87f1b2d498106a2c61421cec75b7b5c5e348512b0dc263949a0e7a3c256571a::spool_account::SpoolAccount`;
22
+ const PROTOCOL_OBJECT_ID = '0xefe8b36d5b2e43728cc323298626b83177803521d195cfb11e15b910e892fddf';
16
23
  exports.marketCoinPackageId = `${PROTOCOL_OBJECT_ID}::reserve::MarketCoin`;
17
24
  exports.obligationKeyPackageId = `${PROTOCOL_OBJECT_ID}::obligation::ObligationKey`;
18
- exports.scallopPlatform = {
19
- id: exports.platformId,
20
- name: 'Scallop',
21
- image: `https://sonar.watch/img/platforms/${exports.platformId}.png`,
22
- defiLlamaId: 'parent#scallop',
23
- website: 'https://app.scallop.io/',
24
- };
25
25
  exports.baseIndexRate = 1000000000;
26
26
  exports.scaAddress = '0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA';
27
27
  exports.scaDecimals = 9;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/constants.ts"],"names":[],"mappings":";;;AAEA,MAAM,kBAAkB,GACtB,oEAAoE,CAAC;AAC1D,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AAC1H,QAAA,mBAAmB,GAAG,GAAG,kBAAkB,uBAAuB,CAAC;AACnE,QAAA,sBAAsB,GAAG,GAAG,kBAAkB,6BAA6B,CAAC;AAE5E,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,UAAa,CAAC;AAC9B,QAAA,UAAU,GACrB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,yBAAyB;CACnC,CAAC;AAEW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,YAAY,GAAG,GAAG,kBAAU,SAAS,CAAC;AACtC,QAAA,WAAW,GAAG,GAAG,kBAAU,QAAQ,CAAC;AACpC,QAAA,YAAY,GAAG,GAAG,kBAAU,eAAe,CAAC;AAE5C,QAAA,eAAe,GAC1B,+DAA+D,CAAC;AACrD,QAAA,UAAU,GAAG,qBAAqB,CAAC;AACnC,QAAA,SAAS,GAAG,oBAAoB,CAAC;AACjC,QAAA,QAAQ,GAAG,mBAAmB,CAAC;AAC/B,QAAA,SAAS,GAAG,0BAA0B,CAAC;AAEvC,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AACvI,MAAM,kBAAkB,GACtB,oEAAoE,CAAC;AAC1D,QAAA,mBAAmB,GAAG,GAAG,kBAAkB,uBAAuB,CAAC;AACnE,QAAA,sBAAsB,GAAG,GAAG,kBAAkB,6BAA6B,CAAC;AAC5E,QAAA,aAAa,GAAG,UAAa,CAAC;AAC9B,QAAA,UAAU,GACrB,8EAA8E,CAAC;AACpE,QAAA,WAAW,GAAG,CAAC,CAAC"}
@@ -18,5 +18,5 @@ exports.fetchers = [
18
18
  obligationsFetcher_1.default,
19
19
  veScaFetcher_1.default,
20
20
  ];
21
- exports.platforms = [constants_1.scallopPlatform];
21
+ exports.platforms = [constants_1.platform];
22
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAEhD,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,2CAA8C;AAEjC,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,kBAAQ,EAAE,mBAAS,EAAE,yBAAe,CAAC,CAAC;AACjE,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;CACb,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/index.ts"],"names":[],"mappings":";;;;;;AAGA,0DAAkC;AAClC,8DAAsC;AACtC,4DAAoC;AACpC,wEAAgD;AAEhD,wEAAgD;AAChD,kEAA0C;AAC1C,8EAAsD;AACtD,2CAAuC;AAE1B,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,kBAAQ,EAAE,mBAAS,EAAE,yBAAe,CAAC,CAAC;AACjE,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,4BAAkB;IAClB,sBAAY;CACb,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  import { Platform } from '@sonarwatch/portfolio-core';
3
3
  export declare const platformId = "solend";
4
- export declare const solendPlatform: Platform;
4
+ export declare const platform: Platform;
5
5
  export declare const marketsPrefix = "solend-markets";
6
6
  export declare const reservesPrefix = "solend-reserves";
7
7
  export declare const marketsKey = "markets";
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mainMarket = exports.wadsDecimal = exports.reserveEndpoint = exports.marketsEndpoint = exports.pid = exports.marketsKey = exports.reservesPrefix = exports.marketsPrefix = exports.solendPlatform = exports.platformId = void 0;
3
+ exports.mainMarket = exports.wadsDecimal = exports.reserveEndpoint = exports.marketsEndpoint = exports.pid = exports.marketsKey = exports.reservesPrefix = exports.marketsPrefix = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'solend';
6
- exports.solendPlatform = {
6
+ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Solend',
9
9
  image: 'https://sonar.watch/img/platforms/solend.png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,cAAc,GAAa;IACtC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,oBAAoB;CAC9B,CAAC;AACW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,UAAU,GAAG,SAAS,CAAC;AAEvB,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,eAAe,GAAG,0CAA0C,CAAC;AAC7D,QAAA,eAAe,GAAG,yCAAyC,CAAC;AAC5D,QAAA,WAAW,GAAG,EAAE,CAAC;AACjB,QAAA,UAAU,GAAG,8CAA8C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,oBAAoB;CAC9B,CAAC;AACW,QAAA,aAAa,GAAG,GAAG,kBAAU,UAAU,CAAC;AACxC,QAAA,cAAc,GAAG,GAAG,kBAAU,WAAW,CAAC;AAC1C,QAAA,UAAU,GAAG,SAAS,CAAC;AAEvB,QAAA,GAAG,GAAG,IAAI,mBAAS,CAAC,6CAA6C,CAAC,CAAC;AACnE,QAAA,eAAe,GAAG,0CAA0C,CAAC;AAC7D,QAAA,eAAe,GAAG,yCAAyC,CAAC;AAC5D,QAAA,WAAW,GAAG,EAAE,CAAC;AACjB,QAAA,UAAU,GAAG,8CAA8C,CAAC"}
@@ -8,7 +8,7 @@ const reservesJob_1 = __importDefault(require("./reservesJob"));
8
8
  const marketsJob_1 = __importDefault(require("./marketsJob"));
9
9
  const obligationsFetcher_1 = __importDefault(require("./obligationsFetcher"));
10
10
  const constants_1 = require("./constants");
11
- exports.platforms = [constants_1.solendPlatform];
11
+ exports.platforms = [constants_1.platform];
12
12
  exports.jobs = [marketsJob_1.default, reservesJob_1.default];
13
13
  exports.fetchers = [obligationsFetcher_1.default];
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAA6C;AAEhC,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,qBAAW,CAAC,CAAC;AACxC,QAAA,QAAQ,GAAc,CAAC,4BAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,8DAAsC;AACtC,8EAAqD;AACrD,2CAAuC;AAE1B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,oBAAU,EAAE,qBAAW,CAAC,CAAC;AACxC,QAAA,QAAQ,GAAc,CAAC,4BAAiB,CAAC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  export declare const platformId = "stader";
3
- export declare const staderPlatform: Platform;
3
+ export declare const platform: Platform;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.staderPlatform = exports.platformId = void 0;
3
+ exports.platform = exports.platformId = void 0;
4
4
  exports.platformId = 'stader';
5
- exports.staderPlatform = {
5
+ exports.platform = {
6
6
  id: exports.platformId,
7
7
  name: 'Stader',
8
8
  image: 'https://sonar.watch/img/platforms/stader.png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stader/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,cAAc,GAAa;IACtC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,QAAQ,EAAE,sCAAsC;CAC9D,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stader/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,QAAQ,EAAE,sCAAsC;CAC9D,CAAC"}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.fetchers = exports.jobs = exports.platforms = void 0;
4
4
  const constants_1 = require("./constants");
5
- exports.platforms = [constants_1.staderPlatform];
5
+ exports.platforms = [constants_1.platform];
6
6
  exports.jobs = [];
7
7
  exports.fetchers = [];
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stader/index.ts"],"names":[],"mappings":";;;AAGA,2CAA6C;AAEhC,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stader/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AAE1B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  import { StgConfig } from './types';
3
3
  export declare const platformId = "stargate";
4
- export declare const stargatePlatform: Platform;
4
+ export declare const platform: Platform;
5
5
  export declare const poolsKey = "pools";
6
6
  export declare const farmsKey = "farms";
7
7
  export declare const stargateNetworksConfigs: StgConfig[];
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stargateNetworksConfigs = exports.farmsKey = exports.poolsKey = exports.stargatePlatform = exports.platformId = void 0;
3
+ exports.stargateNetworksConfigs = exports.farmsKey = exports.poolsKey = exports.platform = exports.platformId = void 0;
4
4
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
5
5
  exports.platformId = 'stargate';
6
- exports.stargatePlatform = {
6
+ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Stargate',
9
9
  image: 'https://sonar.watch/img/platforms/stargate.png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGpD,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,gBAAgB,GAAa;IACxC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,uBAAuB,GAAgB;IAClD;QACE,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,SAAS;QAC9B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/constants.ts"],"names":[],"mappings":";;;AAAA,+DAAiE;AAGpD,QAAA,UAAU,GAAG,UAAU,CAAC;AAExB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,gDAAgD;IACvD,WAAW,EAAE,UAAU;IACvB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,QAAQ,GAAG,OAAO,CAAC;AAEnB,QAAA,uBAAuB,GAAgB;IAClD;QACE,SAAS,EAAE,0BAAS,CAAC,QAAQ;QAC7B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,SAAS;QAC9B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;IACD;QACE,SAAS,EAAE,0BAAS,CAAC,OAAO;QAC5B,aAAa,EAAE,4CAA4C;QAC3D,aAAa,EAAE,4CAA4C;QAC3D,YAAY,EAAE,4CAA4C;QAC1D,UAAU,EAAE,4CAA4C;KACzD;CACF,CAAC"}
@@ -20,5 +20,5 @@ exports.fetchers = [
20
20
  ])
21
21
  .flat(),
22
22
  ];
23
- exports.platforms = [constants_1.stargatePlatform];
23
+ exports.platforms = [constants_1.platform];
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/index.ts"],"names":[],"mappings":";;;;;;AAGA,qEAAoE;AACpE,0DAAkC;AAClC,0DAAkC;AAClC,2CAAwE;AACxE,uEAAqE;AACrE,iEAA8D;AAEjD,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,kBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc;IACjC,GAAG,mCAAuB;SACvB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACf,IAAA,iDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,kDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,2CAAoB,EAAC,MAAM,CAAC;KAC7B,CAAC;SACD,IAAI,EAAE;CACV,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,4BAAgB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stargate/index.ts"],"names":[],"mappings":";;;;;;AAGA,qEAAoE;AACpE,0DAAkC;AAClC,0DAAkC;AAClC,2CAAgE;AAChE,uEAAqE;AACrE,iEAA8D;AAEjD,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,kBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc;IACjC,GAAG,mCAAuB;SACvB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACf,IAAA,iDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,kDAAwB,EAAC,MAAM,CAAC;QAChC,IAAA,2CAAoB,EAAC,MAAM,CAAC;KAC7B,CAAC;SACD,IAAI,EAAE;CACV,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -0,0 +1 @@
1
+ export declare const platformId = "switchboard";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.platformId = void 0;
4
+ exports.platformId = 'switchboard';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/switchboard/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ import { SolanaClient } from '../../../utils/clients/types';
3
+ export declare function getSwitchboardPrice(connection: SolanaClient, feedAddress: PublicKey): Promise<number | null>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getSwitchboardPrice = void 0;
13
+ const getSwitchboardPrices_1 = require("./getSwitchboardPrices");
14
+ function getSwitchboardPrice(connection, feedAddress) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ return (yield (0, getSwitchboardPrices_1.getSwitchboardPrices)(connection, [feedAddress]))[0];
17
+ });
18
+ }
19
+ exports.getSwitchboardPrice = getSwitchboardPrice;
20
+ //# sourceMappingURL=getSwitchboardPrice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSwitchboardPrice.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/switchboard/helpers/getSwitchboardPrice.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,iEAA8D;AAE9D,SAAsB,mBAAmB,CACvC,UAAwB,EACxB,WAAsB;;QAEtB,OAAO,CAAC,MAAM,IAAA,2CAAoB,EAAC,UAAU,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,CAAC;CAAA;AALD,kDAKC"}
@@ -0,0 +1,3 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ import { SolanaClient } from '../../../utils/clients/types';
3
+ export declare function getSwitchboardPrices(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<(number | null)[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getSwitchboardPrices = void 0;
13
+ const structs_1 = require("../structs");
14
+ const misc_1 = require("./misc");
15
+ const solana_1 = require("../../../utils/solana");
16
+ function getSwitchboardPrices(connection, feedAddresses) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ const accounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(connection, structs_1.aggregatorAccountStruct, feedAddresses);
19
+ return accounts.map((account) => account ? (0, misc_1.getValueFromAggregator)(account, 3600) : null);
20
+ });
21
+ }
22
+ exports.getSwitchboardPrices = getSwitchboardPrices;
23
+ //# sourceMappingURL=getSwitchboardPrices.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSwitchboardPrices.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/switchboard/helpers/getSwitchboardPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wCAAqD;AACrD,iCAAgD;AAChD,kDAAsE;AAEtE,SAAsB,oBAAoB,CACxC,UAAwB,EACxB,aAA0B;;QAE1B,MAAM,QAAQ,GAAG,MAAM,IAAA,sCAA6B,EAClD,UAAU,EACV,iCAAuB,EACvB,aAAa,CACd,CAAC;QACF,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAC9B,OAAO,CAAC,CAAC,CAAC,IAAA,6BAAsB,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CACvD,CAAC;IACJ,CAAC;CAAA;AAZD,oDAYC"}
@@ -0,0 +1,2 @@
1
+ import { AggregatorAccount } from '../structs';
2
+ export declare function getValueFromAggregator(aggregator: AggregatorAccount, maxStalenessSec?: number): number | null;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getValueFromAggregator = void 0;
7
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
+ function getValueFromAggregator(aggregator, maxStalenessSec = 0) {
9
+ var _a, _b;
10
+ if (((_b = (_a = aggregator.latestConfirmedRound) === null || _a === void 0 ? void 0 : _a.numSuccess) !== null && _b !== void 0 ? _b : 0) === 0) {
11
+ return null;
12
+ }
13
+ if (maxStalenessSec !== 0) {
14
+ const now = new bignumber_js_1.default(Date.now() / 1000);
15
+ const latestRoundTimestamp = aggregator.latestConfirmedRound.roundOpenTimestamp;
16
+ const staleness = now.minus(latestRoundTimestamp);
17
+ if (staleness.gt(maxStalenessSec)) {
18
+ return null;
19
+ }
20
+ }
21
+ return aggregator.latestConfirmedRound.result.mantissa
22
+ .div(Math.pow(10, aggregator.latestConfirmedRound.result.scale))
23
+ .toNumber();
24
+ }
25
+ exports.getValueFromAggregator = getValueFromAggregator;
26
+ //# sourceMappingURL=misc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/switchboard/helpers/misc.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAGrC,SAAgB,sBAAsB,CACpC,UAA6B,EAC7B,eAAe,GAAG,CAAC;;IAEnB,IAAI,CAAC,MAAA,MAAA,UAAU,CAAC,oBAAoB,0CAAE,UAAU,mCAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7D,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,eAAe,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,sBAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QAC7C,MAAM,oBAAoB,GACxB,UAAU,CAAC,oBAAoB,CAAC,kBAAkB,CAAC;QACrD,MAAM,SAAS,GAAG,GAAG,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAClD,IAAI,SAAS,CAAC,EAAE,CAAC,eAAe,CAAC,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,QAAQ;SACnD,GAAG,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAA,CAAC;SACvD,QAAQ,EAAE,CAAC;AAChB,CAAC;AApBD,wDAoBC"}
@@ -0,0 +1,4 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ import { Job } from '../../Job';
3
+ export declare const jobs: Job[];
4
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = void 0;
7
+ const pricingJob_1 = __importDefault(require("./pricingJob"));
8
+ exports.jobs = [pricingJob_1.default];
9
+ exports.fetchers = [];
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/switchboard/index.ts"],"names":[],"mappings":";;;;;;AAEA,8DAAsC;AAEzB,QAAA,IAAI,GAAU,CAAC,oBAAU,CAAC,CAAC;AAC3B,QAAA,QAAQ,GAAc,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const web3_js_1 = require("@solana/web3.js");
14
+ const constants_1 = require("./constants");
15
+ const clients_1 = require("../../utils/clients");
16
+ const getSwitchboardPrices_1 = require("./helpers/getSwitchboardPrices");
17
+ const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecimalsAsMap");
18
+ const constants_2 = require("../tokens/constants");
19
+ const feedsToFetch = [
20
+ {
21
+ feedAddress: new web3_js_1.PublicKey('8LtARpjD6KsDGep66RPs1t5j8He766rhbYp3Dx7bNvGo'),
22
+ mintAddress: 'ZScHuTtqZukUrtZS43teTKGs2VqkKL8k4QCouR2n6Uo',
23
+ },
24
+ ];
25
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
26
+ const connection = (0, clients_1.getClientSolana)();
27
+ const values = yield (0, getSwitchboardPrices_1.getSwitchboardPrices)(connection, feedsToFetch.map((fToFetch) => fToFetch.feedAddress));
28
+ const decimalsMap = yield (0, getMultipleDecimalsAsMap_1.getMultipleDecimalsAsMap)(connection, feedsToFetch.map((fToFetch) => new web3_js_1.PublicKey(fToFetch.mintAddress)));
29
+ const sources = [];
30
+ feedsToFetch.forEach((feedToFetch, i) => {
31
+ const price = values.at(i);
32
+ if (!price)
33
+ return;
34
+ const decimals = decimalsMap.get(feedToFetch.mintAddress);
35
+ if (!decimals)
36
+ return;
37
+ const source = {
38
+ address: feedToFetch.mintAddress,
39
+ decimals,
40
+ id: `switchboard-feed-${feedToFetch.feedAddress.toString()}`,
41
+ networkId: portfolio_core_1.NetworkId.solana,
42
+ platformId: constants_2.walletTokensPlatform.id,
43
+ weight: 0.5,
44
+ timestamp: Date.now(),
45
+ price,
46
+ };
47
+ sources.push(source);
48
+ });
49
+ yield cache.setTokenPriceSources(sources);
50
+ });
51
+ const job = {
52
+ id: `${constants_1.platformId}-pricing`,
53
+ executor,
54
+ label: 'coingecko',
55
+ };
56
+ exports.default = job;
57
+ //# sourceMappingURL=pricingJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/switchboard/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAA4C;AAG5C,2CAAyC;AACzC,iDAAsD;AACtD,yEAAsE;AACtE,0FAAuF;AACvF,mDAA2D;AAE3D,MAAM,YAAY,GAAG;IACnB;QACE,WAAW,EAAE,IAAI,mBAAS,CAAC,8CAA8C,CAAC;QAC1E,WAAW,EAAE,6CAA6C;KAC3D;CACF,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,MAAM,GAAG,MAAM,IAAA,2CAAoB,EACvC,UAAU,EACV,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,CACrD,CAAC;IACF,MAAM,WAAW,GAAG,MAAM,IAAA,mDAAwB,EAChD,UAAU,EACV,YAAY,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CACpE,CAAC;IAEF,MAAM,OAAO,GAAuB,EAAE,CAAC;IACvC,YAAY,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE;QACtC,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,MAAM,GAAqB;YAC/B,OAAO,EAAE,WAAW,CAAC,WAAW;YAChC,QAAQ;YACR,EAAE,EAAE,oBAAoB,WAAW,CAAC,WAAW,CAAC,QAAQ,EAAE,EAAE;YAC5D,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK;SACN,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,74 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
3
+ import BigNumber from 'bignumber.js';
4
+ import { PublicKey } from '@solana/web3.js';
5
+ export declare enum AggregatorResolutionMode {
6
+ ModeRoundResolution = 0,
7
+ ModeSlidingResolution = 1
8
+ }
9
+ export type Hash = {
10
+ data: number[];
11
+ };
12
+ export declare const hashStruct: BeetStruct<Hash, Partial<Hash>>;
13
+ export type SwitchboardDecimal = {
14
+ mantissa: BigNumber;
15
+ scale: number;
16
+ };
17
+ export declare const switchboardDecimalStruct: BeetStruct<SwitchboardDecimal, Partial<SwitchboardDecimal>>;
18
+ export type AggregatorRound = {
19
+ numSuccess: number;
20
+ numError: number;
21
+ isClosed: boolean;
22
+ roundOpenSlot: BigNumber;
23
+ roundOpenTimestamp: BigNumber;
24
+ result: SwitchboardDecimal;
25
+ stdDeviation: SwitchboardDecimal;
26
+ minResponse: SwitchboardDecimal;
27
+ maxResponse: SwitchboardDecimal;
28
+ oraclePubkeysData: PublicKey[];
29
+ mediansData: SwitchboardDecimal[];
30
+ currentPayout: BigNumber[];
31
+ mediansFulfilled: boolean[];
32
+ errorsFulfilled: boolean[];
33
+ };
34
+ export declare const aggregatorRoundStruct: FixableBeetStruct<AggregatorRound, Partial<AggregatorRound>>;
35
+ export type AggregatorAccount = {
36
+ buffer: Buffer;
37
+ name: number[];
38
+ metadata: number[];
39
+ reserved1: number[];
40
+ queuePubkey: PublicKey;
41
+ oracleRequestBatchSize: number;
42
+ minOracleResults: number;
43
+ minJobResults: number;
44
+ minUpdateDelaySeconds: number;
45
+ startAfter: BigNumber;
46
+ varianceThreshold: SwitchboardDecimal;
47
+ forceReportPeriod: BigNumber;
48
+ expiration: BigNumber;
49
+ consecutiveFailureCount: BigNumber;
50
+ nextAllowedUpdateTime: BigNumber;
51
+ isLocked: boolean;
52
+ crankPubkey: PublicKey;
53
+ latestConfirmedRound: AggregatorRound;
54
+ currentRound: AggregatorRound;
55
+ jobPubkeysData: PublicKey[];
56
+ jobHashes: Hash[];
57
+ jobPubkeysSize: number;
58
+ jobsChecksum: number[];
59
+ authority: PublicKey;
60
+ historyBuffer: PublicKey;
61
+ previousConfirmedRoundResult: SwitchboardDecimal;
62
+ previousConfirmedRoundSlot: BigNumber;
63
+ disableCrank: boolean;
64
+ jobWeights: number[];
65
+ creationTimestamp: BigNumber;
66
+ resolutionMode: AggregatorResolutionMode;
67
+ basePriorityFee: number;
68
+ priorityFeeBump: number;
69
+ priorityFeeBumpPeriod: number;
70
+ maxPriorityFeeMultiplier: number;
71
+ parentFunction: PublicKey;
72
+ ebuf: number[];
73
+ };
74
+ export declare const aggregatorAccountStruct: FixableBeetStruct<AggregatorAccount, Partial<AggregatorAccount>>;