@sonarwatch/portfolio-plugins 0.11.183 → 0.11.185

Sign up to get free protection for your applications and to get access to all the features.
Files changed (308) hide show
  1. package/CHANGELOG.md +1477 -1459
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/generators/helpers.js +1 -1
  5. package/src/generators/helpers.js.map +1 -1
  6. package/src/index.js +2 -0
  7. package/src/index.js.map +1 -1
  8. package/src/plugins/aave/constants.d.ts +1 -1
  9. package/src/plugins/aave/constants.js +2 -2
  10. package/src/plugins/aave/constants.js.map +1 -1
  11. package/src/plugins/aave/index.js +1 -1
  12. package/src/plugins/aave/index.js.map +1 -1
  13. package/src/plugins/aftermath/constants.d.ts +1 -1
  14. package/src/plugins/aftermath/constants.js +2 -2
  15. package/src/plugins/aftermath/constants.js.map +1 -1
  16. package/src/plugins/aftermath/index.js +1 -1
  17. package/src/plugins/aftermath/index.js.map +1 -1
  18. package/src/plugins/aptin/constants.d.ts +3 -0
  19. package/src/plugins/aptin/constants.js +5 -2
  20. package/src/plugins/aptin/constants.js.map +1 -1
  21. package/src/plugins/aptin/depositsFetcher.js +2 -2
  22. package/src/plugins/aptin/depositsFetcher.js.map +1 -1
  23. package/src/plugins/armada-staking/constants.js +6 -6
  24. package/src/plugins/armada-staking/constants.js.map +1 -1
  25. package/src/plugins/aurory/constants.d.ts +1 -1
  26. package/src/plugins/aurory/constants.js +3 -3
  27. package/src/plugins/aurory/constants.js.map +1 -1
  28. package/src/plugins/aurory/stakingFetcher.js +2 -2
  29. package/src/plugins/aurory/stakingFetcher.js.map +1 -1
  30. package/src/plugins/auxexchange/aptosLpJob.js +2 -2
  31. package/src/plugins/auxexchange/aptosLpJob.js.map +1 -1
  32. package/src/plugins/auxexchange/constants.d.ts +2 -2
  33. package/src/plugins/auxexchange/constants.js +4 -4
  34. package/src/plugins/auxexchange/constants.js.map +1 -1
  35. package/src/plugins/auxexchange/index.js +1 -1
  36. package/src/plugins/auxexchange/index.js.map +1 -1
  37. package/src/plugins/balancer/helpers/pools.js +21 -21
  38. package/src/plugins/banx/constants.js +1 -1
  39. package/src/plugins/banx/constants.js.map +1 -1
  40. package/src/plugins/bucket/constants.d.ts +1 -1
  41. package/src/plugins/bucket/constants.js +2 -2
  42. package/src/plugins/bucket/constants.js.map +1 -1
  43. package/src/plugins/bucket/index.js +1 -1
  44. package/src/plugins/bucket/index.js.map +1 -1
  45. package/src/plugins/cetus/constants.d.ts +1 -1
  46. package/src/plugins/cetus/constants.js +2 -2
  47. package/src/plugins/cetus/constants.js.map +1 -1
  48. package/src/plugins/cetus/index.js +1 -1
  49. package/src/plugins/cetus/index.js.map +1 -1
  50. package/src/plugins/clone/constants.js +1 -1
  51. package/src/plugins/clone/constants.js.map +1 -1
  52. package/src/plugins/compound/constants.d.ts +1 -1
  53. package/src/plugins/compound/constants.js +2 -2
  54. package/src/plugins/compound/constants.js.map +1 -1
  55. package/src/plugins/compound/index.js +1 -1
  56. package/src/plugins/compound/index.js.map +1 -1
  57. package/src/plugins/curve/constants.d.ts +1 -1
  58. package/src/plugins/curve/constants.js +2 -2
  59. package/src/plugins/curve/constants.js.map +1 -1
  60. package/src/plugins/curve/index.js +1 -1
  61. package/src/plugins/curve/index.js.map +1 -1
  62. package/src/plugins/daos/constants.js +2 -1
  63. package/src/plugins/daos/constants.js.map +1 -1
  64. package/src/plugins/drift/constants.d.ts +1 -1
  65. package/src/plugins/drift/constants.js +2 -2
  66. package/src/plugins/drift/constants.js.map +1 -1
  67. package/src/plugins/drift/index.js +1 -1
  68. package/src/plugins/drift/index.js.map +1 -1
  69. package/src/plugins/flash/constants.d.ts +1 -0
  70. package/src/plugins/flash/constants.js +2 -1
  71. package/src/plugins/flash/constants.js.map +1 -1
  72. package/src/plugins/flash/poolJob.js +28 -4
  73. package/src/plugins/flash/poolJob.js.map +1 -1
  74. package/src/plugins/flash/stakeFetcher.js +42 -18
  75. package/src/plugins/flash/stakeFetcher.js.map +1 -1
  76. package/src/plugins/flash/types.d.ts +5 -0
  77. package/src/plugins/flexlend/constants.d.ts +1 -1
  78. package/src/plugins/flexlend/constants.js +2 -2
  79. package/src/plugins/flexlend/constants.js.map +1 -1
  80. package/src/plugins/flexlend/depositsFetcher.js +1 -1
  81. package/src/plugins/flexlend/depositsFetcher.js.map +1 -1
  82. package/src/plugins/flexlend/index.js +1 -1
  83. package/src/plugins/flexlend/index.js.map +1 -1
  84. package/src/plugins/goosefx/constants.d.ts +1 -1
  85. package/src/plugins/goosefx/constants.js +2 -2
  86. package/src/plugins/goosefx/constants.js.map +1 -1
  87. package/src/plugins/goosefx/index.js +1 -1
  88. package/src/plugins/goosefx/index.js.map +1 -1
  89. package/src/plugins/hawksight/constants.d.ts +1 -1
  90. package/src/plugins/hawksight/constants.js +2 -2
  91. package/src/plugins/hawksight/constants.js.map +1 -1
  92. package/src/plugins/hawksight/index.js +1 -1
  93. package/src/plugins/hawksight/index.js.map +1 -1
  94. package/src/plugins/jito/constants.d.ts +1 -1
  95. package/src/plugins/jito/constants.js +2 -2
  96. package/src/plugins/jito/constants.js.map +1 -1
  97. package/src/plugins/jito/index.js +1 -1
  98. package/src/plugins/jito/index.js.map +1 -1
  99. package/src/plugins/jupiter/exchange/constants.d.ts +1 -1
  100. package/src/plugins/jupiter/exchange/constants.js +2 -2
  101. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  102. package/src/plugins/jupiter/exchange/dcaFetcher.js +1 -1
  103. package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
  104. package/src/plugins/jupiter/governance/constants.d.ts +2 -2
  105. package/src/plugins/jupiter/governance/constants.js +4 -4
  106. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  107. package/src/plugins/jupiter/governance/voteFetcher.js +2 -2
  108. package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -1
  109. package/src/plugins/jupiter/index.js +3 -3
  110. package/src/plugins/jupiter/index.js.map +1 -1
  111. package/src/plugins/jupiter/launchpad/allocationsFetcher.js +2 -2
  112. package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
  113. package/src/plugins/jupiter/launchpad/constants.d.ts +2 -2
  114. package/src/plugins/jupiter/launchpad/constants.js +4 -4
  115. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  116. package/src/plugins/kamino/airdropFetcher.js +2 -2
  117. package/src/plugins/kamino/airdropFetcher.js.map +1 -1
  118. package/src/plugins/kamino/constants.d.ts +1 -1
  119. package/src/plugins/kamino/constants.js +2 -2
  120. package/src/plugins/kamino/constants.js.map +1 -1
  121. package/src/plugins/kamino/index.js +1 -1
  122. package/src/plugins/kamino/index.js.map +1 -1
  123. package/src/plugins/lido/constants.d.ts +1 -1
  124. package/src/plugins/lido/constants.js +2 -2
  125. package/src/plugins/lido/constants.js.map +1 -1
  126. package/src/plugins/lido/index.js +1 -1
  127. package/src/plugins/lido/index.js.map +1 -1
  128. package/src/plugins/liquidswap/constants.d.ts +1 -1
  129. package/src/plugins/liquidswap/constants.js +2 -2
  130. package/src/plugins/liquidswap/constants.js.map +1 -1
  131. package/src/plugins/liquidswap/index.js +1 -1
  132. package/src/plugins/liquidswap/index.js.map +1 -1
  133. package/src/plugins/magiceden/constants.d.ts +1 -1
  134. package/src/plugins/magiceden/constants.js +2 -2
  135. package/src/plugins/magiceden/constants.js.map +1 -1
  136. package/src/plugins/magiceden/index.js +1 -1
  137. package/src/plugins/magiceden/index.js.map +1 -1
  138. package/src/plugins/maker/constants.d.ts +1 -1
  139. package/src/plugins/maker/constants.js +2 -2
  140. package/src/plugins/maker/constants.js.map +1 -1
  141. package/src/plugins/maker/index.js +1 -1
  142. package/src/plugins/maker/index.js.map +1 -1
  143. package/src/plugins/mango/constants.d.ts +1 -1
  144. package/src/plugins/mango/constants.js +2 -2
  145. package/src/plugins/mango/constants.js.map +1 -1
  146. package/src/plugins/mango/index.js +1 -1
  147. package/src/plugins/mango/index.js.map +1 -1
  148. package/src/plugins/maple/constants.d.ts +1 -1
  149. package/src/plugins/maple/constants.js +2 -2
  150. package/src/plugins/maple/constants.js.map +1 -1
  151. package/src/plugins/maple/index.js +1 -1
  152. package/src/plugins/maple/index.js.map +1 -1
  153. package/src/plugins/marginfi/constants.d.ts +2 -2
  154. package/src/plugins/marginfi/constants.js +3 -3
  155. package/src/plugins/marginfi/constants.js.map +1 -1
  156. package/src/plugins/marginfi/index.js +1 -1
  157. package/src/plugins/marginfi/index.js.map +1 -1
  158. package/src/plugins/marinade/constants.d.ts +1 -1
  159. package/src/plugins/marinade/constants.js +2 -2
  160. package/src/plugins/marinade/constants.js.map +1 -1
  161. package/src/plugins/marinade/index.js +1 -1
  162. package/src/plugins/marinade/index.js.map +1 -1
  163. package/src/plugins/meteora/constants.d.ts +1 -1
  164. package/src/plugins/meteora/constants.js +2 -2
  165. package/src/plugins/meteora/constants.js.map +1 -1
  166. package/src/plugins/meteora/index.js +1 -1
  167. package/src/plugins/meteora/index.js.map +1 -1
  168. package/src/plugins/morpho/constants.d.ts +1 -1
  169. package/src/plugins/morpho/constants.js +2 -2
  170. package/src/plugins/morpho/constants.js.map +1 -1
  171. package/src/plugins/morpho/index.js +1 -1
  172. package/src/plugins/morpho/index.js.map +1 -1
  173. package/src/plugins/native-stake/solana/solanaFetcher.js +7 -7
  174. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  175. package/src/plugins/navi/constants.d.ts +1 -1
  176. package/src/plugins/navi/constants.js +2 -2
  177. package/src/plugins/navi/constants.js.map +1 -1
  178. package/src/plugins/navi/index.js +1 -1
  179. package/src/plugins/navi/index.js.map +1 -1
  180. package/src/plugins/nosana/constants.js +1 -1
  181. package/src/plugins/nosana/constants.js.map +1 -1
  182. package/src/plugins/orca/constants.d.ts +1 -1
  183. package/src/plugins/orca/constants.js +2 -2
  184. package/src/plugins/orca/constants.js.map +1 -1
  185. package/src/plugins/orca/index.js +1 -1
  186. package/src/plugins/orca/index.js.map +1 -1
  187. package/src/plugins/pancakeswap/constants.d.ts +1 -1
  188. package/src/plugins/pancakeswap/constants.js +2 -2
  189. package/src/plugins/pancakeswap/constants.js.map +1 -1
  190. package/src/plugins/pancakeswap/index.js +1 -1
  191. package/src/plugins/pancakeswap/index.js.map +1 -1
  192. package/src/plugins/paraswap/constants.d.ts +1 -1
  193. package/src/plugins/paraswap/constants.js +2 -2
  194. package/src/plugins/paraswap/constants.js.map +1 -1
  195. package/src/plugins/paraswap/index.js +1 -1
  196. package/src/plugins/paraswap/index.js.map +1 -1
  197. package/src/plugins/parcl/airdropFetcher.js +3 -0
  198. package/src/plugins/parcl/airdropFetcher.js.map +1 -1
  199. package/src/plugins/parcl/constants.d.ts +1 -1
  200. package/src/plugins/parcl/constants.js +2 -2
  201. package/src/plugins/parcl/constants.js.map +1 -1
  202. package/src/plugins/parcl/index.js +1 -1
  203. package/src/plugins/parcl/index.js.map +1 -1
  204. package/src/plugins/rain/constants.js +1 -1
  205. package/src/plugins/rain/constants.js.map +1 -1
  206. package/src/plugins/raydium/constants.d.ts +1 -1
  207. package/src/plugins/raydium/constants.js +2 -2
  208. package/src/plugins/raydium/constants.js.map +1 -1
  209. package/src/plugins/raydium/index.js +1 -1
  210. package/src/plugins/raydium/index.js.map +1 -1
  211. package/src/plugins/rocket-pool/constants.d.ts +1 -1
  212. package/src/plugins/rocket-pool/constants.js +2 -2
  213. package/src/plugins/rocket-pool/constants.js.map +1 -1
  214. package/src/plugins/rocket-pool/index.js +1 -1
  215. package/src/plugins/rocket-pool/index.js.map +1 -1
  216. package/src/plugins/saber/constants.d.ts +1 -1
  217. package/src/plugins/saber/constants.js +2 -2
  218. package/src/plugins/saber/constants.js.map +1 -1
  219. package/src/plugins/saber/index.js +1 -1
  220. package/src/plugins/saber/index.js.map +1 -1
  221. package/src/plugins/scallop/constants.d.ts +1 -1
  222. package/src/plugins/scallop/constants.js +9 -9
  223. package/src/plugins/scallop/constants.js.map +1 -1
  224. package/src/plugins/scallop/index.js +1 -1
  225. package/src/plugins/scallop/index.js.map +1 -1
  226. package/src/plugins/solend/constants.d.ts +1 -1
  227. package/src/plugins/solend/constants.js +2 -2
  228. package/src/plugins/solend/constants.js.map +1 -1
  229. package/src/plugins/solend/index.js +1 -1
  230. package/src/plugins/solend/index.js.map +1 -1
  231. package/src/plugins/stader/constants.d.ts +1 -1
  232. package/src/plugins/stader/constants.js +2 -2
  233. package/src/plugins/stader/constants.js.map +1 -1
  234. package/src/plugins/stader/index.js +1 -1
  235. package/src/plugins/stader/index.js.map +1 -1
  236. package/src/plugins/stargate/constants.d.ts +1 -1
  237. package/src/plugins/stargate/constants.js +2 -2
  238. package/src/plugins/stargate/constants.js.map +1 -1
  239. package/src/plugins/stargate/index.js +1 -1
  240. package/src/plugins/stargate/index.js.map +1 -1
  241. package/src/plugins/sushiswap/helpers.js +24 -24
  242. package/src/plugins/switchboard/constants.d.ts +1 -0
  243. package/src/plugins/switchboard/constants.js +5 -0
  244. package/src/plugins/switchboard/constants.js.map +1 -0
  245. package/src/plugins/switchboard/helpers/getSwitchboardPrice.d.ts +3 -0
  246. package/src/plugins/switchboard/helpers/getSwitchboardPrice.js +20 -0
  247. package/src/plugins/switchboard/helpers/getSwitchboardPrice.js.map +1 -0
  248. package/src/plugins/switchboard/helpers/getSwitchboardPrices.d.ts +3 -0
  249. package/src/plugins/switchboard/helpers/getSwitchboardPrices.js +23 -0
  250. package/src/plugins/switchboard/helpers/getSwitchboardPrices.js.map +1 -0
  251. package/src/plugins/switchboard/helpers/misc.d.ts +2 -0
  252. package/src/plugins/switchboard/helpers/misc.js +26 -0
  253. package/src/plugins/switchboard/helpers/misc.js.map +1 -0
  254. package/src/plugins/switchboard/index.d.ts +4 -0
  255. package/src/plugins/switchboard/index.js +10 -0
  256. package/src/plugins/switchboard/index.js.map +1 -0
  257. package/src/plugins/switchboard/pricingJob.d.ts +3 -0
  258. package/src/plugins/switchboard/pricingJob.js +57 -0
  259. package/src/plugins/switchboard/pricingJob.js.map +1 -0
  260. package/src/plugins/switchboard/structs.d.ts +74 -0
  261. package/src/plugins/switchboard/structs.js +72 -0
  262. package/src/plugins/switchboard/structs.js.map +1 -0
  263. package/src/plugins/tensor/constants.d.ts +1 -1
  264. package/src/plugins/tensor/constants.js +2 -2
  265. package/src/plugins/tensor/constants.js.map +1 -1
  266. package/src/plugins/tensor/index.js +1 -1
  267. package/src/plugins/tensor/index.js.map +1 -1
  268. package/src/plugins/thala/constants.d.ts +12 -5
  269. package/src/plugins/thala/constants.js +9 -9
  270. package/src/plugins/thala/constants.js.map +1 -1
  271. package/src/plugins/thala/index.js +1 -1
  272. package/src/plugins/thala/index.js.map +1 -1
  273. package/src/plugins/thala/vaultsRatesJob.js +1 -1
  274. package/src/plugins/thala/vaultsRatesJob.js.map +1 -1
  275. package/src/plugins/turbos/constants.d.ts +1 -1
  276. package/src/plugins/turbos/constants.js +2 -2
  277. package/src/plugins/turbos/constants.js.map +1 -1
  278. package/src/plugins/turbos/index.js +1 -1
  279. package/src/plugins/turbos/index.js.map +1 -1
  280. package/src/plugins/uniswap/constants.d.ts +1 -1
  281. package/src/plugins/uniswap/constants.js +2 -2
  282. package/src/plugins/uniswap/constants.js.map +1 -1
  283. package/src/plugins/uniswap/getUniV3PositionsFetcher.js +1 -1
  284. package/src/plugins/uniswap/getUniV3PositionsFetcher.js.map +1 -1
  285. package/src/plugins/uniswap/index.js +1 -1
  286. package/src/plugins/uniswap/index.js.map +1 -1
  287. package/src/plugins/uniswap-v2/getPositionsV2Fetcher.js +1 -1
  288. package/src/plugins/uniswap-v2/getPositionsV2Fetcher.js.map +1 -1
  289. package/src/plugins/uniswap-v2/helpers.js +23 -23
  290. package/src/plugins/uniswap-v2/helpers.js.map +1 -1
  291. package/src/plugins/venus/constants.d.ts +1 -1
  292. package/src/plugins/venus/constants.js +3 -7
  293. package/src/plugins/venus/constants.js.map +1 -1
  294. package/src/plugins/venus/index.js +1 -1
  295. package/src/plugins/venus/index.js.map +1 -1
  296. package/src/plugins/wormhole/constants.js +1 -1
  297. package/src/plugins/wormhole/constants.js.map +1 -1
  298. package/src/plugins/x-staking-solana/constants.js +2 -2
  299. package/src/plugins/x-staking-solana/constants.js.map +1 -1
  300. package/src/plugins/zeta/constants.d.ts +1 -1
  301. package/src/plugins/zeta/constants.js +2 -2
  302. package/src/plugins/zeta/constants.js.map +1 -1
  303. package/src/plugins/zeta/index.js +1 -1
  304. package/src/plugins/zeta/index.js.map +1 -1
  305. package/src/utils/misc/getImagefromUri.js +1 -1
  306. package/src/utils/misc/getImagefromUri.js.map +1 -1
  307. package/src/utils/sei/constants.js +8 -8
  308. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -6,7 +6,7 @@ exports.platformId = 'rain';
6
6
  exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Rain',
9
- image: 'https://sonar.watch/img/platforms/rain.png',
9
+ image: 'https://sonar.watch/img/platforms/rain.webp',
10
10
  defiLlamaId: 'rain.fi', // from https://defillama.com/docs/api
11
11
  website: 'https://rain.fi/',
12
12
  twitter: 'https://twitter.com/RainFi_',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,SAAS,EAAE,sCAAsC;IAC9D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,cAAc,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,SAAS,EAAE,sCAAsC;IAC9D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,cAAc,GAAG,aAAa,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 = "raydium";
4
- export declare const raydiumPlatform: Platform;
4
+ export declare const platform: Platform;
5
5
  export declare const AMM_PROGRAM_ID_V3: PublicKey;
6
6
  export declare const AMM_PROGRAM_ID_V4: PublicKey;
7
7
  export declare const AMM_PROGRAM_ID_V5: PublicKey;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.rayDecimals = exports.rayMint = exports.positionsIdentifier = exports.poolStatesPrefix = exports.raydiumProgram = exports.AMM_PROGRAM_ID_V5 = exports.AMM_PROGRAM_ID_V4 = exports.AMM_PROGRAM_ID_V3 = exports.raydiumPlatform = exports.platformId = void 0;
3
+ exports.rayDecimals = exports.rayMint = exports.positionsIdentifier = exports.poolStatesPrefix = exports.raydiumProgram = exports.AMM_PROGRAM_ID_V5 = exports.AMM_PROGRAM_ID_V4 = exports.AMM_PROGRAM_ID_V3 = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'raydium';
6
- exports.raydiumPlatform = {
6
+ exports.platform = {
7
7
  id: exports.platformId,
8
8
  name: 'Raydium',
9
9
  image: 'https://sonar.watch/img/platforms/raydium.png',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,qBAAqB;CAC/B,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE7C,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AAEvD,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,qBAAqB;CAC/B,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,iBAAiB,GAAG,IAAI,mBAAS,CAC5C,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAAG,GAAG,kBAAU,YAAY,CAAC;AAE7C,QAAA,mBAAmB,GAAG,gCAAgC,CAAC;AAEvD,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,WAAW,GAAG,CAAC,CAAC"}
@@ -8,7 +8,7 @@ const lpTokensJob_1 = __importDefault(require("./lpTokensJob"));
8
8
  const clmmJob_1 = __importDefault(require("./clmmJob"));
9
9
  const constants_1 = require("./constants");
10
10
  const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
11
- exports.platforms = [constants_1.raydiumPlatform];
11
+ exports.platforms = [constants_1.platform];
12
12
  exports.jobs = [lpTokensJob_1.default, clmmJob_1.default];
13
13
  exports.fetchers = [stakingFetcher_1.default];
14
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,wDAAgC;AAChC,2CAA8C;AAC9C,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,2BAAe,CAAC,CAAC;AAC1C,QAAA,IAAI,GAAU,CAAC,qBAAW,EAAE,iBAAO,CAAC,CAAC;AACrC,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/raydium/index.ts"],"names":[],"mappings":";;;;;;AAGA,gEAAwC;AACxC,wDAAgC;AAChC,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,qBAAW,EAAE,iBAAO,CAAC,CAAC;AACrC,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { Platform } from '@sonarwatch/portfolio-core';
2
2
  import BigNumber from 'bignumber.js';
3
3
  export declare const platformId = "rocketpool";
4
- export declare const rocketPoolPlatform: Platform;
4
+ export declare const platform: Platform;
5
5
  export declare const marketsCachePrefix = "rocketpool-markets";
6
6
  export declare const minipoolManagerAddress = "0x6293B8abC1F36aFB22406Be5f96D893072A8cF3a";
7
7
  export declare const nodeStakingAddress = "0x0d8D8f8541B12A0e1194B7CC4b6D954b90AB82ec";
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.rplFactor = exports.rplDecimals = exports.rplAddress = exports.nodeStakingAddress = exports.minipoolManagerAddress = exports.marketsCachePrefix = exports.rocketPoolPlatform = exports.platformId = void 0;
6
+ exports.rplFactor = exports.rplDecimals = exports.rplAddress = exports.nodeStakingAddress = exports.minipoolManagerAddress = exports.marketsCachePrefix = exports.platform = exports.platformId = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  exports.platformId = 'rocketpool';
9
- exports.rocketPoolPlatform = {
9
+ exports.platform = {
10
10
  id: exports.platformId,
11
11
  name: 'Rocket Pool',
12
12
  defiLlamaId: 'rocket-pool',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rocket-pool/constants.ts"],"names":[],"mappings":";;;;;;AACA,gEAAqC;AAExB,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,kBAAkB,GAAa;IAC1C,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC;AAC7C,QAAA,sBAAsB,GACjC,4CAA4C,CAAC;AAClC,QAAA,kBAAkB,GAAG,4CAA4C,CAAC;AAClE,QAAA,UAAU,GAAG,4CAA4C,CAAC;AAC1D,QAAA,WAAW,GAAG,EAAE,CAAC;AACjB,QAAA,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,mBAAW,CAAA,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rocket-pool/constants.ts"],"names":[],"mappings":";;;;;;AACA,gEAAqC;AAExB,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,kDAAkD;IACzD,OAAO,EAAE,yBAAyB;CACnC,CAAC;AACW,QAAA,kBAAkB,GAAG,GAAG,kBAAU,UAAU,CAAC;AAC7C,QAAA,sBAAsB,GACjC,4CAA4C,CAAC;AAClC,QAAA,kBAAkB,GAAG,4CAA4C,CAAC;AAClE,QAAA,UAAU,GAAG,4CAA4C,CAAC;AAC1D,QAAA,WAAW,GAAG,EAAE,CAAC;AACjB,QAAA,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,mBAAW,CAAA,CAAC,CAAC"}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const positionFetcher_1 = __importDefault(require("./positionFetcher"));
9
- exports.platforms = [constants_1.rocketPoolPlatform];
9
+ exports.platforms = [constants_1.platform];
10
10
  exports.jobs = [];
11
11
  exports.fetchers = [positionFetcher_1.default];
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rocket-pool/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAiD;AACjD,wEAAgD;AAEnC,QAAA,SAAS,GAAe,CAAC,8BAAkB,CAAC,CAAC;AAC7C,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rocket-pool/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wEAAgD;AAEnC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -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;