@levrbet/shared 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +92 -0
  3. package/bin/setup-prisma.js +44 -0
  4. package/dist/core/config/dotenv.d.ts +16 -0
  5. package/dist/core/config/dotenv.js +77 -0
  6. package/dist/core/config/dotenv.js.map +1 -0
  7. package/dist/core/config/index.d.ts +2 -0
  8. package/dist/core/config/index.js +19 -0
  9. package/dist/core/config/index.js.map +1 -0
  10. package/dist/core/config/urls.d.ts +55 -0
  11. package/dist/core/config/urls.js +61 -0
  12. package/dist/core/config/urls.js.map +1 -0
  13. package/dist/core/contracts/abis/LevrBaseMarket.d.ts +1009 -0
  14. package/dist/core/contracts/abis/LevrBaseMarket.js +976 -0
  15. package/dist/core/contracts/abis/LevrBaseMarket.js.map +1 -0
  16. package/dist/core/contracts/abis/LevrConfigProvider.d.ts +2671 -0
  17. package/dist/core/contracts/abis/LevrConfigProvider.js +2551 -0
  18. package/dist/core/contracts/abis/LevrConfigProvider.js.map +1 -0
  19. package/dist/core/contracts/abis/LevrFeeCollector.d.ts +259 -0
  20. package/dist/core/contracts/abis/LevrFeeCollector.js +143 -0
  21. package/dist/core/contracts/abis/LevrFeeCollector.js.map +1 -0
  22. package/dist/core/contracts/abis/LevrFulltimeMarket.d.ts +1050 -0
  23. package/dist/core/contracts/abis/LevrFulltimeMarket.js +462 -0
  24. package/dist/core/contracts/abis/LevrFulltimeMarket.js.map +1 -0
  25. package/dist/core/contracts/abis/LevrFundManager.d.ts +51 -0
  26. package/dist/core/contracts/abis/LevrFundManager.js +4 -0
  27. package/dist/core/contracts/abis/LevrFundManager.js.map +1 -0
  28. package/dist/core/contracts/abis/LevrLiquidationEngine.d.ts +244 -0
  29. package/dist/core/contracts/abis/LevrLiquidationEngine.js +231 -0
  30. package/dist/core/contracts/abis/LevrLiquidationEngine.js.map +1 -0
  31. package/dist/core/contracts/abis/LevrManager.d.ts +1281 -0
  32. package/dist/core/contracts/abis/LevrManager.js +1090 -0
  33. package/dist/core/contracts/abis/LevrManager.js.map +1 -0
  34. package/dist/core/contracts/abis/LevrMarketFeed.d.ts +902 -0
  35. package/dist/core/contracts/abis/LevrMarketFeed.js +775 -0
  36. package/dist/core/contracts/abis/LevrMarketFeed.js.map +1 -0
  37. package/dist/core/contracts/abis/LevrMarketMaker.d.ts +175 -0
  38. package/dist/core/contracts/abis/LevrMarketMaker.js +108 -0
  39. package/dist/core/contracts/abis/LevrMarketMaker.js.map +1 -0
  40. package/dist/core/contracts/abis/LevrMarketRiskSentinel.d.ts +682 -0
  41. package/dist/core/contracts/abis/LevrMarketRiskSentinel.js +323 -0
  42. package/dist/core/contracts/abis/LevrMarketRiskSentinel.js.map +1 -0
  43. package/dist/core/contracts/abis/LevrMarketRouter.d.ts +281 -0
  44. package/dist/core/contracts/abis/LevrMarketRouter.js +262 -0
  45. package/dist/core/contracts/abis/LevrMarketRouter.js.map +1 -0
  46. package/dist/core/contracts/abis/LevrMvpDepository.d.ts +766 -0
  47. package/dist/core/contracts/abis/LevrMvpDepository.js +396 -0
  48. package/dist/core/contracts/abis/LevrMvpDepository.js.map +1 -0
  49. package/dist/core/contracts/abis/LevrMvpRouter.d.ts +305 -0
  50. package/dist/core/contracts/abis/LevrMvpRouter.js +291 -0
  51. package/dist/core/contracts/abis/LevrMvpRouter.js.map +1 -0
  52. package/dist/core/contracts/abis/LevrMvpStaker.d.ts +746 -0
  53. package/dist/core/contracts/abis/LevrMvpStaker.js +386 -0
  54. package/dist/core/contracts/abis/LevrMvpStaker.js.map +1 -0
  55. package/dist/core/contracts/abis/LevrMvpToken.d.ts +341 -0
  56. package/dist/core/contracts/abis/LevrMvpToken.js +183 -0
  57. package/dist/core/contracts/abis/LevrMvpToken.js.map +1 -0
  58. package/dist/core/contracts/abis/LevrOrderbook.d.ts +471 -0
  59. package/dist/core/contracts/abis/LevrOrderbook.js +486 -0
  60. package/dist/core/contracts/abis/LevrOrderbook.js.map +1 -0
  61. package/dist/core/contracts/abis/LevrOrderbookLens.d.ts +167 -0
  62. package/dist/core/contracts/abis/LevrOrderbookLens.js +103 -0
  63. package/dist/core/contracts/abis/LevrOrderbookLens.js.map +1 -0
  64. package/dist/core/contracts/abis/LevrOverUnderMarket.d.ts +1054 -0
  65. package/dist/core/contracts/abis/LevrOverUnderMarket.js +463 -0
  66. package/dist/core/contracts/abis/LevrOverUnderMarket.js.map +1 -0
  67. package/dist/core/contracts/abis/LevrPythFeed.d.ts +225 -0
  68. package/dist/core/contracts/abis/LevrPythFeed.js +131 -0
  69. package/dist/core/contracts/abis/LevrPythFeed.js.map +1 -0
  70. package/dist/core/contracts/abis/LevrUtil.d.ts +485 -0
  71. package/dist/core/contracts/abis/LevrUtil.js +226 -0
  72. package/dist/core/contracts/abis/LevrUtil.js.map +1 -0
  73. package/dist/core/contracts/abis/Storage.d.ts +34 -0
  74. package/dist/core/contracts/abis/Storage.js +47 -0
  75. package/dist/core/contracts/abis/Storage.js.map +1 -0
  76. package/dist/core/contracts/abis/index.d.ts +12174 -0
  77. package/dist/core/contracts/abis/index.js +51 -0
  78. package/dist/core/contracts/abis/index.js.map +1 -0
  79. package/dist/core/contracts/addresses.d.ts +154 -0
  80. package/dist/core/contracts/addresses.js +160 -0
  81. package/dist/core/contracts/addresses.js.map +1 -0
  82. package/dist/core/contracts/chains.d.ts +4 -0
  83. package/dist/core/contracts/chains.js +14 -0
  84. package/dist/core/contracts/chains.js.map +1 -0
  85. package/dist/core/contracts/clients/index.d.ts +1 -0
  86. package/dist/core/contracts/clients/index.js +18 -0
  87. package/dist/core/contracts/clients/index.js.map +1 -0
  88. package/dist/core/contracts/clients/publicClients.d.ts +24 -0
  89. package/dist/core/contracts/clients/publicClients.js +123 -0
  90. package/dist/core/contracts/clients/publicClients.js.map +1 -0
  91. package/dist/core/contracts/constants.d.ts +15 -0
  92. package/dist/core/contracts/constants.js +30 -0
  93. package/dist/core/contracts/constants.js.map +1 -0
  94. package/dist/core/contracts/index.d.ts +6 -0
  95. package/dist/core/contracts/index.js +23 -0
  96. package/dist/core/contracts/index.js.map +1 -0
  97. package/dist/core/contracts/instances.d.ts +48 -0
  98. package/dist/core/contracts/instances.js +101 -0
  99. package/dist/core/contracts/instances.js.map +1 -0
  100. package/dist/core/index.d.ts +9 -0
  101. package/dist/core/index.js +26 -0
  102. package/dist/core/index.js.map +1 -0
  103. package/dist/core/indexers/envio.test.query.d.ts +5 -0
  104. package/dist/core/indexers/envio.test.query.js +32 -0
  105. package/dist/core/indexers/envio.test.query.js.map +1 -0
  106. package/dist/core/indexers/index.d.ts +1 -0
  107. package/dist/core/indexers/index.js +18 -0
  108. package/dist/core/indexers/index.js.map +1 -0
  109. package/dist/core/indexers/indexers.service.d.ts +19 -0
  110. package/dist/core/indexers/indexers.service.js +104 -0
  111. package/dist/core/indexers/indexers.service.js.map +1 -0
  112. package/dist/core/indexers/subsquid.test.query.d.ts +4 -0
  113. package/dist/core/indexers/subsquid.test.query.js +42 -0
  114. package/dist/core/indexers/subsquid.test.query.js.map +1 -0
  115. package/dist/core/prisma/index.d.ts +1 -0
  116. package/dist/core/prisma/index.js +21 -0
  117. package/dist/core/prisma/index.js.map +1 -0
  118. package/dist/core/prisma/schema.prisma +360 -0
  119. package/dist/core/privy/constants.d.ts +19 -0
  120. package/dist/core/privy/constants.js +28 -0
  121. package/dist/core/privy/constants.js.map +1 -0
  122. package/dist/core/privy/index.d.ts +1 -0
  123. package/dist/core/privy/index.js +18 -0
  124. package/dist/core/privy/index.js.map +1 -0
  125. package/dist/core/socket.io/events.d.ts +20 -0
  126. package/dist/core/socket.io/events.js +20 -0
  127. package/dist/core/socket.io/events.js.map +1 -0
  128. package/dist/core/socket.io/index.d.ts +2 -0
  129. package/dist/core/socket.io/index.js +19 -0
  130. package/dist/core/socket.io/index.js.map +1 -0
  131. package/dist/core/socket.io/rooms.d.ts +6 -0
  132. package/dist/core/socket.io/rooms.js +10 -0
  133. package/dist/core/socket.io/rooms.js.map +1 -0
  134. package/dist/core/types/auth/auth.types.d.ts +31 -0
  135. package/dist/core/types/auth/auth.types.js +15 -0
  136. package/dist/core/types/auth/auth.types.js.map +1 -0
  137. package/dist/core/types/auth/index.d.ts +2 -0
  138. package/dist/core/types/auth/index.js +19 -0
  139. package/dist/core/types/auth/index.js.map +1 -0
  140. package/dist/core/types/auth/request.types.d.ts +19 -0
  141. package/dist/core/types/auth/request.types.js +15 -0
  142. package/dist/core/types/auth/request.types.js.map +1 -0
  143. package/dist/core/types/blockchain/chains.types.d.ts +3 -0
  144. package/dist/core/types/blockchain/chains.types.js +8 -0
  145. package/dist/core/types/blockchain/chains.types.js.map +1 -0
  146. package/dist/core/types/blockchain/contract.types.d.ts +8 -0
  147. package/dist/core/types/blockchain/contract.types.js +13 -0
  148. package/dist/core/types/blockchain/contract.types.js.map +1 -0
  149. package/dist/core/types/blockchain/index.d.ts +3 -0
  150. package/dist/core/types/blockchain/index.js +20 -0
  151. package/dist/core/types/blockchain/index.js.map +1 -0
  152. package/dist/core/types/blockchain/oz.relayer.types.d.ts +7 -0
  153. package/dist/core/types/blockchain/oz.relayer.types.js +13 -0
  154. package/dist/core/types/blockchain/oz.relayer.types.js.map +1 -0
  155. package/dist/core/types/index.d.ts +6 -0
  156. package/dist/core/types/index.js +23 -0
  157. package/dist/core/types/index.js.map +1 -0
  158. package/dist/core/types/indexers.types.d.ts +4 -0
  159. package/dist/core/types/indexers.types.js +9 -0
  160. package/dist/core/types/indexers.types.js.map +1 -0
  161. package/dist/core/types/misc.types.d.ts +6 -0
  162. package/dist/core/types/misc.types.js +11 -0
  163. package/dist/core/types/misc.types.js.map +1 -0
  164. package/dist/core/types/oracle/fixture.types.d.ts +75 -0
  165. package/dist/core/types/oracle/fixture.types.js +4 -0
  166. package/dist/core/types/oracle/fixture.types.js.map +1 -0
  167. package/dist/core/types/oracle/game/game.types.d.ts +108 -0
  168. package/dist/core/types/oracle/game/game.types.js +64 -0
  169. package/dist/core/types/oracle/game/game.types.js.map +1 -0
  170. package/dist/core/types/oracle/game/index.d.ts +2 -0
  171. package/dist/core/types/oracle/game/index.js +19 -0
  172. package/dist/core/types/oracle/game/index.js.map +1 -0
  173. package/dist/core/types/oracle/game/zod.game.types.d.ts +31 -0
  174. package/dist/core/types/oracle/game/zod.game.types.js +22 -0
  175. package/dist/core/types/oracle/game/zod.game.types.js.map +1 -0
  176. package/dist/core/types/oracle/index.d.ts +4 -0
  177. package/dist/core/types/oracle/index.js +21 -0
  178. package/dist/core/types/oracle/index.js.map +1 -0
  179. package/dist/core/types/oracle/market/index.d.ts +3 -0
  180. package/dist/core/types/oracle/market/index.js +20 -0
  181. package/dist/core/types/oracle/market/index.js.map +1 -0
  182. package/dist/core/types/oracle/market/markets.types.d.ts +95 -0
  183. package/dist/core/types/oracle/market/markets.types.js +35 -0
  184. package/dist/core/types/oracle/market/markets.types.js.map +1 -0
  185. package/dist/core/types/oracle/market/odds.types.d.ts +14 -0
  186. package/dist/core/types/oracle/market/odds.types.js +3 -0
  187. package/dist/core/types/oracle/market/odds.types.js.map +1 -0
  188. package/dist/core/types/oracle/market/positions.types.d.ts +57 -0
  189. package/dist/core/types/oracle/market/positions.types.js +3 -0
  190. package/dist/core/types/oracle/market/positions.types.js.map +1 -0
  191. package/dist/core/types/oracle/requests/game.request.types.d.ts +170 -0
  192. package/dist/core/types/oracle/requests/game.request.types.js +126 -0
  193. package/dist/core/types/oracle/requests/game.request.types.js.map +1 -0
  194. package/dist/core/types/oracle/requests/game.response.types.d.ts +8 -0
  195. package/dist/core/types/oracle/requests/game.response.types.js +3 -0
  196. package/dist/core/types/oracle/requests/game.response.types.js.map +1 -0
  197. package/dist/core/types/oracle/requests/index.d.ts +5 -0
  198. package/dist/core/types/oracle/requests/index.js +22 -0
  199. package/dist/core/types/oracle/requests/index.js.map +1 -0
  200. package/dist/core/types/oracle/requests/market.request.types.d.ts +63 -0
  201. package/dist/core/types/oracle/requests/market.request.types.js +41 -0
  202. package/dist/core/types/oracle/requests/market.request.types.js.map +1 -0
  203. package/dist/core/types/oracle/requests/odds.response.types.d.ts +2 -0
  204. package/dist/core/types/oracle/requests/odds.response.types.js +3 -0
  205. package/dist/core/types/oracle/requests/odds.response.types.js.map +1 -0
  206. package/dist/core/types/oracle/requests/user.request.type.d.ts +4 -0
  207. package/dist/core/types/oracle/requests/user.request.type.js +3 -0
  208. package/dist/core/types/oracle/requests/user.request.type.js.map +1 -0
  209. package/dist/core/types/privy.types.d.ts +4 -0
  210. package/dist/core/types/privy.types.js +9 -0
  211. package/dist/core/types/privy.types.js.map +1 -0
  212. package/dist/core/utils/converters.utils.d.ts +29 -0
  213. package/dist/core/utils/converters.utils.js +97 -0
  214. package/dist/core/utils/converters.utils.js.map +1 -0
  215. package/dist/core/utils/game.utils.d.ts +4 -0
  216. package/dist/core/utils/game.utils.js +79 -0
  217. package/dist/core/utils/game.utils.js.map +1 -0
  218. package/dist/core/utils/index.d.ts +4 -0
  219. package/dist/core/utils/index.js +21 -0
  220. package/dist/core/utils/index.js.map +1 -0
  221. package/dist/core/utils/misc.utils.d.ts +14 -0
  222. package/dist/core/utils/misc.utils.js +33 -0
  223. package/dist/core/utils/misc.utils.js.map +1 -0
  224. package/dist/core/utils/position.utils.d.ts +18 -0
  225. package/dist/core/utils/position.utils.js +68 -0
  226. package/dist/core/utils/position.utils.js.map +1 -0
  227. package/dist/core/validators/bytes.validators.d.ts +32 -0
  228. package/dist/core/validators/bytes.validators.js +47 -0
  229. package/dist/core/validators/bytes.validators.js.map +1 -0
  230. package/dist/core/validators/index.d.ts +2 -0
  231. package/dist/core/validators/index.js +19 -0
  232. package/dist/core/validators/index.js.map +1 -0
  233. package/dist/core/validators/mongo.validators.d.ts +2 -0
  234. package/dist/core/validators/mongo.validators.js +10 -0
  235. package/dist/core/validators/mongo.validators.js.map +1 -0
  236. package/dist/index.d.ts +1 -0
  237. package/dist/index.js +23 -0
  238. package/dist/index.js.map +1 -0
  239. package/dist/react/hooks/auth/index.d.ts +1 -0
  240. package/dist/react/hooks/auth/index.js +18 -0
  241. package/dist/react/hooks/auth/index.js.map +1 -0
  242. package/dist/react/hooks/auth/useAuthHeaders.d.ts +45 -0
  243. package/dist/react/hooks/auth/useAuthHeaders.js +58 -0
  244. package/dist/react/hooks/auth/useAuthHeaders.js.map +1 -0
  245. package/dist/react/hooks/contracts/erc20/index.d.ts +6 -0
  246. package/dist/react/hooks/contracts/erc20/index.js +23 -0
  247. package/dist/react/hooks/contracts/erc20/index.js.map +1 -0
  248. package/dist/react/hooks/contracts/erc20/useApproveErc20.d.ts +13 -0
  249. package/dist/react/hooks/contracts/erc20/useApproveErc20.js +28 -0
  250. package/dist/react/hooks/contracts/erc20/useApproveErc20.js.map +1 -0
  251. package/dist/react/hooks/contracts/erc20/useErc20Allowance.d.ts +10 -0
  252. package/dist/react/hooks/contracts/erc20/useErc20Allowance.js +34 -0
  253. package/dist/react/hooks/contracts/erc20/useErc20Allowance.js.map +1 -0
  254. package/dist/react/hooks/contracts/erc20/useErc20Balance.d.ts +22 -0
  255. package/dist/react/hooks/contracts/erc20/useErc20Balance.js +95 -0
  256. package/dist/react/hooks/contracts/erc20/useErc20Balance.js.map +1 -0
  257. package/dist/react/hooks/contracts/erc20/useErc20Decimals.d.ts +8 -0
  258. package/dist/react/hooks/contracts/erc20/useErc20Decimals.js +28 -0
  259. package/dist/react/hooks/contracts/erc20/useErc20Decimals.js.map +1 -0
  260. package/dist/react/hooks/contracts/erc20/useErc20Symbol.d.ts +8 -0
  261. package/dist/react/hooks/contracts/erc20/useErc20Symbol.js +28 -0
  262. package/dist/react/hooks/contracts/erc20/useErc20Symbol.js.map +1 -0
  263. package/dist/react/hooks/contracts/erc20/useTransferErc20.d.ts +13 -0
  264. package/dist/react/hooks/contracts/erc20/useTransferErc20.js +31 -0
  265. package/dist/react/hooks/contracts/erc20/useTransferErc20.js.map +1 -0
  266. package/dist/react/hooks/contracts/index.d.ts +3 -0
  267. package/dist/react/hooks/contracts/index.js +20 -0
  268. package/dist/react/hooks/contracts/index.js.map +1 -0
  269. package/dist/react/hooks/contracts/useContracts.d.ts +120 -0
  270. package/dist/react/hooks/contracts/useContracts.js +81 -0
  271. package/dist/react/hooks/contracts/useContracts.js.map +1 -0
  272. package/dist/react/hooks/contracts/useLevrMarketContractAddresses.d.ts +3 -0
  273. package/dist/react/hooks/contracts/useLevrMarketContractAddresses.js +27 -0
  274. package/dist/react/hooks/contracts/useLevrMarketContractAddresses.js.map +1 -0
  275. package/dist/react/hooks/index.d.ts +2 -0
  276. package/dist/react/hooks/index.js +19 -0
  277. package/dist/react/hooks/index.js.map +1 -0
  278. package/dist/react/index.d.ts +6 -0
  279. package/dist/react/index.js +23 -0
  280. package/dist/react/index.js.map +1 -0
  281. package/dist/react/injectedDependencies.d.ts +78 -0
  282. package/dist/react/injectedDependencies.js +94 -0
  283. package/dist/react/injectedDependencies.js.map +1 -0
  284. package/dist/react/queryClient.d.ts +9 -0
  285. package/dist/react/queryClient.js +13 -0
  286. package/dist/react/queryClient.js.map +1 -0
  287. package/dist/react/queryKeys.d.ts +17 -0
  288. package/dist/react/queryKeys.js +23 -0
  289. package/dist/react/queryKeys.js.map +1 -0
  290. package/dist/react/types/contracts.types.d.ts +4 -0
  291. package/dist/react/types/contracts.types.js +3 -0
  292. package/dist/react/types/contracts.types.js.map +1 -0
  293. package/dist/react/types/index.d.ts +1 -0
  294. package/dist/react/types/index.js +18 -0
  295. package/dist/react/types/index.js.map +1 -0
  296. package/dist/server/config/cloudflare.d.ts +30 -0
  297. package/dist/server/config/cloudflare.js +45 -0
  298. package/dist/server/config/cloudflare.js.map +1 -0
  299. package/dist/server/config/constants.d.ts +1 -0
  300. package/dist/server/config/constants.js +7 -0
  301. package/dist/server/config/constants.js.map +1 -0
  302. package/dist/server/config/dotenv.d.ts +35 -0
  303. package/dist/server/config/dotenv.js +42 -0
  304. package/dist/server/config/dotenv.js.map +1 -0
  305. package/dist/server/config/index.d.ts +9 -0
  306. package/dist/server/config/index.js +31 -0
  307. package/dist/server/config/index.js.map +1 -0
  308. package/dist/server/config/kms.d.ts +22 -0
  309. package/dist/server/config/kms.js +54 -0
  310. package/dist/server/config/kms.js.map +1 -0
  311. package/dist/server/config/prisma.d.ts +20 -0
  312. package/dist/server/config/prisma.js +40 -0
  313. package/dist/server/config/prisma.js.map +1 -0
  314. package/dist/server/config/redis.d.ts +57 -0
  315. package/dist/server/config/redis.js +121 -0
  316. package/dist/server/config/redis.js.map +1 -0
  317. package/dist/server/config/urls.d.ts +49 -0
  318. package/dist/server/config/urls.js +7 -0
  319. package/dist/server/config/urls.js.map +1 -0
  320. package/dist/server/config/winston.d.ts +3 -0
  321. package/dist/server/config/winston.js +14 -0
  322. package/dist/server/config/winston.js.map +1 -0
  323. package/dist/server/contracts/clients/index.d.ts +1 -0
  324. package/dist/server/contracts/clients/index.js +18 -0
  325. package/dist/server/contracts/clients/index.js.map +1 -0
  326. package/dist/server/contracts/clients/ozRelayerService.d.ts +18 -0
  327. package/dist/server/contracts/clients/ozRelayerService.js +167 -0
  328. package/dist/server/contracts/clients/ozRelayerService.js.map +1 -0
  329. package/dist/server/contracts/index.d.ts +2 -0
  330. package/dist/server/contracts/index.js +19 -0
  331. package/dist/server/contracts/index.js.map +1 -0
  332. package/dist/server/contracts/instances.d.ts +20 -0
  333. package/dist/server/contracts/instances.js +28 -0
  334. package/dist/server/contracts/instances.js.map +1 -0
  335. package/dist/server/index.d.ts +11 -0
  336. package/dist/server/index.js +36 -0
  337. package/dist/server/index.js.map +1 -0
  338. package/dist/server/instrumentation.d.ts +9 -0
  339. package/dist/server/instrumentation.js +37 -0
  340. package/dist/server/instrumentation.js.map +1 -0
  341. package/dist/server/liquidation-engine/index.d.ts +3 -0
  342. package/dist/server/liquidation-engine/index.js +20 -0
  343. package/dist/server/liquidation-engine/index.js.map +1 -0
  344. package/dist/server/liquidation-engine/redis.cache.manager/cache.keys.util.d.ts +10 -0
  345. package/dist/server/liquidation-engine/redis.cache.manager/cache.keys.util.js +15 -0
  346. package/dist/server/liquidation-engine/redis.cache.manager/cache.keys.util.js.map +1 -0
  347. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.d.ts +124 -0
  348. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.js +242 -0
  349. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.js.map +1 -0
  350. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.test.d.ts +1 -0
  351. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.test.js +115 -0
  352. package/dist/server/liquidation-engine/redis.cache.manager/prices.set.manager.test.js.map +1 -0
  353. package/dist/server/liquidation-engine/types/index.d.ts +1 -0
  354. package/dist/server/liquidation-engine/types/index.js +3 -0
  355. package/dist/server/liquidation-engine/types/index.js.map +1 -0
  356. package/dist/server/middleware/auth/cloudflare.handler.d.ts +6 -0
  357. package/dist/server/middleware/auth/cloudflare.handler.js +37 -0
  358. package/dist/server/middleware/auth/cloudflare.handler.js.map +1 -0
  359. package/dist/server/middleware/auth/hmac.handler.d.ts +11 -0
  360. package/dist/server/middleware/auth/hmac.handler.js +157 -0
  361. package/dist/server/middleware/auth/hmac.handler.js.map +1 -0
  362. package/dist/server/middleware/auth/index.d.ts +3 -0
  363. package/dist/server/middleware/auth/index.js +20 -0
  364. package/dist/server/middleware/auth/index.js.map +1 -0
  365. package/dist/server/middleware/auth/privy.handler.d.ts +7 -0
  366. package/dist/server/middleware/auth/privy.handler.js +31 -0
  367. package/dist/server/middleware/auth/privy.handler.js.map +1 -0
  368. package/dist/server/middleware/index.d.ts +2 -0
  369. package/dist/server/middleware/index.js +19 -0
  370. package/dist/server/middleware/index.js.map +1 -0
  371. package/dist/server/middleware/multiAuth.examples.d.ts +46 -0
  372. package/dist/server/middleware/multiAuth.examples.js +123 -0
  373. package/dist/server/middleware/multiAuth.examples.js.map +1 -0
  374. package/dist/server/middleware/multiAuth.middleware.d.ts +30 -0
  375. package/dist/server/middleware/multiAuth.middleware.js +90 -0
  376. package/dist/server/middleware/multiAuth.middleware.js.map +1 -0
  377. package/dist/server/middleware/rateLimit.middleware.d.ts +1 -0
  378. package/dist/server/middleware/rateLimit.middleware.js +19 -0
  379. package/dist/server/middleware/rateLimit.middleware.js.map +1 -0
  380. package/dist/server/oracle/index.d.ts +3 -0
  381. package/dist/server/oracle/index.js +20 -0
  382. package/dist/server/oracle/index.js.map +1 -0
  383. package/dist/server/oracle/redis-cache-manager/cache.keys.utils.d.ts +90 -0
  384. package/dist/server/oracle/redis-cache-manager/cache.keys.utils.js +147 -0
  385. package/dist/server/oracle/redis-cache-manager/cache.keys.utils.js.map +1 -0
  386. package/dist/server/oracle/redis-cache-manager/channels.d.ts +2 -0
  387. package/dist/server/oracle/redis-cache-manager/channels.js +11 -0
  388. package/dist/server/oracle/redis-cache-manager/channels.js.map +1 -0
  389. package/dist/server/oracle/redis-cache-manager/game.cache.service.d.ts +184 -0
  390. package/dist/server/oracle/redis-cache-manager/game.cache.service.js +698 -0
  391. package/dist/server/oracle/redis-cache-manager/game.cache.service.js.map +1 -0
  392. package/dist/server/oracle/redis-cache-manager/index.d.ts +4 -0
  393. package/dist/server/oracle/redis-cache-manager/index.js +21 -0
  394. package/dist/server/oracle/redis-cache-manager/index.js.map +1 -0
  395. package/dist/server/oracle/redis-cache-manager/market.cache.service.d.ts +115 -0
  396. package/dist/server/oracle/redis-cache-manager/market.cache.service.js +279 -0
  397. package/dist/server/oracle/redis-cache-manager/market.cache.service.js.map +1 -0
  398. package/dist/server/oracle/rmq-manager/base.queue.manager.d.ts +21 -0
  399. package/dist/server/oracle/rmq-manager/base.queue.manager.js +128 -0
  400. package/dist/server/oracle/rmq-manager/base.queue.manager.js.map +1 -0
  401. package/dist/server/oracle/rmq-manager/index.d.ts +2 -0
  402. package/dist/server/oracle/rmq-manager/index.js +19 -0
  403. package/dist/server/oracle/rmq-manager/index.js.map +1 -0
  404. package/dist/server/oracle/rmq-manager/queue.configs.d.ts +5 -0
  405. package/dist/server/oracle/rmq-manager/queue.configs.js +38 -0
  406. package/dist/server/oracle/rmq-manager/queue.configs.js.map +1 -0
  407. package/dist/server/oracle/types/index.d.ts +2 -0
  408. package/dist/server/oracle/types/index.js +19 -0
  409. package/dist/server/oracle/types/index.js.map +1 -0
  410. package/dist/server/oracle/types/providers/index.d.ts +4 -0
  411. package/dist/server/oracle/types/providers/index.js +21 -0
  412. package/dist/server/oracle/types/providers/index.js.map +1 -0
  413. package/dist/server/oracle/types/providers/lsports.types.d.ts +148 -0
  414. package/dist/server/oracle/types/providers/lsports.types.js +13 -0
  415. package/dist/server/oracle/types/providers/lsports.types.js.map +1 -0
  416. package/dist/server/oracle/types/providers/optic.odds.types.d.ts +293 -0
  417. package/dist/server/oracle/types/providers/optic.odds.types.js +140 -0
  418. package/dist/server/oracle/types/providers/optic.odds.types.js.map +1 -0
  419. package/dist/server/oracle/types/providers/providers.types.d.ts +5 -0
  420. package/dist/server/oracle/types/providers/providers.types.js +10 -0
  421. package/dist/server/oracle/types/providers/providers.types.js.map +1 -0
  422. package/dist/server/oracle/types/providers/rundown.types.d.ts +194 -0
  423. package/dist/server/oracle/types/providers/rundown.types.js +22 -0
  424. package/dist/server/oracle/types/providers/rundown.types.js.map +1 -0
  425. package/dist/server/oracle/types/queue/index.d.ts +2 -0
  426. package/dist/server/oracle/types/queue/index.js +19 -0
  427. package/dist/server/oracle/types/queue/index.js.map +1 -0
  428. package/dist/server/oracle/types/queue/queue.constant.d.ts +10 -0
  429. package/dist/server/oracle/types/queue/queue.constant.js +14 -0
  430. package/dist/server/oracle/types/queue/queue.constant.js.map +1 -0
  431. package/dist/server/oracle/types/queue/queue.types.d.ts +5 -0
  432. package/dist/server/oracle/types/queue/queue.types.js +3 -0
  433. package/dist/server/oracle/types/queue/queue.types.js.map +1 -0
  434. package/dist/server/prisma/index.d.ts +2 -0
  435. package/dist/server/prisma/index.js +24 -0
  436. package/dist/server/prisma/index.js.map +1 -0
  437. package/dist/server/repositories/apiKey.repository.d.ts +7 -0
  438. package/dist/server/repositories/apiKey.repository.js +19 -0
  439. package/dist/server/repositories/apiKey.repository.js.map +1 -0
  440. package/dist/server/repositories/index.d.ts +1 -0
  441. package/dist/server/repositories/index.js +18 -0
  442. package/dist/server/repositories/index.js.map +1 -0
  443. package/dist/server/services/cloudflare.service.d.ts +12 -0
  444. package/dist/server/services/cloudflare.service.js +24 -0
  445. package/dist/server/services/cloudflare.service.js.map +1 -0
  446. package/dist/server/services/crypto.service.d.ts +17 -0
  447. package/dist/server/services/crypto.service.js +50 -0
  448. package/dist/server/services/crypto.service.js.map +1 -0
  449. package/dist/server/services/hmac.service.d.ts +52 -0
  450. package/dist/server/services/hmac.service.js +115 -0
  451. package/dist/server/services/hmac.service.js.map +1 -0
  452. package/dist/server/services/index.d.ts +5 -0
  453. package/dist/server/services/index.js +22 -0
  454. package/dist/server/services/index.js.map +1 -0
  455. package/dist/server/services/presigned.urls.d.ts +11 -0
  456. package/dist/server/services/presigned.urls.js +41 -0
  457. package/dist/server/services/presigned.urls.js.map +1 -0
  458. package/dist/server/services/privy.service.d.ts +30 -0
  459. package/dist/server/services/privy.service.js +122 -0
  460. package/dist/server/services/privy.service.js.map +1 -0
  461. package/dist/server/test-relayers.d.ts +1 -0
  462. package/dist/server/test-relayers.js +17 -0
  463. package/dist/server/test-relayers.js.map +1 -0
  464. package/dist/server/types/auth.types.d.ts +8 -0
  465. package/dist/server/types/auth.types.js +3 -0
  466. package/dist/server/types/auth.types.js.map +1 -0
  467. package/dist/server/types/global.types.d.ts +35 -0
  468. package/dist/server/types/global.types.js +4 -0
  469. package/dist/server/types/global.types.js.map +1 -0
  470. package/dist/server/types/index.d.ts +2 -0
  471. package/dist/server/types/index.js +19 -0
  472. package/dist/server/types/index.js.map +1 -0
  473. package/dist/server/utils/express.utils.d.ts +24 -0
  474. package/dist/server/utils/express.utils.js +36 -0
  475. package/dist/server/utils/express.utils.js.map +1 -0
  476. package/dist/server/utils/index.d.ts +2 -0
  477. package/dist/server/utils/index.js +19 -0
  478. package/dist/server/utils/index.js.map +1 -0
  479. package/dist/server/utils/tracing/index.d.ts +2 -0
  480. package/dist/server/utils/tracing/index.js +19 -0
  481. package/dist/server/utils/tracing/index.js.map +1 -0
  482. package/dist/server/utils/tracing/trace.d.ts +12 -0
  483. package/dist/server/utils/tracing/trace.js +50 -0
  484. package/dist/server/utils/tracing/trace.js.map +1 -0
  485. package/dist/server/utils/tracing/wrap.module.with.tracing.d.ts +126 -0
  486. package/dist/server/utils/tracing/wrap.module.with.tracing.js +202 -0
  487. package/dist/server/utils/tracing/wrap.module.with.tracing.js.map +1 -0
  488. package/package.json +126 -0
@@ -0,0 +1,698 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Game Cache Service - Manages Redis caching operations for game-related data
4
+ * This module provides functionality for caching and retrieving game data, including:
5
+ * - Game schedules
6
+ * - Active and post-game data
7
+ * - Game scores and period information
8
+ * - Fixture ID mappings between different providers
9
+ *
10
+ * @module game.cache.service
11
+ */
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.getAllFixtureIdsForGameIds = exports.getAllProvidersIdsForLevrFixtureIds = exports.invalidateScoreCache = exports.deleteAllSubKeys = exports.updateGameStatusInCache = exports.getGameScoreCache = exports.setGamesScoreCache = exports.updateGamesClockInCache = exports.getLevrFixtureIdUsingGameId = exports.mapProviderFixtureIdToLevrFixtureIdMany = exports.mapProviderFixtureIdToLevrFixtureId = exports.mapGameIdToLevrFixtureId = exports.removePostGamesCache = exports.removeActiveGamesCache = exports.getGameCacheByFixtureIdWithProviderFixtureId = exports.getGameCacheByFixtureId = exports.getPostGamesCache = exports.getActiveGamesCacheWithRelations = exports.getActiveGamesCache = exports.getSpecificGamesCacheByFixtureIds = exports.getSpecificGamesCacheByGameIds = exports.getPostGamesByFixtureId = exports.getActiveGamesByFixtureId = exports.getGamesByFixtureId = exports.getPostGameCacheByGameId = exports.getActiveGameCacheByGameId = exports.setPostGamesCache = exports.setActiveGamesCache = void 0;
17
+ const core_1 = require("../../../core");
18
+ const config_1 = require("../../config");
19
+ const winston_1 = __importDefault(require("../../config/winston"));
20
+ const cache_keys_utils_1 = require("./cache.keys.utils");
21
+ const market_cache_service_1 = require("./market.cache.service");
22
+ // *************************************Game setters*********************************************************
23
+ /**
24
+ * Caches an array of LevrGame objects in Redis using a pipeline.
25
+ *
26
+ * For each game, stores a mapping from the game ID to the fixture ID,
27
+ * and serializes the game object under a fixture-specific key within a hash.
28
+ * Executes all Redis commands in a single pipeline for efficiency.
29
+ *
30
+ * @param pipeline - The Redis pipeline (ChainableCommander) used to batch commands.
31
+ * @param levrFixtureId - The unique identifier for the fixture to associate with the games.
32
+ * @param games - An array of LevrGame objects to cache.
33
+ * @param gameCollectionKey - The Redis hash key under which the games are stored.
34
+ * @returns A Promise that resolves when the cache operation is complete.
35
+ * @throws Will throw an error if the Redis operation fails.
36
+ */
37
+ const setGamesCache = async (pipeline, games, gameCollectionKey) => {
38
+ games.forEach((game) => {
39
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, game.chainId);
40
+ const fixtureKey = (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(game.levrFixtureId, game.chainId);
41
+ // Store games array under fixture key
42
+ pipeline.hset(hash, fixtureKey, JSON.stringify(game));
43
+ pipeline.hset(cache_keys_utils_1.gameIdsToLevrFixtureIdsMap, game.gameId, game.levrFixtureId);
44
+ });
45
+ const results = await pipeline.exec();
46
+ if (!results) {
47
+ throw new Error(`Pipeline execution failed while caching games for ${gameCollectionKey}`);
48
+ }
49
+ for (const [err] of results) {
50
+ if (err) {
51
+ throw new Error(`Error caching games for ${gameCollectionKey}: ${err.message}`);
52
+ }
53
+ }
54
+ winston_1.default.info(`Cached ${games.length.toString()} games for ${gameCollectionKey}`);
55
+ };
56
+ /**
57
+ * Caches active games in Redis.
58
+ * @param {ChainableCommander} pipeline - Redis pipeline
59
+ * @param {string} levrFixtureId - Fixture identifier
60
+ * @param {LevrGame[]} games - Games to cache
61
+ * @returns {Promise<void>}
62
+ */
63
+ const setActiveGamesCache = async (pipeline, games) => {
64
+ await setGamesCache(pipeline, games, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
65
+ };
66
+ exports.setActiveGamesCache = setActiveGamesCache;
67
+ /**
68
+ * Caches post-game data in Redis.
69
+ * @param {ChainableCommander} pipeline - Redis pipeline
70
+ * @param {string} levrFixtureId - Fixture identifier
71
+ * @param {LevrGame[]} games - Games to cache
72
+ * @returns {Promise<void>}
73
+ */
74
+ const setPostGamesCache = async (pipeline, games) => {
75
+ await setGamesCache(pipeline, games, cache_keys_utils_1.GameCollectionKeys.postGamesHash);
76
+ };
77
+ exports.setPostGamesCache = setPostGamesCache;
78
+ //*******************************************Game fetchers*********************************************************
79
+ const getAGameByGameId = async (redis, gameId, chainId, gameCollectionKey) => {
80
+ // Get the fixtureId for this game
81
+ const fixtureId = await redis.hget(cache_keys_utils_1.gameIdsToLevrFixtureIdsMap, gameId.toString());
82
+ if (!fixtureId)
83
+ return null;
84
+ // Get all games for this fixture
85
+ const fixtureKey = (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(fixtureId, chainId);
86
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, chainId);
87
+ const gamesString = await redis.hget(hash, fixtureKey);
88
+ if (!gamesString)
89
+ return null;
90
+ // Find the specific game
91
+ const game = JSON.parse(gamesString);
92
+ return game;
93
+ };
94
+ /**
95
+ * Retrieves a game from the Redis cache using its game ID.
96
+ * @param gameId - The ID of the game.
97
+ * @returns {Promise<LevrGame | null>} - A promise that resolves with a LevrGame object or null if not found.
98
+ */
99
+ const getActiveGameCacheByGameId = async (redis, gameId, chainId) => {
100
+ return await getAGameByGameId(redis, gameId, chainId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
101
+ };
102
+ exports.getActiveGameCacheByGameId = getActiveGameCacheByGameId;
103
+ /**
104
+ * Retrieves a game from the Redis cache using its game ID.
105
+ * @param gameId - The ID of the game.
106
+ * @returns {Promise<LevrGame | null>} - A promise that resolves with a LevrGame object or null if not found.
107
+ */
108
+ const getPostGameCacheByGameId = async (redis, gameId, chainId) => {
109
+ return await getAGameByGameId(redis, gameId, chainId, cache_keys_utils_1.GameCollectionKeys.postGamesHash);
110
+ };
111
+ exports.getPostGameCacheByGameId = getPostGameCacheByGameId;
112
+ /**
113
+ * Retrieves all games for a given fixture ID from the Redis cache.
114
+ * @param redis
115
+ * @param levrFixtureId
116
+ * @param gameCollectionKey
117
+ * @returns {Promise<LevrGame[]>} - A promise that resolves with an array of LevrGame objects.
118
+ * @notice all games are related to the fixtureId across all chains.
119
+ */
120
+ const getGamesByFixtureId = async (redis, levrFixtureId, gameCollectionKey) => {
121
+ const pipeline = redis.pipeline();
122
+ const levrGames = [];
123
+ for (const chainId of config_1.supportedChainIds) {
124
+ const fixtureKey = (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(levrFixtureId, chainId);
125
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, chainId);
126
+ pipeline.hget(hash, fixtureKey);
127
+ }
128
+ const results = await pipeline.exec();
129
+ if (!results)
130
+ return [];
131
+ for (const [err, gamesString] of results) {
132
+ if (err)
133
+ throw err;
134
+ if (gamesString) {
135
+ const game = JSON.parse(gamesString);
136
+ levrGames.push(game);
137
+ }
138
+ }
139
+ return levrGames;
140
+ };
141
+ exports.getGamesByFixtureId = getGamesByFixtureId;
142
+ /**
143
+ * Retrieves all active games for a given fixture ID from the Redis cache.
144
+ * @param redis - Redis client instance
145
+ * @param levrFixtureId - The unique identifier for the fixture
146
+ * @param gameCollectionKey - The Redis hash key under which the games are stored
147
+ * @returns {Promise<LevrGame[]>} - A promise that resolves with an array of LevrGame objects
148
+ * @notice all games are related to the fixtureId across all chains.
149
+ */
150
+ const getActiveGamesByFixtureId = async (redis, levrFixtureId) => {
151
+ return (0, exports.getGamesByFixtureId)(redis, levrFixtureId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
152
+ };
153
+ exports.getActiveGamesByFixtureId = getActiveGamesByFixtureId;
154
+ const getPostGamesByFixtureId = async (redis, levrFixtureId) => {
155
+ return (0, exports.getGamesByFixtureId)(redis, levrFixtureId, cache_keys_utils_1.GameCollectionKeys.postGamesHash);
156
+ };
157
+ exports.getPostGamesByFixtureId = getPostGamesByFixtureId;
158
+ //*********************************Fetch by collection************************************************ */
159
+ /**
160
+ * Retrieves all games from a Redis hash collection and flattens them into a single array
161
+ *
162
+ * @param redis - Redis client instance
163
+ * @param gameCollectionKey - The Redis hash key under which the games are stored
164
+ * @returns {Promise<LevrGame[]>} - A promise that resolves with an array of LevrGame objects
165
+ *
166
+ * Process:
167
+ * 1. Retrieves all hash fields and values using hgetall
168
+ * 2. Each hash value is a JSON string containing an array of games for a fixture
169
+ * 3. Parses all JSON strings into LevrGame objects
170
+ */
171
+ const getGamesCache = async (redis, gameCollectionKey, chainId) => {
172
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, chainId);
173
+ const gamesString = await redis.hgetall(hash);
174
+ // what the data looks like
175
+ // activeGamesHash: {
176
+ // fixtureId1: '{"id": "gameId1", ...}',
177
+ // fixtureId2: '{"id": "gameId3", ...}',
178
+ // ...
179
+ // }
180
+ const games = Object.values(gamesString).map((gameString) => JSON.parse(gameString));
181
+ return games;
182
+ };
183
+ // // TODO: @ooglec check this function
184
+ /**
185
+ * Gets all active games from the cache with relations (markets and scores)
186
+ * @param redis - Redis client instance
187
+ * @param gameCollectionKey - Key for the game collection in Redis
188
+ * @param chainId - Blockchain network chain ID
189
+ * @notice this does not make a specific distinction for select game or fixtureIds
190
+ */
191
+ const getGamesCacheWithRelations = async (redis, gameCollectionKey, chainId) => {
192
+ const pipeline = redis.pipeline();
193
+ // Execute the pipeline to get all games in one go
194
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, chainId);
195
+ pipeline.hgetall(hash);
196
+ // Execute the pipeline to get Scores
197
+ pipeline.hgetall(cache_keys_utils_1.getGameScoreByFixtureIdHash);
198
+ const results = await pipeline.exec();
199
+ // what the data looks like
200
+ // activeGamesHash: {
201
+ // fixtureId1: '{"id": "gameId1", ...}',
202
+ // fixtureId2: '{"id": "gameId3", ...}',
203
+ // ...
204
+ // }
205
+ if (!results || results.length < 2) {
206
+ throw new Error("Pipeline execution failed");
207
+ }
208
+ // Extract results and check for errors
209
+ const [gamesResult, scoresResult] = results;
210
+ if (!gamesResult || !scoresResult) {
211
+ throw new Error("Invalid pipeline results");
212
+ }
213
+ const [gamesError, gamesHashResult] = gamesResult;
214
+ const [scoresError, gamesScoresResult] = scoresResult;
215
+ if (gamesError)
216
+ throw gamesError;
217
+ if (scoresError)
218
+ throw scoresError;
219
+ // // TODO: results will be stringified JSON, so we need to parse it first before checking it's type
220
+ //@dev results will be of the type Record<string, string>
221
+ // hgetall(hash) Returns: Record<string, string>
222
+ if (!gamesHashResult || typeof gamesHashResult !== "object") {
223
+ return [];
224
+ }
225
+ const gamesHash = gamesHashResult; // conforms to type returned by hgetAll
226
+ const games = Object.values(gamesHash).map((gameString) => JSON.parse(gameString));
227
+ // get game markets for each game
228
+ const gameUniqueIdentifiers = games.map((game) => game.objectId);
229
+ const marketTypesArray = Object.values(core_1.MarketType);
230
+ const gameMarkets = await (0, market_cache_service_1.getMarketDataCacheWithOdds)(redis, gameUniqueIdentifiers, marketTypesArray);
231
+ // map markets to games
232
+ // scores
233
+ const scoresHash = gamesScoresResult;
234
+ const scores = {};
235
+ for (const [levrFixtureId, scoreString] of Object.entries(scoresHash)) {
236
+ if (scoreString) {
237
+ scores[levrFixtureId] = JSON.parse(scoreString);
238
+ }
239
+ }
240
+ const gamesWithMarketsAndScores = games.map((game) => {
241
+ const markets = gameMarkets?.get(game.objectId);
242
+ const score = scores[game.levrFixtureId] ?? null;
243
+ if (!markets) {
244
+ return {
245
+ ...game,
246
+ markets: [],
247
+ scores: score,
248
+ };
249
+ }
250
+ return {
251
+ ...game,
252
+ markets,
253
+ scores: score,
254
+ };
255
+ });
256
+ return gamesWithMarketsAndScores;
257
+ };
258
+ /**
259
+ * Retrieves specific games from the cache based on fixture IDs
260
+ *
261
+ * @param redis - Redis client instance
262
+ * @param gameCollectionKey - Key for the game collection in Redis
263
+ * @param levrFixtureIds - Array of fixture IDs to retrieve
264
+ * @param chainId - Blockchain network chain ID
265
+ *
266
+ * @returns Promise containing array of LevrGame objects
267
+ *
268
+ * Process:
269
+ * 1. Uses Redis pipeline for batch operations
270
+ * 2. Creates cache keys for each fixture ID
271
+ * 3. Retrieves game data from gameCollectionKey using fixture cache keys
272
+ * 4. Parses JSON strings into LevrGame objects
273
+ * 5. Returns array of games
274
+ */
275
+ const getSpecificGamesCacheNoRelations = async (redis, gameCollectionKey, levrFixtureIds, chainId) => {
276
+ // create a list of fields with levrFixtureIds
277
+ const fields = levrFixtureIds.map((fixtureId) => (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(fixtureId, chainId));
278
+ const hash = (0, cache_keys_utils_1.getGamesKeyByChainId)(gameCollectionKey, chainId);
279
+ const results = await redis.hmget(hash, ...fields);
280
+ /**
281
+ * // TODO: @ooglec check results is not null,
282
+ * then check if error is present in the results
283
+ * then check for issues on result is defined and of expected type
284
+ */
285
+ const specificGames = [];
286
+ for (const gamesString of results) {
287
+ if (!gamesString)
288
+ continue; // skip null or undefined values
289
+ if (gamesString && typeof gamesString === "string") {
290
+ const games = JSON.parse(gamesString);
291
+ specificGames.push(games);
292
+ }
293
+ }
294
+ return specificGames;
295
+ };
296
+ // adds markets. odds and scores to the game
297
+ const getSpecificGamesCacheWithRelations = async (redis, gameCollectionKey, levrFixtureIds, chainId) => {
298
+ const pipeline = redis.pipeline();
299
+ // create a list of fields with levrFixtureIds
300
+ const fields = levrFixtureIds.map((fixtureId) => (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(fixtureId, chainId));
301
+ pipeline.hmget(gameCollectionKey, ...fields);
302
+ pipeline.hmget(cache_keys_utils_1.getGameScoreByFixtureIdHash, ...fields);
303
+ const results = await pipeline.exec();
304
+ if (!results || results.length !== 2)
305
+ return [];
306
+ const specificGames = [];
307
+ const gamesResult = results[0];
308
+ const scoresResult = results[1];
309
+ const scores = {};
310
+ for (let i = 0; i < fields.length; i++) {
311
+ const [err, scoreString] = scoresResult[i];
312
+ if (err)
313
+ throw err;
314
+ if (scoreString) {
315
+ scores[fields[i]] = JSON.parse(scoreString);
316
+ }
317
+ }
318
+ for (const [err, gamesString] of gamesResult) {
319
+ if (err)
320
+ throw err;
321
+ if (gamesString) {
322
+ const game = JSON.parse(gamesString);
323
+ specificGames.push(...game);
324
+ }
325
+ }
326
+ const gamesWithRelations = [];
327
+ const gameUniqueIdentifiers = specificGames.map((game) => game.objectId);
328
+ const marketTypesArray = Object.values(core_1.MarketType);
329
+ const gameMarkets = await (0, market_cache_service_1.getMarketDataCacheWithOdds)(redis, gameUniqueIdentifiers, marketTypesArray);
330
+ for (const game of specificGames) {
331
+ const fixtureId = game.levrFixtureId;
332
+ const score = scores[fixtureId] ?? null;
333
+ const markets = gameMarkets?.get(game.objectId) ?? [];
334
+ gamesWithRelations.push({
335
+ ...game,
336
+ markets,
337
+ scores: score,
338
+ });
339
+ }
340
+ return gamesWithRelations;
341
+ };
342
+ /**
343
+ * Retrieves specific games from the cache based on game IDs
344
+ *
345
+ * @param redis - Redis client instance
346
+ * @param gameCollectionKey - Key for the game collection in Redis
347
+ * @param gameIds - Array of game IDs to retrieve
348
+ * @param chainId - Blockchain network chain ID
349
+ *
350
+ * @returns Promise containing array of LevrGame objects
351
+ *
352
+ * Process:
353
+ * 1. Uses Redis pipeline for batch operations
354
+ * 2. Looks up fixture IDs from gameIdsToLevrFixtureIdsMap using game IDs
355
+ * 3. Filters out null fixture IDs and creates cache keys for each fixture
356
+ * 4. Retrieves game data from gameCollectionKey using fixture cache keys
357
+ * 5. Parses JSON strings into LevrGame objects
358
+ * 6. Returns flattened array of games
359
+ */
360
+ const getSpecificGamesCacheByGameIds = async (redis, gameCollectionKey, gameIds, chainId, withRelations = false) => {
361
+ // get the respective fixtureIds for the gameIds
362
+ const fixtureIds = await redis.hmget(cache_keys_utils_1.gameIdsToLevrFixtureIdsMap, ...gameIds);
363
+ const fields = fixtureIds
364
+ .filter((fixtureId) => fixtureId !== null)
365
+ .map((fixtureId) => (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(fixtureId, chainId));
366
+ if (fields.length === 0)
367
+ return [];
368
+ if (withRelations) {
369
+ return await getSpecificGamesCacheWithRelations(redis, gameCollectionKey, fields, chainId);
370
+ }
371
+ return await getSpecificGamesCacheNoRelations(redis, gameCollectionKey, fields, chainId);
372
+ };
373
+ exports.getSpecificGamesCacheByGameIds = getSpecificGamesCacheByGameIds;
374
+ const getSpecificGamesCacheByFixtureIds = async (redis, fixtureIds, chainId, withRelations = false, active = true) => {
375
+ if (fixtureIds.length === 0)
376
+ return [];
377
+ const hash = active ? cache_keys_utils_1.GameCollectionKeys.activeGamesHash : cache_keys_utils_1.GameCollectionKeys.postGamesHash;
378
+ if (withRelations) {
379
+ return getSpecificGamesCacheWithRelations(redis, hash, fixtureIds, chainId);
380
+ }
381
+ return getSpecificGamesCacheNoRelations(redis, hash, fixtureIds, chainId);
382
+ };
383
+ exports.getSpecificGamesCacheByFixtureIds = getSpecificGamesCacheByFixtureIds;
384
+ const getActiveGamesCache = async (redis, chainId) => {
385
+ return getGamesCache(redis, cache_keys_utils_1.GameCollectionKeys.activeGamesHash, chainId);
386
+ };
387
+ exports.getActiveGamesCache = getActiveGamesCache;
388
+ const getActiveGamesCacheWithRelations = async (redis, chainId) => {
389
+ return getGamesCacheWithRelations(redis, cache_keys_utils_1.GameCollectionKeys.activeGamesHash, chainId);
390
+ };
391
+ exports.getActiveGamesCacheWithRelations = getActiveGamesCacheWithRelations;
392
+ const getPostGamesCache = async (redis, chainId) => {
393
+ return getGamesCache(redis, cache_keys_utils_1.GameCollectionKeys.postGamesHash, chainId);
394
+ };
395
+ exports.getPostGamesCache = getPostGamesCache;
396
+ /**
397
+ * Retrieves active games from the Redis cache using its fixture ID.
398
+ * @param fixtureId - The unique identifier for the fixture.
399
+ * @returns {Promise<LevrGame | null>} - A promise that resolves with a LevrGame object or null if not found.
400
+ */
401
+ const getGameCacheByFixtureId = async (redis, fixtureId) => {
402
+ return (0, exports.getGamesByFixtureId)(redis, fixtureId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
403
+ };
404
+ exports.getGameCacheByFixtureId = getGameCacheByFixtureId;
405
+ /**
406
+ * Retrieves a game from the Redis cache using the provider's fixture ID.
407
+ * @param providerFixtureId - The fixture ID provided by the odds provider, e.g (lsports, rundown, optic odds)
408
+ * @returns {Promise<LevrGame | null>} - A promise that resolves with a LevrGame object or null if not found.
409
+ */
410
+ const getGameCacheByFixtureIdWithProviderFixtureId = async (redis, providerFixtureId) => {
411
+ try {
412
+ const levrFixtureId = await getLevrFixtureIdUsingProviderFixtureId(redis, providerFixtureId);
413
+ if (!levrFixtureId)
414
+ return null;
415
+ const levrGameEventRedis = await (0, exports.getGamesByFixtureId)(redis, levrFixtureId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
416
+ return levrGameEventRedis;
417
+ }
418
+ catch (err) {
419
+ winston_1.default.error("error getting game cache by fixtureId", err);
420
+ return null;
421
+ }
422
+ };
423
+ exports.getGameCacheByFixtureIdWithProviderFixtureId = getGameCacheByFixtureIdWithProviderFixtureId;
424
+ //*********************************Remove from games cache***************************************************** */
425
+ const removeGamesCache = async (redis, levrFixtureId, chainId, gameCollectionKey) => {
426
+ try {
427
+ const fixtureKey = (0, cache_keys_utils_1.getCachedLevrByFixtureIdKey)(levrFixtureId, chainId);
428
+ await redis.hdel(gameCollectionKey, fixtureKey);
429
+ await redis.hdel(cache_keys_utils_1.gameIdsToLevrFixtureIdsMap, levrFixtureId);
430
+ }
431
+ catch (err) {
432
+ winston_1.default.error(`Error removing games for fixture ${levrFixtureId}`, err);
433
+ }
434
+ };
435
+ const removeActiveGamesCache = async (redis, levrFixtureId, chainId) => {
436
+ await removeGamesCache(redis, levrFixtureId, chainId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
437
+ };
438
+ exports.removeActiveGamesCache = removeActiveGamesCache;
439
+ const removePostGamesCache = async (redis, levrFixtureId, chainId) => {
440
+ await removeGamesCache(redis, levrFixtureId, chainId, cache_keys_utils_1.GameCollectionKeys.postGamesHash);
441
+ };
442
+ exports.removePostGamesCache = removePostGamesCache;
443
+ //*********************************Mapping games to fixture ids***************************************************** */
444
+ /**
445
+ * Maps a game ID to a Levr fixture ID in Redis.
446
+ * @param gameId - The game ID to be mapped.
447
+ * @param levrFixtureId - The corresponding Levr fixture ID.
448
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
449
+ */
450
+ const mapGameIdToLevrFixtureId = async (redis, gameId, levrFixtureId) => {
451
+ const setMapping = await redis.hset(cache_keys_utils_1.gameIdsToFixtureIds, gameId.toString(), levrFixtureId);
452
+ if (setMapping !== 1) {
453
+ throw new Error(`Failed to set mapping for gameId: ${gameId.toString()} to levrFixtureId: ${levrFixtureId}`);
454
+ }
455
+ };
456
+ exports.mapGameIdToLevrFixtureId = mapGameIdToLevrFixtureId;
457
+ const mapProviderFixtureIdToLevrFixtureId = async (redis, fixtureIds) => {
458
+ const pipeline = redis.pipeline();
459
+ await (0, exports.mapProviderFixtureIdToLevrFixtureIdMany)(pipeline, [fixtureIds]);
460
+ };
461
+ exports.mapProviderFixtureIdToLevrFixtureId = mapProviderFixtureIdToLevrFixtureId;
462
+ const mapProviderFixtureIdToLevrFixtureIdMany = async (pipeline, fixtureIdsList) => {
463
+ // Use the pipeline to execute multiple commands in a single round trip
464
+ for (const { levrFixtureId, lsportsFixtureId, opticOddsFixtureId } of fixtureIdsList) {
465
+ for (const providerFixtureId of [lsportsFixtureId, opticOddsFixtureId]) {
466
+ pipeline.hset(cache_keys_utils_1.providerFixtureIdToLevrId, providerFixtureId, levrFixtureId);
467
+ }
468
+ pipeline.hset(cache_keys_utils_1.levrIdToProviderIds, levrFixtureId, JSON.stringify({ lsportsFixtureId, opticOddsFixtureId }));
469
+ }
470
+ // Execute the pipeline
471
+ const result = await pipeline.exec();
472
+ if (!result || result.length === 0) {
473
+ throw new Error(`Failed to set mappings for provider fixture IDs to Levr fixture ID`);
474
+ }
475
+ };
476
+ exports.mapProviderFixtureIdToLevrFixtureIdMany = mapProviderFixtureIdToLevrFixtureIdMany;
477
+ /**
478
+ * Retrieves the Levr fixture ID using a game ID from Redis.
479
+ * @param gameId - The ID of the game.
480
+ * @returns {Promise<string | null>} - A promise that resolves with the Levr fixture ID or null if not found.
481
+ */
482
+ const getLevrFixtureIdUsingGameId = async (redis, gameId) => {
483
+ return await redis.hget(cache_keys_utils_1.gameIdsToLevrFixtureIdsMap, gameId.toString());
484
+ };
485
+ exports.getLevrFixtureIdUsingGameId = getLevrFixtureIdUsingGameId;
486
+ /**
487
+ * Retrieves the Levr fixture ID using a provider's fixture ID from Redis.
488
+ * @param providerFixtureId - The fixture ID provided by the data provider.
489
+ * @returns {Promise<string | null>} - A promise that resolves with the Levr fixture ID or null if not found.
490
+ */
491
+ const getLevrFixtureIdUsingProviderFixtureId = async (redis, providerFixtureId) => {
492
+ return await redis.hget(cache_keys_utils_1.providerFixtureIdToLevrId, providerFixtureId);
493
+ };
494
+ //*********************************Get game period info***************************************************** */
495
+ /**
496
+ * Updates the game clock in the Redis cache or in the database if not found in cache.
497
+ * @param gameId - The ID of the game.
498
+ * @param gameClock - The current game clock value.
499
+ * @param gamePeriod - The current game period.
500
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
501
+ */
502
+ const updateGamesClockInCache = async (redis, levrFixtureId, gameClock, gamePeriod) => {
503
+ const games = await (0, exports.getGamesByFixtureId)(redis, levrFixtureId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
504
+ for (const game of games) {
505
+ game.gameClock = gameClock;
506
+ game.currentPeriod = gamePeriod;
507
+ }
508
+ await setGamesCache(redis.pipeline(), [...games], cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
509
+ };
510
+ exports.updateGamesClockInCache = updateGamesClockInCache;
511
+ /**
512
+ * Sets the game score in the Redis cache.
513
+ * @param gameId - The ID of the game.
514
+ * @param score - The Scores object to be cached.
515
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
516
+ */
517
+ const setGamesScoreCache = async (redis, fixtureId, score) => {
518
+ const field = fixtureId;
519
+ try {
520
+ const done = await redis.hset(cache_keys_utils_1.getGameScoreByFixtureIdHash, field, JSON.stringify(score));
521
+ if (done === 1) {
522
+ winston_1.default.warn(`Failed to set game score for fixtureId: ${fixtureId}`);
523
+ }
524
+ }
525
+ catch (err) {
526
+ winston_1.default.error("error setting game score in cache", err);
527
+ }
528
+ };
529
+ exports.setGamesScoreCache = setGamesScoreCache;
530
+ /**
531
+ * Retrieves the game score from the Redis cache.
532
+ * @param gameId - The ID of the game.
533
+ * @returns {Promise<LevrScores | null>} - A promise that resolves with a Scores object or null if not found.
534
+ */
535
+ const getGameScoreCache = async (redis, fixtureId) => {
536
+ const gameScore = await redis.hget(cache_keys_utils_1.getGameScoreByFixtureIdHash, fixtureId);
537
+ return gameScore ? JSON.parse(gameScore) : null;
538
+ };
539
+ exports.getGameScoreCache = getGameScoreCache;
540
+ /**
541
+ * Updates the game status in the Redis cache or in the database if not found in cache.
542
+ * @param gameId - The ID of the game.
543
+ * @param gamePhase - The new GamePhase value.
544
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
545
+ */
546
+ const updateGameStatusInCache = async (redis, gameIds, levrFixtureId, gamePhase) => {
547
+ const games = await (0, exports.getGamesByFixtureId)(redis, levrFixtureId, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
548
+ for (const game of games) {
549
+ if (!gameIds.includes(game.gameId))
550
+ continue;
551
+ game.gamePhase = gamePhase;
552
+ }
553
+ await setGamesCache(redis.pipeline(), games, cache_keys_utils_1.GameCollectionKeys.activeGamesHash);
554
+ };
555
+ exports.updateGameStatusInCache = updateGameStatusInCache;
556
+ /**
557
+ * Deletes all sub-keys associated with a given Levr fixture ID.
558
+ * @param levrFixtureId - The Levr fixture ID.
559
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
560
+ */
561
+ const deleteAllSubKeys = async (redis, levrFixtureId) => {
562
+ const allEntries = await redis.hgetall(cache_keys_utils_1.gameIdsToFixtureIds);
563
+ const gameIdsToDelete = Object.entries(allEntries)
564
+ .filter(([fixtureId]) => fixtureId === levrFixtureId)
565
+ .map(([gameId]) => gameId);
566
+ if (gameIdsToDelete.length > 0) {
567
+ await redis.hdel(cache_keys_utils_1.gameIdsToFixtureIds, ...gameIdsToDelete);
568
+ }
569
+ const allProviderFixtureIdsEntries = await redis.hgetall(cache_keys_utils_1.providerFixtureIdToLevrId);
570
+ const providerIdsToDelete = Object.entries(allProviderFixtureIdsEntries)
571
+ .filter(([fixtureId]) => fixtureId === levrFixtureId)
572
+ .map(([providerFixtureId]) => providerFixtureId);
573
+ if (providerIdsToDelete.length > 0) {
574
+ await redis.hdel(cache_keys_utils_1.providerFixtureIdToLevrId, ...providerIdsToDelete);
575
+ }
576
+ };
577
+ exports.deleteAllSubKeys = deleteAllSubKeys;
578
+ /**
579
+ * Invalidates the game score cache.
580
+ * @param gameId - The ID of the game.
581
+ * @returns {Promise<void>} - A promise that resolves when the operation is complete.
582
+ */
583
+ const invalidateScoreCache = async (redis, fixtureId, callbackPromise) => {
584
+ try {
585
+ await callbackPromise();
586
+ await redis.hdel(cache_keys_utils_1.getGameScoreByFixtureIdHash, fixtureId);
587
+ }
588
+ catch (err) {
589
+ winston_1.default.error("error invalidating score cache", err);
590
+ }
591
+ };
592
+ exports.invalidateScoreCache = invalidateScoreCache;
593
+ /**
594
+ * Retrieves all provider fixture IDs associated with multiple Levr fixture IDs.
595
+ *
596
+ * This function queries Redis to find all provider-specific fixture IDs that correspond
597
+ * to the given Levr fixture IDs. It uses a Redis pipeline to efficiently batch
598
+ * multiple queries into a single network request.
599
+ *
600
+ * @param redis - The Redis client instance used to perform the queries
601
+ * @param levrFixtureIda - An array of Levr fixture IDs to look up
602
+ *
603
+ * @returns A Promise resolving to a Record/object where:
604
+ * - Keys are Levr fixture IDs from the input array
605
+ * - Values are arrays of provider-specific fixture IDs associated with each Levr ID
606
+ * - If a Levr ID has no associated provider IDs or doesn't exist, it will map to an empty array
607
+ *
608
+ * @example
609
+ * Get provider IDs for two Levr fixture IDs
610
+ * const providerMap = await getAllProvidersIdsForLevrFixtureIds(redisClient, ['levr-123', 'levr-456']);
611
+ * Result might be: { 'levr-123': ['provider1-789', 'provider2-012'], 'levr-456': ['provider1-345'] }
612
+ *
613
+ * @throws Will throw an error if the Redis operation fails
614
+ */
615
+ const getAllProvidersIdsForLevrFixtureIds = async (redis, levrFixtureIds) => {
616
+ const providerIdsMap = {};
617
+ if (levrFixtureIds.length === 0) {
618
+ winston_1.default.warn("No Levr fixture IDs provided to getAllProvidersIdsForLevrFixtureIds");
619
+ return providerIdsMap;
620
+ }
621
+ try {
622
+ const results = await redis.hmget(cache_keys_utils_1.levrIdToProviderIds, ...levrFixtureIds);
623
+ /**
624
+ * then check if error is present in the results
625
+ * then check for issues on result is defined and of expected type
626
+ */
627
+ if (results.length !== levrFixtureIds.length) {
628
+ winston_1.default.error(`Mismatch in results length: expected ${levrFixtureIds.length.toString()}, got ${results.length.toString()} in getAllProvidersIdsForLevrFixtureIds`);
629
+ return providerIdsMap;
630
+ }
631
+ results.forEach((value, index) => {
632
+ if (value && typeof value === "string") {
633
+ // Parse the JSON string to get the array of provider IDs
634
+ const parsedValue = JSON.parse(value);
635
+ if (!Array.isArray(parsedValue)) {
636
+ winston_1.default.warn(`Parsed value for Levr fixture ID ${levrFixtureIds[index]} is not an array`);
637
+ }
638
+ else {
639
+ providerIdsMap[levrFixtureIds[index]] = parsedValue;
640
+ }
641
+ }
642
+ else {
643
+ providerIdsMap[levrFixtureIds[index]] = [];
644
+ }
645
+ });
646
+ winston_1.default.info("Successfully retrieved provider fixture IDs for Levr fixture IDs");
647
+ return providerIdsMap;
648
+ }
649
+ catch (err) {
650
+ winston_1.default.error("Error getting provider fixture IDs for Levr fixture IDs", err);
651
+ return providerIdsMap;
652
+ }
653
+ };
654
+ exports.getAllProvidersIdsForLevrFixtureIds = getAllProvidersIdsForLevrFixtureIds;
655
+ /**
656
+ * Gets all fixture IDs associated with a list of game IDs from Redis
657
+ *
658
+ * @param redis - Redis client instance
659
+ * @param gameIds - Array of game IDs to lookup
660
+ * @returns Record mapping game IDs to arrays of fixture IDs
661
+ * @throws Will throw an error if the Redis operation fails
662
+ */
663
+ const getAllFixtureIdsForGameIds = async (redis, gameIds) => {
664
+ const fixtureIdsMap = {};
665
+ if (gameIds.length === 0) {
666
+ winston_1.default.warn("No game IDs provided to getAllFixtureIdsForGameIds");
667
+ return fixtureIdsMap;
668
+ }
669
+ try {
670
+ const results = await redis.hmget(cache_keys_utils_1.gameIdsToFixtureIds, ...gameIds);
671
+ if (results.length !== gameIds.length) {
672
+ winston_1.default.error(`Mismatch in results length: expected ${gameIds.length.toString()}, got ${results.length.toString()} in getAllFixtureIdsForGameIds`);
673
+ return fixtureIdsMap;
674
+ }
675
+ results.forEach((value, index) => {
676
+ if (value && typeof value === "string") {
677
+ const parsedValue = JSON.parse(value);
678
+ if (!Array.isArray(parsedValue)) {
679
+ winston_1.default.warn(`Parsed value for game ID ${gameIds[index]} is not an array`);
680
+ }
681
+ else {
682
+ fixtureIdsMap[gameIds[index]] = parsedValue;
683
+ }
684
+ }
685
+ else {
686
+ fixtureIdsMap[gameIds[index]] = [];
687
+ }
688
+ });
689
+ winston_1.default.info("Successfully retrieved fixture IDs for game IDs");
690
+ return fixtureIdsMap;
691
+ }
692
+ catch (err) {
693
+ winston_1.default.error("Error getting fixture IDs for game IDs", err);
694
+ return fixtureIdsMap;
695
+ }
696
+ };
697
+ exports.getAllFixtureIdsForGameIds = getAllFixtureIdsForGameIds;
698
+ //# sourceMappingURL=game.cache.service.js.map