lynx-client 0.0.1-beta.10 → 0.0.1-beta.11

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 (281) hide show
  1. package/dist/cjs/index.js +6 -0
  2. package/dist/cjs/lib/constants/contractEnums.js +1 -0
  3. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
  4. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +27 -0
  5. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
  6. package/dist/cjs/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
  7. package/dist/cjs/lib/contractsIntegration/LexLensService/LexLensService.js +270 -0
  8. package/dist/cjs/lib/contractsIntegration/LexLensService/index.js +18 -0
  9. package/dist/cjs/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
  10. package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +47 -0
  11. package/dist/cjs/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
  12. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
  13. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
  14. package/dist/cjs/lib/contractsIntegration/TradersPortalService/index.js +19 -0
  15. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +2 -0
  16. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +49 -0
  17. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
  18. package/dist/cjs/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
  19. package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
  20. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
  21. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +28 -0
  22. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
  23. package/dist/cjs/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
  24. package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
  25. package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +121 -8
  26. package/dist/cjs/lib/lynxSystem/lynxScalesUtils.js +8 -0
  27. package/dist/cjs/lib/lynxSystem/registry/registryReading.js +38 -0
  28. package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
  29. package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
  30. package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
  31. package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
  32. package/dist/cjs/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
  33. package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
  34. package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
  35. package/dist/cjs/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
  36. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
  37. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
  38. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
  39. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
  40. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
  41. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
  42. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
  43. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
  44. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  45. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  46. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  47. package/dist/cjs/lib/utils/ethersTypes.js +29 -6
  48. package/dist/esm/index.d.ts +6 -0
  49. package/dist/esm/index.d.ts.map +1 -1
  50. package/dist/esm/index.js +6 -0
  51. package/dist/esm/lib/constants/contractEnums.d.ts.map +1 -1
  52. package/dist/esm/lib/constants/contractEnums.js +1 -0
  53. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +14 -0
  54. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
  55. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
  56. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
  57. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
  58. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +27 -0
  59. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
  60. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
  61. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
  62. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
  63. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
  64. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
  65. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts +35 -0
  66. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
  67. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.js +270 -0
  68. package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
  69. package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
  70. package/dist/esm/lib/contractsIntegration/LexLensService/index.js +18 -0
  71. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +14 -0
  72. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
  73. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
  74. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +19 -0
  75. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
  76. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +47 -0
  77. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
  78. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
  79. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
  80. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
  81. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
  82. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
  83. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
  84. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
  85. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
  86. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
  87. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
  88. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.js +19 -0
  89. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +15 -0
  90. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
  91. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +2 -0
  92. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +19 -0
  93. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
  94. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +49 -0
  95. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
  96. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
  97. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
  98. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
  99. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
  100. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
  101. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
  102. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
  103. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
  104. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +15 -0
  105. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
  106. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
  107. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
  108. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
  109. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +28 -0
  110. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
  111. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
  112. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
  113. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
  114. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
  115. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
  116. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
  117. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
  118. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
  119. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
  120. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  121. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +121 -8
  122. package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
  123. package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
  124. package/dist/esm/lib/lynxSystem/lynxScalesUtils.js +8 -0
  125. package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts +9 -0
  126. package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
  127. package/dist/esm/lib/lynxSystem/registry/registryReading.js +38 -0
  128. package/dist/esm/lib/typechain/common.d.ts.map +1 -1
  129. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
  130. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
  131. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
  132. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
  133. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
  134. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
  135. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
  136. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
  137. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
  138. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
  139. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
  140. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
  141. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
  142. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
  143. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
  144. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
  145. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
  146. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
  147. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
  148. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
  149. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
  150. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
  151. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
  152. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
  153. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
  154. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  155. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
  156. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
  157. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
  158. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
  159. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
  160. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
  161. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
  162. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
  163. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
  164. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
  165. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
  166. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
  167. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
  168. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
  169. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
  170. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
  171. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
  172. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
  173. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
  174. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
  175. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
  176. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
  177. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
  178. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
  179. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  180. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  181. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  182. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  183. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  184. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  185. package/dist/esm/lib/utils/ethersTypes.d.ts +2 -2
  186. package/dist/esm/lib/utils/ethersTypes.d.ts.map +1 -1
  187. package/dist/esm/lib/utils/ethersTypes.js +29 -6
  188. package/dist/types/index.d.ts +6 -0
  189. package/dist/types/index.d.ts.map +1 -1
  190. package/dist/types/lib/constants/contractEnums.d.ts.map +1 -1
  191. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +14 -0
  192. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
  193. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
  194. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
  195. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
  196. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
  197. package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
  198. package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
  199. package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts +35 -0
  200. package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
  201. package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
  202. package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
  203. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +14 -0
  204. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
  205. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +19 -0
  206. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
  207. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
  208. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
  209. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
  210. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
  211. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
  212. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
  213. package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
  214. package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
  215. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +15 -0
  216. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
  217. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +19 -0
  218. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
  219. package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
  220. package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
  221. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
  222. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
  223. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
  224. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
  225. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +15 -0
  226. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
  227. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
  228. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
  229. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
  230. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
  231. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
  232. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
  233. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
  234. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
  235. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
  236. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  237. package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
  238. package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
  239. package/dist/types/lib/lynxSystem/registry/registryReading.d.ts +9 -0
  240. package/dist/types/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
  241. package/dist/types/lib/typechain/common.d.ts.map +1 -1
  242. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
  243. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
  244. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
  245. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
  246. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
  247. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
  248. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
  249. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
  250. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
  251. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
  252. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
  253. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
  254. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
  255. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
  256. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
  257. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
  258. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
  259. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  260. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
  261. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
  262. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
  263. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
  264. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
  265. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
  266. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
  267. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
  268. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
  269. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
  270. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
  271. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
  272. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
  273. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
  274. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
  275. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
  276. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  277. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  278. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  279. package/dist/types/lib/utils/ethersTypes.d.ts +2 -2
  280. package/dist/types/lib/utils/ethersTypes.d.ts.map +1 -1
  281. package/package.json +1 -1
package/dist/cjs/index.js CHANGED
@@ -26,6 +26,7 @@ __exportStar(require("./lib/utils/ethersTypes"), exports);
26
26
  __exportStar(require("./lib/lynxSystem/hashes"), exports);
27
27
  __exportStar(require("./lib/lynxSystem/lynxScalesUtils"), exports);
28
28
  __exportStar(require("./lib/utils/types"), exports);
29
+ __exportStar(require("./lib/lynxSystem/registry/registryReading"), exports);
29
30
  __exportStar(require("./lib/constants/contractEnums"), exports);
30
31
  __exportStar(require("./lib/constants/generalConstants"), exports);
31
32
  __exportStar(require("./lib/constants/scales"), exports);
@@ -37,6 +38,11 @@ __exportStar(require("./lib/priceFeeds/pyth/pythFeedFunctions"), exports);
37
38
  __exportStar(require("./lib/addresses/lensAddresses"), exports);
38
39
  __exportStar(require("./lib/addresses/systemAddresses"), exports);
39
40
  __exportStar(require("./lib/contractsIntegration/deployedContractsConnector"), exports);
41
+ __exportStar(require("./lib/contractsIntegration/TradersPortalService"), exports);
42
+ __exportStar(require("./lib/contractsIntegration/IntentsVerifierLensService"), exports);
43
+ __exportStar(require("./lib/contractsIntegration/TriggersAndPortalLensService"), exports);
44
+ __exportStar(require("./lib/contractsIntegration/TradingFloorLensService"), exports);
45
+ __exportStar(require("./lib/contractsIntegration/LexLensService"), exports);
40
46
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens"), exports);
41
47
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens"), exports);
42
48
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/LexLens"), exports);
@@ -31,6 +31,7 @@ exports.FeeTypeEnums = {
31
31
  CLOSE_FEE: 2,
32
32
  TRIGGER_FEE: 3,
33
33
  };
34
+ // TODO : Can probably delete this type and const (as we have TUpdatePositionFieldOrderType)
34
35
  exports.PositionFieldEnums = {
35
36
  NONE: 0n,
36
37
  TP: 1n,
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = exports.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = void 0;
4
+ exports.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = {
5
+ verifier: "",
6
+ account: "",
7
+ actionType: 0n,
8
+ currentNonce: 0n,
9
+ };
10
+ exports.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = {
11
+ verifier: "",
12
+ hash: "",
13
+ actionType: 0n,
14
+ currentNonce: 0n,
15
+ };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IntentsVerifierLensService = void 0;
4
+ const IntentsVerifierLens__factory_1 = require("../../typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory");
5
+ const ethersTypes_1 = require("../../utils/ethersTypes");
6
+ const IIntentsVerifierLensService_1 = require("./IIntentsVerifierLensService");
7
+ class IntentsVerifierLensService {
8
+ constructor(provider, address) {
9
+ this.contract = IntentsVerifierLens__factory_1.IntentsVerifierLens__factory.connect(address, provider);
10
+ }
11
+ async getRequestBuildingInfoForChipsIntentsVerifier(account, actionType) {
12
+ const result = await this.contract.getRequestBuildingInfoForChipsIntentsVerifier(account, BigInt(actionType));
13
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
14
+ }
15
+ async getRequestBuildingInfoForLiquidityIntentsVerifier(account, actionType) {
16
+ const result = await this.contract.getRequestBuildingInfoForLiquidityIntentsVerifier(account, BigInt(actionType));
17
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
18
+ }
19
+ async getRequestBuildingInfoForTradeIntentsVerifier(positionId, actionType) {
20
+ const result = await this.contract.getRequestBuildingInfoForTradeIntentsVerifier(positionId, BigInt(actionType));
21
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
22
+ }
23
+ async registry() {
24
+ return await this.contract.registry();
25
+ }
26
+ }
27
+ exports.IntentsVerifierLensService = IntentsVerifierLensService;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./IIntentsVerifierLensService"), exports);
18
+ __exportStar(require("./IntentsVerifierLensService"), exports);
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMPTY_SINGLE_POSITION_OUTPUT = exports.EMPTY_COMPLETE_LEX_CONFIGS = exports.EMPTY_COMPLETE_LEX_STATE = exports.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS = exports.EMPTY_POOL_ACCOUNTANT_STATE_LENS = exports.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE = exports.EMPTY_LEX_GROUP_STATE_LENS = exports.EMPTY_LEX_PAIR_STATE_LENS = exports.EMPTY_GROUP_CONFIGS_LENS = exports.EMPTY_FEE_CONFIGS_LENS = exports.EMPTY_PAIR_CONFIGS_LENS = exports.EMPTY_LEX_POOL_LENS_CONFIGS = exports.EMPTY_LEX_POOL_LENS_STATE = exports.EMPTY_LEX_POOL_LENS_PARAMS = exports.EMPTY_PENDING_EPOCH_REDEEM = exports.EMPTY_PENDING_EPOCH_DEPOSIT = void 0;
4
+ // Empty constants
5
+ exports.EMPTY_PENDING_EPOCH_DEPOSIT = {
6
+ account: "",
7
+ amount: 0n,
8
+ epochNumber: 0n,
9
+ minAmountOut: 0n,
10
+ };
11
+ exports.EMPTY_PENDING_EPOCH_REDEEM = {
12
+ account: "",
13
+ amount: 0n,
14
+ epochNumber: 0n,
15
+ maxAmountOut: 0n,
16
+ minAmountOut: 0n,
17
+ };
18
+ exports.EMPTY_LEX_POOL_LENS_PARAMS = {
19
+ lexToken: "",
20
+ name: "",
21
+ symbol: "",
22
+ underlying: "",
23
+ };
24
+ exports.EMPTY_LEX_POOL_LENS_STATE = {
25
+ currentVirtualUtilization: 0n,
26
+ nextEpochStartMin: 0n,
27
+ poolBalance: 0n,
28
+ totalPendingDeposits: 0n,
29
+ totalPendingWithdrawals: 0n,
30
+ totalSupply: 0n,
31
+ virtualBalanceForUtilization: 0n,
32
+ lexPool: "",
33
+ cash: 0n,
34
+ connectedToCenter: false,
35
+ currentEpochNumber: 0n,
36
+ currentExchangeRate: 0n,
37
+ };
38
+ exports.EMPTY_LEX_POOL_LENS_CONFIGS = {
39
+ lexPool: "",
40
+ epochLength: 0n,
41
+ minDepositAmount: 0n,
42
+ epochsDelayDeposit: 0n,
43
+ epochsDelayRedeem: 0n,
44
+ immediateDepositAllowed: false,
45
+ };
46
+ exports.EMPTY_PAIR_CONFIGS_LENS = {
47
+ feeId: 0,
48
+ groupId: 0,
49
+ maxBorrowF: 0n,
50
+ maxGain: 0n,
51
+ maxLeverage: 0n,
52
+ maxOpenInterest: 0n,
53
+ maxPositionSize: 0n,
54
+ maxSkew: 0n,
55
+ minLeverage: 0n,
56
+ pairId: 0,
57
+ minPerformanceFee: 0n,
58
+ minOpenFee: 0n,
59
+ };
60
+ exports.EMPTY_FEE_CONFIGS_LENS = {
61
+ feeId: 0,
62
+ openFeeF: 0,
63
+ closeFeeF: 0,
64
+ performanceFeeF: 0,
65
+ };
66
+ exports.EMPTY_GROUP_CONFIGS_LENS = {
67
+ groupId: 0,
68
+ maxBorrowF: 0,
69
+ maxLeverage: 0n,
70
+ maxPositionSize: 0n,
71
+ minLeverage: 0n,
72
+ };
73
+ exports.EMPTY_LEX_PAIR_STATE_LENS = {
74
+ fundingRate: 0n,
75
+ lexPool: "",
76
+ openInterestLong: 0n,
77
+ openInterestShort: 0n,
78
+ pairId: 0,
79
+ tradersPairGains: 0n,
80
+ pairBorrows: 0n,
81
+ };
82
+ exports.EMPTY_LEX_GROUP_STATE_LENS = {
83
+ lexPool: "",
84
+ groupId: 0,
85
+ groupBorrows: 0n,
86
+ };
87
+ exports.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE = {
88
+ allowanceForLexPool: 0n,
89
+ lexPool: "",
90
+ lxpBalance: 0n,
91
+ lxpBalanceInUnderlying: 0n,
92
+ pendingEpochDeposits: [],
93
+ pendingEpochRedeems: [],
94
+ supplier: "",
95
+ underlyingBalance: 0n,
96
+ };
97
+ exports.EMPTY_POOL_ACCOUNTANT_STATE_LENS = {
98
+ accountant: "",
99
+ borrowRatePerSecond: 0n,
100
+ interestShare: 0n,
101
+ matchingPool: "",
102
+ totalBorrows: 0n,
103
+ unrealizedFunding: 0n,
104
+ fundingShare: 0n,
105
+ };
106
+ exports.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS = {
107
+ accountant: "",
108
+ fundingRateModel: "",
109
+ interestRateModel: "",
110
+ interestShareFactor: 0n,
111
+ matchingPool: "",
112
+ minOpenFee: 0n,
113
+ lexPartF: 0n,
114
+ liquidationThresholdF: 0n,
115
+ liquidationFeeF: 0n,
116
+ supportedPairIds: [],
117
+ };
118
+ exports.EMPTY_COMPLETE_LEX_STATE = {
119
+ lexPoolState: exports.EMPTY_LEX_POOL_LENS_STATE,
120
+ poolAccountantState: exports.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
121
+ pairsStates: [],
122
+ groupsStates: [],
123
+ };
124
+ exports.EMPTY_COMPLETE_LEX_CONFIGS = {
125
+ lexPoolParams: exports.EMPTY_LEX_POOL_LENS_PARAMS,
126
+ lexPoolConfigurations: exports.EMPTY_LEX_POOL_LENS_CONFIGS,
127
+ poolAccountantConfigurations: exports.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS,
128
+ groupsConfigs: [],
129
+ pairsConfigs: [],
130
+ feesConfigs: [],
131
+ };
132
+ exports.EMPTY_SINGLE_POSITION_OUTPUT = {
133
+ totalValue: 0n,
134
+ safeClosingFee: 0n,
135
+ interest: 0n,
136
+ funding: 0n,
137
+ };
@@ -0,0 +1,270 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LexLensService = void 0;
4
+ const ethersTypes_1 = require("../../utils/ethersTypes");
5
+ const ILexLensService_1 = require("./ILexLensService");
6
+ class LexLensService {
7
+ constructor(contract) {
8
+ this.contract = contract;
9
+ }
10
+ async getAllFeeConfigurationsInLex(lexPool) {
11
+ const result = await this.contract.getAllFeeConfigurationsInLex(lexPool);
12
+ // First convert array, then handle special number conversions
13
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_FEE_CONFIGS_LENS);
14
+ return baseArray.map(item => ({
15
+ ...item,
16
+ feeId: Number(item.feeId),
17
+ openFeeF: Number(item.openFeeF),
18
+ closeFeeF: Number(item.closeFeeF),
19
+ performanceFeeF: Number(item.performanceFeeF),
20
+ }));
21
+ }
22
+ async getAllGroupConfigurationsInLex(lexPool) {
23
+ const result = await this.contract.getAllGroupConfigurationsInLex(lexPool);
24
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS);
25
+ return baseArray.map(item => ({
26
+ ...item,
27
+ groupId: Number(item.groupId),
28
+ maxBorrowF: Number(item.maxBorrowF),
29
+ }));
30
+ }
31
+ async getAllGroupStateInLex(lexPool) {
32
+ const result = await this.contract.getAllGroupStateInLex(lexPool);
33
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS);
34
+ return baseArray.map(item => ({
35
+ ...item,
36
+ groupId: Number(item.groupId),
37
+ }));
38
+ }
39
+ async getAllPairAndGroupAndFeeConfigurationsInLex(lexPool) {
40
+ return await this.contract.getAllPairAndGroupAndFeeConfigurationsInLex(lexPool);
41
+ }
42
+ async getAllPairConfigurationsInLex(lexPool) {
43
+ const result = await this.contract.getAllPairConfigurationsInLex(lexPool);
44
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS);
45
+ return baseArray.map(item => ({
46
+ ...item,
47
+ pairId: Number(item.pairId),
48
+ groupId: Number(item.groupId),
49
+ feeId: Number(item.feeId),
50
+ }));
51
+ }
52
+ async getAllPairStateInLex(lexPool) {
53
+ const result = await this.contract.getAllPairStateInLex(lexPool);
54
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS);
55
+ return baseArray.map(item => ({
56
+ ...item,
57
+ pairId: Number(item.pairId),
58
+ }));
59
+ }
60
+ async getCompleteConfigsForLex(pool) {
61
+ const result = await this.contract.getCompleteConfigsForLex(pool);
62
+ const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_CONFIGS, {
63
+ groupsConfigs: ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS,
64
+ pairsConfigs: ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS,
65
+ feesConfigs: ILexLensService_1.EMPTY_FEE_CONFIGS_LENS,
66
+ }, {
67
+ lexPoolParams: ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS,
68
+ lexPoolConfigurations: ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS,
69
+ poolAccountantConfigurations: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS,
70
+ });
71
+ // Apply number conversions
72
+ return {
73
+ ...baseResult,
74
+ groupsConfigs: baseResult.groupsConfigs.map(item => ({
75
+ ...item,
76
+ groupId: Number(item.groupId),
77
+ maxBorrowF: Number(item.maxBorrowF),
78
+ })),
79
+ pairsConfigs: baseResult.pairsConfigs.map(item => ({
80
+ ...item,
81
+ pairId: Number(item.pairId),
82
+ groupId: Number(item.groupId),
83
+ feeId: Number(item.feeId),
84
+ })),
85
+ feesConfigs: baseResult.feesConfigs.map(item => ({
86
+ ...item,
87
+ feeId: Number(item.feeId),
88
+ openFeeF: Number(item.openFeeF),
89
+ closeFeeF: Number(item.closeFeeF),
90
+ performanceFeeF: Number(item.performanceFeeF),
91
+ })),
92
+ };
93
+ }
94
+ async getCompleteConfigsForLexes(pools) {
95
+ const results = await this.contract.getCompleteConfigsForLexes(pools);
96
+ return results.map(result => this.convertCompleteConfigsResult(result));
97
+ }
98
+ async getCompleteStateForLex(pool) {
99
+ const result = await this.contract.getCompleteStateForLex(pool);
100
+ const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_STATE, {
101
+ pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
102
+ groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
103
+ }, {
104
+ lexPoolState: ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
105
+ poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
106
+ });
107
+ // Apply number conversions
108
+ return {
109
+ ...baseResult,
110
+ pairsStates: baseResult.pairsStates.map(item => ({
111
+ ...item,
112
+ pairId: Number(item.pairId),
113
+ })),
114
+ groupsStates: baseResult.groupsStates.map(item => ({
115
+ ...item,
116
+ groupId: Number(item.groupId),
117
+ })),
118
+ };
119
+ }
120
+ async getCompleteStateForLexes(pools) {
121
+ const results = await this.contract.getCompleteStateForLexes(pools);
122
+ return results.map(result => {
123
+ const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_STATE, {
124
+ pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
125
+ groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
126
+ }, {
127
+ lexPoolState: ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
128
+ poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
129
+ });
130
+ // Apply number conversions
131
+ return {
132
+ ...baseResult,
133
+ pairsStates: baseResult.pairsStates.map(item => ({
134
+ ...item,
135
+ pairId: Number(item.pairId),
136
+ })),
137
+ groupsStates: baseResult.groupsStates.map(item => ({
138
+ ...item,
139
+ groupId: Number(item.groupId),
140
+ })),
141
+ };
142
+ });
143
+ }
144
+ async getLExPoolForPoolAccountant(accountant) {
145
+ return await this.contract.getLExPoolForPoolAccountant(accountant);
146
+ }
147
+ async getLexPairState(lexPool, pairId) {
148
+ const result = await this.contract.getLexPairState(lexPool, BigInt(pairId));
149
+ const baseObj = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS);
150
+ return {
151
+ ...baseObj,
152
+ pairId: Number(baseObj.pairId),
153
+ };
154
+ }
155
+ async getLexPoolConfigs(lexPool) {
156
+ const result = await this.contract.getLexPoolConfigs(lexPool);
157
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS);
158
+ }
159
+ async getLexPoolParams(lexPool) {
160
+ const result = await this.contract.getLexPoolParams(lexPool);
161
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS);
162
+ }
163
+ async getLexPoolState(lexPool) {
164
+ const result = await this.contract.getLexPoolState(lexPool);
165
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE);
166
+ }
167
+ async getLexPoolSupplierState(lexPool, supplier) {
168
+ const result = await this.contract.getLexPoolSupplierState(lexPool, supplier);
169
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE, {
170
+ pendingEpochDeposits: ILexLensService_1.EMPTY_PENDING_EPOCH_DEPOSIT,
171
+ pendingEpochRedeems: ILexLensService_1.EMPTY_PENDING_EPOCH_REDEEM,
172
+ });
173
+ }
174
+ async getLexPoolsStateAll(lexPools) {
175
+ const results = await this.contract.getLexPoolsStateAll(lexPools);
176
+ return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE);
177
+ }
178
+ async getPoolAccountantConfigurationsByPool(lexPool) {
179
+ const result = await this.contract.getPoolAccountantConfigurationsByPool(lexPool);
180
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS);
181
+ }
182
+ async getPoolAccountantConfigurationsByPoolAll(lexPools) {
183
+ const results = await this.contract.getPoolAccountantConfigurationsByPoolAll(lexPools);
184
+ return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS);
185
+ }
186
+ async getPoolAccountantForLexPool(lexPool) {
187
+ return await this.contract.getPoolAccountantForLexPool(lexPool);
188
+ }
189
+ async getPoolAccountantStateByPool(lexPool) {
190
+ const result = await this.contract.getPoolAccountantStateByPool(lexPool);
191
+ return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS);
192
+ }
193
+ async getPoolAccountantStateByPoolAll(lexPools) {
194
+ const results = await this.contract.getPoolAccountantStateByPoolAll(lexPools);
195
+ return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS);
196
+ }
197
+ async getSupplierCurrentStateAll(lexPools, supplier) {
198
+ const results = await this.contract.getSupplierCurrentStateAll(lexPools, supplier);
199
+ return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE, {
200
+ pendingEpochDeposits: ILexLensService_1.EMPTY_PENDING_EPOCH_DEPOSIT,
201
+ pendingEpochRedeems: ILexLensService_1.EMPTY_PENDING_EPOCH_REDEEM,
202
+ });
203
+ }
204
+ async tradesValuesMultiplePairs(accountant, pairsTrades) {
205
+ // @ts-ignore
206
+ const results = await this.contract.tradesValuesMultiplePairs.staticCall(accountant, pairsTrades);
207
+ return results.map(pairResults => (0, ethersTypes_1.ethersStructResponseToArray)(pairResults, ILexLensService_1.EMPTY_SINGLE_POSITION_OUTPUT));
208
+ }
209
+ async tradesValuesSinglePair(accountant, pairParams) {
210
+ // @ts-ignore
211
+ const results = await this.contract.tradesValuesSinglePair.staticCall(accountant, pairParams);
212
+ return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_SINGLE_POSITION_OUTPUT);
213
+ }
214
+ // Helper methods
215
+ convertCompleteConfigsResult(result) {
216
+ const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_CONFIGS, {
217
+ groupsConfigs: ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS,
218
+ pairsConfigs: ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS,
219
+ feesConfigs: ILexLensService_1.EMPTY_FEE_CONFIGS_LENS,
220
+ }, {
221
+ lexPoolParams: ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS,
222
+ lexPoolConfigurations: ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS,
223
+ poolAccountantConfigurations: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS,
224
+ });
225
+ // Apply number conversions
226
+ return {
227
+ ...baseResult,
228
+ groupsConfigs: baseResult.groupsConfigs.map(item => ({
229
+ ...item,
230
+ groupId: Number(item.groupId),
231
+ maxBorrowF: Number(item.maxBorrowF),
232
+ })),
233
+ pairsConfigs: baseResult.pairsConfigs.map(item => ({
234
+ ...item,
235
+ pairId: Number(item.pairId),
236
+ groupId: Number(item.groupId),
237
+ feeId: Number(item.feeId),
238
+ })),
239
+ feesConfigs: baseResult.feesConfigs.map(item => ({
240
+ ...item,
241
+ feeId: Number(item.feeId),
242
+ openFeeF: Number(item.openFeeF),
243
+ closeFeeF: Number(item.closeFeeF),
244
+ performanceFeeF: Number(item.performanceFeeF),
245
+ })),
246
+ };
247
+ }
248
+ convertCompleteStateResult(result) {
249
+ const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_STATE, {
250
+ pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
251
+ groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
252
+ }, {
253
+ lexPoolState: ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
254
+ poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
255
+ });
256
+ // Apply number conversions
257
+ return {
258
+ ...baseResult,
259
+ pairsStates: baseResult.pairsStates.map(item => ({
260
+ ...item,
261
+ pairId: Number(item.pairId),
262
+ })),
263
+ groupsStates: baseResult.groupsStates.map(item => ({
264
+ ...item,
265
+ groupId: Number(item.groupId),
266
+ })),
267
+ };
268
+ }
269
+ }
270
+ exports.LexLensService = LexLensService;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ILexLensService"), exports);
18
+ __exportStar(require("./LexLensService"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderBookService = void 0;
4
+ const OrderBookV1__factory_1 = require("../../typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory");
5
+ class OrderBookService {
6
+ constructor(address, signerOrProvider) {
7
+ this.signerOrProvider = signerOrProvider;
8
+ this.orderBookContract = OrderBookV1__factory_1.OrderBookV1__factory.connect(address, signerOrProvider);
9
+ }
10
+ // Order Management
11
+ async getAllPendingUpdateOrderIds() {
12
+ return this.orderBookContract.getAllPendingUpdateOrderIds();
13
+ }
14
+ // Contract References
15
+ async registry() {
16
+ return this.orderBookContract.registry();
17
+ }
18
+ async tradingFloor() {
19
+ return this.orderBookContract.tradingFloor();
20
+ }
21
+ async admin() {
22
+ return this.orderBookContract.admin();
23
+ }
24
+ async pendingAdmin() {
25
+ return this.orderBookContract.pendingAdmin();
26
+ }
27
+ async implementation() {
28
+ return this.orderBookContract.implementation();
29
+ }
30
+ async pendingImplementation() {
31
+ return this.orderBookContract.pendingImplementation();
32
+ }
33
+ // Constants
34
+ async ACCURACY_IMPROVEMENT_SCALE() {
35
+ return this.orderBookContract.ACCURACY_IMPROVEMENT_SCALE();
36
+ }
37
+ async FRACTION_SCALE() {
38
+ return this.orderBookContract.FRACTION_SCALE();
39
+ }
40
+ async LEVERAGE_SCALE() {
41
+ return this.orderBookContract.LEVERAGE_SCALE();
42
+ }
43
+ async PRECISION() {
44
+ return this.orderBookContract.PRECISION();
45
+ }
46
+ }
47
+ exports.OrderBookService = OrderBookService;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });