lynx-client 0.0.1-beta.9 → 0.0.3

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 (372) hide show
  1. package/README.md +391 -3
  2. package/dist/cjs/index.js +9 -0
  3. package/dist/cjs/lib/addresses/lensAddresses.js +16 -16
  4. package/dist/cjs/lib/chains/chainMappings.js +17 -0
  5. package/dist/cjs/lib/constants/contractEnums.js +1 -0
  6. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +2 -0
  7. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +22 -0
  8. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
  9. package/dist/cjs/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
  10. package/dist/cjs/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
  11. package/dist/cjs/lib/contractsIntegration/LexLensService/index.js +18 -0
  12. package/dist/cjs/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
  13. package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
  14. package/dist/cjs/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
  15. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
  16. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +63 -0
  17. package/dist/cjs/lib/contractsIntegration/TradersPortalService/index.js +19 -0
  18. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +57 -0
  19. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +111 -0
  20. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
  21. package/dist/cjs/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
  22. package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +177 -0
  23. package/dist/cjs/lib/contractsIntegration/TradingFloorService/index.js +5 -0
  24. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
  25. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
  26. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
  27. package/dist/cjs/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
  28. package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
  29. package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +119 -8
  30. package/dist/cjs/lib/devex/getChainAddresses.js +65 -0
  31. package/dist/cjs/lib/devex/getSupportedEngineChains.js +45 -0
  32. package/dist/cjs/lib/devex/index.js +9 -0
  33. package/dist/cjs/lib/devex/types.js +2 -0
  34. package/dist/cjs/lib/lynxSystem/hashes.js +9 -0
  35. package/dist/cjs/lib/lynxSystem/lynxScalesUtils.js +8 -0
  36. package/dist/cjs/lib/lynxSystem/registry/registryReading.js +38 -0
  37. package/dist/cjs/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
  38. package/dist/cjs/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
  39. package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
  40. package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
  41. package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
  42. package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
  43. package/dist/cjs/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
  44. package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
  45. package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
  46. package/dist/cjs/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
  47. package/dist/cjs/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
  48. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
  49. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
  50. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
  51. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
  52. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
  53. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1038 -0
  54. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
  55. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1991 -0
  56. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
  57. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
  58. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  59. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
  60. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  61. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
  62. package/dist/cjs/lib/utils/ethersTypes.js +29 -6
  63. package/dist/esm/index.d.ts +8 -0
  64. package/dist/esm/index.d.ts.map +1 -1
  65. package/dist/esm/index.js +9 -0
  66. package/dist/esm/lib/addresses/lensAddresses.d.ts +16 -16
  67. package/dist/esm/lib/addresses/lensAddresses.js +16 -16
  68. package/dist/esm/lib/chains/chainMappings.d.ts +13 -0
  69. package/dist/esm/lib/chains/chainMappings.d.ts.map +1 -0
  70. package/dist/esm/lib/chains/chainMappings.js +17 -0
  71. package/dist/esm/lib/chains/chainTypes.d.ts +3 -0
  72. package/dist/esm/lib/chains/chainTypes.d.ts.map +1 -1
  73. package/dist/esm/lib/constants/contractEnums.d.ts.map +1 -1
  74. package/dist/esm/lib/constants/contractEnums.js +1 -0
  75. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +7 -0
  76. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
  77. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +2 -0
  78. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
  79. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
  80. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +22 -0
  81. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
  82. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
  83. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
  84. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
  85. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
  86. package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
  87. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
  88. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
  89. package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
  90. package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
  91. package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
  92. package/dist/esm/lib/contractsIntegration/LexLensService/index.js +18 -0
  93. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
  94. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
  95. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
  96. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
  97. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
  98. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
  99. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
  100. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
  101. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
  102. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
  103. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
  104. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
  105. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +31 -0
  106. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
  107. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +63 -0
  108. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
  109. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
  110. package/dist/esm/lib/contractsIntegration/TradersPortalService/index.js +19 -0
  111. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +65 -0
  112. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
  113. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +57 -0
  114. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +13 -0
  115. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
  116. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +111 -0
  117. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
  118. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
  119. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
  120. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +89 -0
  121. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
  122. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
  123. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +86 -0
  124. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
  125. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +177 -0
  126. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
  127. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
  128. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.js +5 -0
  129. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
  130. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
  131. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
  132. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
  133. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
  134. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
  135. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
  136. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
  137. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
  138. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
  139. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
  140. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
  141. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
  142. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
  143. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
  144. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
  145. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  146. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +119 -8
  147. package/dist/esm/lib/devex/getChainAddresses.d.ts +20 -0
  148. package/dist/esm/lib/devex/getChainAddresses.d.ts.map +1 -0
  149. package/dist/esm/lib/devex/getChainAddresses.js +65 -0
  150. package/dist/esm/lib/devex/getSupportedEngineChains.d.ts +37 -0
  151. package/dist/esm/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
  152. package/dist/esm/lib/devex/getSupportedEngineChains.js +45 -0
  153. package/dist/esm/lib/devex/index.d.ts +5 -0
  154. package/dist/esm/lib/devex/index.d.ts.map +1 -0
  155. package/dist/esm/lib/devex/index.js +9 -0
  156. package/dist/esm/lib/devex/types.d.ts +20 -0
  157. package/dist/esm/lib/devex/types.d.ts.map +1 -0
  158. package/dist/esm/lib/devex/types.js +2 -0
  159. package/dist/esm/lib/lynxSystem/hashes.d.ts +6 -0
  160. package/dist/esm/lib/lynxSystem/hashes.d.ts.map +1 -1
  161. package/dist/esm/lib/lynxSystem/hashes.js +9 -0
  162. package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
  163. package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
  164. package/dist/esm/lib/lynxSystem/lynxScalesUtils.js +8 -0
  165. package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts +9 -0
  166. package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
  167. package/dist/esm/lib/lynxSystem/registry/registryReading.js +38 -0
  168. package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
  169. package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
  170. package/dist/esm/lib/typechain/common.d.ts.map +1 -1
  171. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
  172. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
  173. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
  174. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
  175. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
  176. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
  177. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
  178. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
  179. package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
  180. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
  181. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
  182. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
  183. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
  184. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
  185. package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
  186. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +607 -0
  187. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
  188. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
  189. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
  190. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
  191. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
  192. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1251 -0
  193. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
  194. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
  195. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
  196. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
  197. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
  198. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
  199. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
  200. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -114
  201. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  202. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
  203. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
  204. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
  205. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
  206. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
  207. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
  208. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
  209. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
  210. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
  211. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
  212. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
  213. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
  214. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
  215. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
  216. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
  217. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
  218. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
  219. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
  220. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +800 -0
  221. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
  222. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1038 -0
  223. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
  224. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
  225. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
  226. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1536 -0
  227. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
  228. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1991 -0
  229. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
  230. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
  231. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
  232. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
  233. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
  234. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
  235. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  236. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  237. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
  238. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  239. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
  240. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  241. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  242. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
  243. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
  244. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
  245. package/dist/esm/lib/utils/ethersTypes.d.ts +2 -2
  246. package/dist/esm/lib/utils/ethersTypes.d.ts.map +1 -1
  247. package/dist/esm/lib/utils/ethersTypes.js +29 -6
  248. package/dist/types/index.d.ts +8 -0
  249. package/dist/types/index.d.ts.map +1 -1
  250. package/dist/types/lib/addresses/lensAddresses.d.ts +16 -16
  251. package/dist/types/lib/chains/chainMappings.d.ts +13 -0
  252. package/dist/types/lib/chains/chainMappings.d.ts.map +1 -0
  253. package/dist/types/lib/chains/chainTypes.d.ts +3 -0
  254. package/dist/types/lib/chains/chainTypes.d.ts.map +1 -1
  255. package/dist/types/lib/constants/contractEnums.d.ts.map +1 -1
  256. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +7 -0
  257. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
  258. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
  259. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
  260. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
  261. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
  262. package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
  263. package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
  264. package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
  265. package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
  266. package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
  267. package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
  268. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
  269. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
  270. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
  271. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
  272. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
  273. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
  274. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
  275. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
  276. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +31 -0
  277. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
  278. package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
  279. package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
  280. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +65 -0
  281. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
  282. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +13 -0
  283. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
  284. package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
  285. package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
  286. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +89 -0
  287. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
  288. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +86 -0
  289. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
  290. package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
  291. package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
  292. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
  293. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
  294. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
  295. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
  296. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
  297. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
  298. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
  299. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
  300. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
  301. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
  302. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
  303. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  304. package/dist/types/lib/devex/getChainAddresses.d.ts +20 -0
  305. package/dist/types/lib/devex/getChainAddresses.d.ts.map +1 -0
  306. package/dist/types/lib/devex/getSupportedEngineChains.d.ts +37 -0
  307. package/dist/types/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
  308. package/dist/types/lib/devex/index.d.ts +5 -0
  309. package/dist/types/lib/devex/index.d.ts.map +1 -0
  310. package/dist/types/lib/devex/types.d.ts +20 -0
  311. package/dist/types/lib/devex/types.d.ts.map +1 -0
  312. package/dist/types/lib/lynxSystem/hashes.d.ts +6 -0
  313. package/dist/types/lib/lynxSystem/hashes.d.ts.map +1 -1
  314. package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
  315. package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
  316. package/dist/types/lib/lynxSystem/registry/registryReading.d.ts +9 -0
  317. package/dist/types/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
  318. package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
  319. package/dist/types/lib/typechain/common.d.ts.map +1 -1
  320. package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
  321. package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
  322. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
  323. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
  324. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
  325. package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
  326. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
  327. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
  328. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
  329. package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
  330. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +607 -0
  331. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
  332. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
  333. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
  334. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1251 -0
  335. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
  336. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
  337. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
  338. package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
  339. package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
  340. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -114
  341. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  342. package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
  343. package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
  344. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
  345. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
  346. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
  347. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
  348. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
  349. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
  350. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
  351. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
  352. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
  353. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
  354. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +800 -0
  355. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
  356. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
  357. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
  358. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1536 -0
  359. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
  360. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
  361. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
  362. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
  363. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
  364. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  365. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
  366. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  367. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  368. package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
  369. package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
  370. package/dist/types/lib/utils/ethersTypes.d.ts +2 -2
  371. package/dist/types/lib/utils/ethersTypes.d.ts.map +1 -1
  372. package/package.json +7 -7
package/README.md CHANGED
@@ -1,4 +1,392 @@
1
- # Lynx Client
1
+ # Lynx Client SDK
2
2
 
3
- This project introduces a client to interact with Lynx.
4
- It has script examples and api calls to the app, and common logic used by other Lynx repositories.
3
+ A TypeScript SDK for interacting with the Lynx trading protocol across multiple EVM-compatible blockchains.
4
+
5
+ ## Features
6
+
7
+ - 🔒 Type-safe interfaces for all Lynx smart contracts
8
+ - 🌐 Multi-chain support (16+ EVM chains)
9
+ - 📊 Built-in utilities for price, leverage, and fraction conversions
10
+ - 🏗️ Support for both CommonJS and ESM module systems
11
+ - 🔍 Read-only lens contracts for efficient data aggregation
12
+ - 💼 Complete trading lifecycle management
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npm install lynx-client
18
+ ```
19
+
20
+ ```bash
21
+ yarn add lynx-client
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ ```typescript
27
+ import {
28
+ connectToLatestRegistry,
29
+ LynxSystemAddresses,
30
+ createTradersPortalService,
31
+ buildPositionRequestIdentifier,
32
+ buildPositionRequestParams
33
+ } from 'lynx-client';
34
+ import { ethers } from 'ethers';
35
+
36
+ // Initialize provider
37
+ const provider = new ethers.JsonRpcProvider('YOUR_RPC_URL');
38
+ const signer = await provider.getSigner();
39
+
40
+ // Get chain-specific addresses
41
+ const addresses = LynxSystemAddresses.arbitrum; // or .sonic, .base, etc.
42
+
43
+ // Connect to contracts
44
+ const registry = connectToLatestRegistry(provider, addresses.registryProxyAddress);
45
+
46
+ // Create a service for trader operations
47
+ const tradersPortal = createTradersPortalService(signer, addresses.tradersPortalAddress);
48
+ ```
49
+
50
+ ## Core Concepts
51
+
52
+ ### Supported Chains
53
+
54
+ #### Engine Chains
55
+ The Lynx protocol is deployed on the following chains:
56
+
57
+ - **Sonic** (146)
58
+ - **Boba** (288)
59
+ - **Flare** (14)
60
+ - **Fantom** (250)
61
+
62
+ #### Source Chains
63
+ Assets can be bridged from these additional chains:
64
+
65
+ - Ethereum Mainnet (1)
66
+ - Optimism (10)
67
+ - BSC (56)
68
+ - Polygon (137)
69
+ - Fuse (122)
70
+ - Goat (2345)
71
+ - Mantle (5000)
72
+ - Base (8453)
73
+ - Mode (34443)
74
+ - Arbitrum (42161)
75
+ - Celo (42220)
76
+ - Linea (59144)
77
+ - Zircuit (48900)
78
+
79
+ ```typescript
80
+ import { LynxSystemAddresses, TSupportedChainIds } from 'lynx-client';
81
+
82
+ // Get addresses for a specific chain
83
+ const sonicAddresses = LynxSystemAddresses.sonic;
84
+ const arbitrumAddresses = LynxSystemAddresses.arbitrum;
85
+ ```
86
+
87
+ ### Contract Services
88
+
89
+ The SDK provides service wrappers for all Lynx contracts:
90
+
91
+ #### Trading Operations
92
+
93
+ ```typescript
94
+ import {
95
+ createTradersPortalService,
96
+ buildPositionRequestIdentifier,
97
+ buildPositionRequestParams,
98
+ TOpenOrderType
99
+ } from 'lynx-client';
100
+
101
+ const tradersPortal = createTradersPortalService(signer, tradersPortalAddress);
102
+
103
+ // Build position parameters using human-readable values
104
+ const identifier = buildPositionRequestIdentifier({
105
+ trader: await signer.getAddress(),
106
+ pairId: 1, // BTC/USD
107
+ settlementAsset: "0x...", // USDC address
108
+ });
109
+
110
+ const params = buildPositionRequestParams({
111
+ isLong: true,
112
+ collateral: 100, // 100 USDC
113
+ leverage: 25, // 25x leverage
114
+ minPrice: 50000, // $50,000
115
+ maxPrice: 50100, // $50,100
116
+ takeProfit: 55000, // $55,000
117
+ stopLoss: 48000 // $48,000
118
+ });
119
+
120
+ // Open a position
121
+ await tradersPortal.traderRequests.openNewPosition(
122
+ identifier,
123
+ params,
124
+ TOpenOrderType.MARKET,
125
+ "0x", // referrer domain
126
+ "0x", // referrer code
127
+ true, // run cap tests
128
+ ethers.parseEther("0.01") // native fee
129
+ );
130
+ ```
131
+
132
+ #### Lens Services (Read-Only Data)
133
+
134
+ ```typescript
135
+ import { createLexLensService, createTradingFloorLensService } from 'lynx-client';
136
+
137
+ // LEX Pool data (accepts both provider and signer)
138
+ const lexLens = createLexLensService(signerOrProvider, lexLensAddress);
139
+ const poolState = await lexLens.getLexPoolState(lexPoolAddress);
140
+ const pairConfigs = await lexLens.getAllPairConfigurationsInLex(lexPoolAddress);
141
+
142
+ // Trading floor data (accepts both provider and signer)
143
+ const tradingFloorLens = createTradingFloorLensService(signerOrProvider, tradingFloorLensAddress);
144
+ const position = await tradingFloorLens.getCompletePositionData(tradingFloorAddress, positionId);
145
+ ```
146
+
147
+ ### Utility Functions
148
+
149
+ #### Price Conversions
150
+
151
+ ```typescript
152
+ import { floatToPriceBn, priceBnToFloat } from 'lynx-client';
153
+
154
+ // Convert human-readable price to contract format (8 decimals)
155
+ const priceBn = floatToPriceBn(50000.50); // $50,000.50 → BigInt
156
+
157
+ // Convert contract price to human-readable
158
+ const price = priceBnToFloat(priceBn); // BigInt → 50000.50
159
+ ```
160
+
161
+ #### Leverage Conversions
162
+
163
+ ```typescript
164
+ import { floatUnitsToScaledLeverage, scaledLeverageToUnits } from 'lynx-client';
165
+
166
+ // Convert human leverage to contract format
167
+ const scaledLeverage = floatUnitsToScaledLeverage(25); // 25x → 2500
168
+
169
+ // Convert contract leverage to human-readable
170
+ const leverage = scaledLeverageToUnits(2500); // 2500 → 25x
171
+ ```
172
+
173
+ #### Collateral Conversions
174
+
175
+ ```typescript
176
+ import { floatToChipsBn, chipsBnToUnits } from 'lynx-client';
177
+
178
+ // Convert human-readable amount to contract format (18 decimals)
179
+ const collateralBn = floatToChipsBn(100.5); // 100.5 tokens → BigInt
180
+
181
+ // Convert contract amount to human-readable
182
+ const collateral = chipsBnToUnits(collateralBn); // BigInt → 100.5
183
+ ```
184
+
185
+ #### Fraction Conversions
186
+
187
+ ```typescript
188
+ import { floatToFractionBn, fractionBnToFloat } from 'lynx-client';
189
+
190
+ // Convert percentage to contract format
191
+ const fractionBn = floatToFractionBn(0.05); // 5% → 5000
192
+
193
+ // Convert contract fraction to percentage
194
+ const fraction = fractionBnToFloat(5000n); // 5000 → 0.05 (5%)
195
+ ```
196
+
197
+ ## Advanced Usage
198
+
199
+ ### Position Management
200
+
201
+ ```typescript
202
+ // Update position with new TP/SL
203
+ await tradersPortal.traderRequests.updatePositionDoubleFieldTpAndSl(
204
+ positionId,
205
+ floatToPriceBn(55000), // New TP: $55,000
206
+ floatToPriceBn(48000), // New SL: $48,000
207
+ ethers.parseEther("0.01") // Fee
208
+ );
209
+
210
+ // Close position at market
211
+ await tradersPortal.traderRequests.setExistingPositionToMarketClose(
212
+ positionId,
213
+ floatToPriceBn(49900), // Min acceptable price
214
+ floatToPriceBn(50100), // Max acceptable price
215
+ ethers.parseEther("0.01") // Fee
216
+ );
217
+ ```
218
+
219
+ ### Working with Triggers
220
+
221
+ ```typescript
222
+ import { createTriggersService } from 'lynx-client';
223
+
224
+ const triggers = createTriggersService(signer, triggersAddress);
225
+
226
+ // Get trigger configurations
227
+ const configs = await triggers.getTriggersConfigurations();
228
+ const pairConfigs = await triggers.getPairConfigsInTriggers(1); // Pair ID 1
229
+ ```
230
+
231
+ ### LEX Pool Operations
232
+
233
+ ```typescript
234
+ // Get complete LEX pool state
235
+ const completeState = await lexLens.getCompleteStateForLex(lexPoolAddress);
236
+
237
+ // Get supplier state
238
+ const supplierState = await lexLens.getLexPoolSupplierState(
239
+ lexPoolAddress,
240
+ supplierAddress
241
+ );
242
+
243
+ // Get all fee configurations
244
+ const feeConfigs = await lexLens.getAllFeeConfigurationsInLex(lexPoolAddress);
245
+ ```
246
+
247
+ ## Type Safety
248
+
249
+ The SDK provides comprehensive TypeScript types for all contract interactions:
250
+
251
+ ```typescript
252
+ import {
253
+ TPositionRequestIdentifierStruct,
254
+ TPositionRequestParamsStruct,
255
+ TSinglePositionStruct,
256
+ TPairConfigsInTriggersStruct
257
+ } from 'lynx-client';
258
+
259
+ // All contract structs are properly typed
260
+ const position = await tradingFloorLens.getCompletePositionData(tradingFloorAddress, id);
261
+ console.log(position.trader); // string
262
+ console.log(position.collateral); // bigint
263
+ console.log(position.leverage); // bigint
264
+ ```
265
+
266
+ ## Error Handling
267
+
268
+ The SDK validates inputs to prevent common errors:
269
+
270
+ ```typescript
271
+ try {
272
+ // This will throw an error - can't use both price and fraction TP
273
+ const params = buildPositionRequestParams({
274
+ isLong: true,
275
+ collateral: 100,
276
+ leverage: 25,
277
+ minPrice: 50000,
278
+ maxPrice: 50100,
279
+ takeProfit: 55000, // Price-based TP
280
+ takeProfitByFraction: 0.1 // Fraction-based TP - ERROR!
281
+ });
282
+ } catch (error) {
283
+ console.error("Cannot specify both takeProfit and takeProfitByFraction");
284
+ }
285
+ ```
286
+
287
+ ## Type Safety
288
+
289
+ The SDK provides strong type safety with clear distinctions between different numeric types:
290
+
291
+ ### Return Type Conventions
292
+ - **`bigint`**: Used for asset amounts, collateral, and values requiring high precision
293
+ - **`number`**: Used for IDs, timestamps, prices, leverage, and human-readable values
294
+ - **`string`**: Used for addresses and text values
295
+ - **`boolean`**: Used for flags and states
296
+
297
+ ### Lens Service Types
298
+ All Lens services return properly typed data structures:
299
+
300
+ ```typescript
301
+ // Example: TradingFloorLens returns typed position data
302
+ const position = await lensService.getCompletePositionData(tradingFloor, positionId);
303
+ // position.pairId: number (not bigint)
304
+ // position.collateral: bigint (asset amount)
305
+ // position.leverage: number (human-readable)
306
+ // position.openPrice: number (human-readable price)
307
+ ```
308
+
309
+ ## Constants and Enums
310
+
311
+ ```typescript
312
+ import {
313
+ TOpenOrderType,
314
+ TOrderCloseType,
315
+ TPositionField,
316
+ TPairIds,
317
+ CHIP_DECIMALS,
318
+ PRICES_SCALE,
319
+ LEVERAGE_MULTIPLIER_SCALE
320
+ } from 'lynx-client';
321
+
322
+ // Order types
323
+ const marketOrder = TOpenOrderType.MARKET;
324
+ const limitOrder = TOpenOrderType.LIMIT;
325
+
326
+ // Pair IDs
327
+ const btcUsd = TPairIds.BTC_USD;
328
+ const ethUsd = TPairIds.ETH_USD;
329
+ ```
330
+
331
+ ## Best Practices
332
+
333
+ 1. **Always use builder functions** for creating position requests:
334
+ ```typescript
335
+ // ✅ Good
336
+ const params = buildPositionRequestParams({ ... });
337
+
338
+ // ❌ Avoid manual construction
339
+ const params = { long: true, collateral: 100n, ... };
340
+ ```
341
+
342
+ 2. **Use utility functions** for conversions:
343
+ ```typescript
344
+ // ✅ Good
345
+ const priceBn = floatToPriceBn(50000);
346
+
347
+ // ❌ Avoid manual calculations
348
+ const priceBn = BigInt(50000 * 10**8);
349
+ ```
350
+
351
+ 3. **Handle contract errors** appropriately:
352
+ ```typescript
353
+ try {
354
+ await tradersPortal.traderRequests.openNewPosition(...);
355
+ } catch (error) {
356
+ if (error.reason === "Insufficient collateral") {
357
+ // Handle specific error
358
+ }
359
+ }
360
+ ```
361
+
362
+ ## Development
363
+
364
+ ### Building
365
+
366
+ ```bash
367
+ npm run build
368
+ ```
369
+
370
+ ### Testing
371
+
372
+ ```bash
373
+ npm test
374
+ ```
375
+
376
+ ### Contributing
377
+
378
+ 1. Fork the repository
379
+ 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
380
+ 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
381
+ 4. Push to the branch (`git push origin feature/amazing-feature`)
382
+ 5. Open a Pull Request
383
+
384
+ ## License
385
+
386
+ ISC
387
+
388
+ ## Support
389
+
390
+ - [GitHub Issues](https://github.com/lynx-protocol/lynx-client/issues)
391
+ - [Documentation](https://lynx-finance.gitbook.io/lynx-finance/)
392
+ - [Discord](https://discord.gg/4CGxEYwrF2)
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,12 @@ __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/TradingFloorService"), exports);
43
+ __exportStar(require("./lib/contractsIntegration/IntentsVerifierLensService"), exports);
44
+ __exportStar(require("./lib/contractsIntegration/TriggersAndPortalLensService"), exports);
45
+ __exportStar(require("./lib/contractsIntegration/TradingFloorLensService"), exports);
46
+ __exportStar(require("./lib/contractsIntegration/LexLensService"), exports);
40
47
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens"), exports);
41
48
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens"), exports);
42
49
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/LexLens"), exports);
@@ -45,3 +52,5 @@ __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/Intent
45
52
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory"), exports);
46
53
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory"), exports);
47
54
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory"), exports);
55
+ // Developer Experience utilities
56
+ __exportStar(require("./lib/devex"), exports);
@@ -3,27 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LensAddresses = void 0;
4
4
  exports.LensAddresses = {
5
5
  boba: {
6
- lexLens: "0xCcFaDF4E72d5b2D382555E0eb72a1BF6F7f0EF7F",
7
- tradingFloorLensLens: "0xed9D263917921cb5f0B9a59c5083beA4075F33e7",
8
- intentsVerifierLens: "0x8F33670B7a076793D178D340AD70Cc097DD03739",
9
- triggersAndPortalLens: "0xA03312361D07dfAe0C517a441C69BFA9E84e38bf",
6
+ intentsVerifierLens: "0x7DfA2F609573AB8eD8cA231498FF4E8f1e7d31Fa",
7
+ lexLens: "0xE4Ebc518A2Fb771057E8E1e85296a72a4587e11E",
8
+ tradingFloorLensLens: "0x7f68e8Ba4176683594342d9C39De22b93daC45E3",
9
+ triggersAndPortalLens: "0x5c3d344C24e4Cd7DDCdd15C660095FFb160d42e5",
10
10
  },
11
11
  sonic: {
12
- lexLens: "0xBcb1D4ACbc844ba5FC0aA411b98aebD4A508B65F",
13
- tradingFloorLensLens: "0xa5802951D972372f1385e9Ac83df738b3323d0A8",
14
- intentsVerifierLens: "0xDBe9130AAe593Ec73a838ce286fa84c193bceFA1",
15
- triggersAndPortalLens: "0xaA96df0a4F01212169c2347dc23D5AEb89924839",
12
+ intentsVerifierLens: "0x0C1Fcd85856b5564a87ae378336b7CC0c139C5f7",
13
+ lexLens: "0xc8939875FeC9a0A2f1757272165f8F53659C47c4",
14
+ tradingFloorLensLens: "0x50631a46BEe1E63e46C3eDceE3d5af33E5904681",
15
+ triggersAndPortalLens: "0x7976e6E8145a11aB17D61497dfa0524999Ab6d3c",
16
16
  },
17
17
  fantom: {
18
- lexLens: "0xB5A5041654391a720953D346367D3A3BE9c3d47B",
19
- tradingFloorLensLens: "0x2B913d10452c93Bb7184B5B4fb7e3724452fE0fB",
20
- intentsVerifierLens: "0x5cf3613de36106C10674778C5748FAf9630c3D94",
21
- triggersAndPortalLens: "0x9544C73C97BD292a1F09ef671A5f8CcDf9Ff5429",
18
+ intentsVerifierLens: "",
19
+ lexLens: "",
20
+ tradingFloorLensLens: "",
21
+ triggersAndPortalLens: "",
22
22
  },
23
23
  flare: {
24
- lexLens: "0x812Ea46a0618f923ae473eb239a89A8169b34B85",
25
- tradingFloorLensLens: "0x13d878F3C3f32400A727662af7dfAdBc8b389637",
26
- intentsVerifierLens: "0x33576dFbA7Ed5E3F8F744132D6885cE106178161",
27
- triggersAndPortalLens: "0x625D49B0258BB8277516C07494910d420FA31B06",
24
+ intentsVerifierLens: "0x1CdA9C57526e0CDF97f63c2c0CD460a16f9855F5",
25
+ lexLens: "0x76CDbA9107a89af6Dda81655f26FBE67e1d4a749",
26
+ tradingFloorLensLens: "0x731cDbfF121a313c9af0146826E2A78cCBE9FF66",
27
+ triggersAndPortalLens: "0x36D550DbA557a930f0Dfcb4796c593b2215D52Af",
28
28
  },
29
29
  };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENGINE_CHAIN_DISPLAY_NAME = exports.ENGINE_CHAIN_ID_BY_NAME = void 0;
4
+ const chainConstants_1 = require("./chainConstants");
5
+ // Engine chain mappings
6
+ exports.ENGINE_CHAIN_ID_BY_NAME = {
7
+ sonic: chainConstants_1.CHAIN_ID_SONIC,
8
+ boba: chainConstants_1.CHAIN_ID_BOBA,
9
+ flare: chainConstants_1.CHAIN_ID_FLARE,
10
+ fantom: chainConstants_1.CHAIN_ID_FANTOM,
11
+ };
12
+ exports.ENGINE_CHAIN_DISPLAY_NAME = {
13
+ sonic: "Sonic",
14
+ boba: "Boba",
15
+ flare: "Flare",
16
+ fantom: "Fantom",
17
+ };
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
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
+ class IntentsVerifierLensService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = IntentsVerifierLens__factory_1.IntentsVerifierLens__factory.connect(address, signerOrProvider);
8
+ }
9
+ async getRequestBuildingInfoForChipsIntentsVerifier() {
10
+ return await this.contract.getRequestBuildingInfoForChipsIntentsVerifier();
11
+ }
12
+ async getRequestBuildingInfoForLiquidityIntentsVerifier() {
13
+ return await this.contract.getRequestBuildingInfoForLiquidityIntentsVerifier();
14
+ }
15
+ async getRequestBuildingInfoForTradeIntentsVerifier() {
16
+ return await this.contract.getRequestBuildingInfoForTradeIntentsVerifier();
17
+ }
18
+ async registry() {
19
+ return await this.contract.registry();
20
+ }
21
+ }
22
+ 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
+ };