lynx-client 0.0.2 → 0.0.4

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 (238) hide show
  1. package/README.md +0 -1
  2. package/dist/cjs/index.js +12 -0
  3. package/dist/cjs/lib/addresses/lensAddresses.js +16 -16
  4. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.js +91 -0
  5. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.js +2 -0
  6. package/dist/cjs/lib/contractsIntegration/ChipsIntentsVerifierService/index.js +5 -0
  7. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +0 -13
  8. package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +6 -26
  9. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.js +2 -0
  10. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.js +70 -0
  11. package/dist/cjs/lib/contractsIntegration/LiquidityIntentsVerifierService/index.js +5 -0
  12. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.js +2 -0
  13. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.js +99 -0
  14. package/dist/cjs/lib/contractsIntegration/TradeIntentsVerifierService/index.js +5 -0
  15. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +0 -1
  16. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -7
  17. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +11 -47
  18. package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +28 -9
  19. package/dist/cjs/lib/contractsIntegration/TradingFloorService/index.js +5 -0
  20. package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +45 -0
  21. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.js +2 -0
  22. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.js +2 -0
  23. package/dist/cjs/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.js +2 -0
  24. package/dist/cjs/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
  25. package/dist/cjs/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
  26. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1129 -0
  27. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +870 -0
  28. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1561 -0
  29. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
  30. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  31. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  32. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +78 -6
  33. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +297 -80
  34. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
  35. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
  36. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  37. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
  38. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  39. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
  40. package/dist/esm/index.d.ts +10 -0
  41. package/dist/esm/index.d.ts.map +1 -1
  42. package/dist/esm/index.js +12 -0
  43. package/dist/esm/lib/addresses/lensAddresses.d.ts +16 -16
  44. package/dist/esm/lib/addresses/lensAddresses.js +16 -16
  45. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts +29 -0
  46. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts.map +1 -0
  47. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.js +91 -0
  48. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts +24 -0
  49. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts.map +1 -0
  50. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.js +2 -0
  51. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts +4 -0
  52. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts.map +1 -0
  53. package/dist/esm/lib/contractsIntegration/ChipsIntentsVerifierService/index.js +5 -0
  54. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +3 -16
  55. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -1
  56. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +0 -13
  57. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +5 -5
  58. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -1
  59. package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +6 -26
  60. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts +17 -0
  61. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts.map +1 -0
  62. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.js +2 -0
  63. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts +22 -0
  64. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts.map +1 -0
  65. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.js +70 -0
  66. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts +4 -0
  67. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts.map +1 -0
  68. package/dist/esm/lib/contractsIntegration/LiquidityIntentsVerifierService/index.js +5 -0
  69. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts +24 -0
  70. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts.map +1 -0
  71. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.js +2 -0
  72. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts +29 -0
  73. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts.map +1 -0
  74. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.js +99 -0
  75. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts +4 -0
  76. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts.map +1 -0
  77. package/dist/esm/lib/contractsIntegration/TradeIntentsVerifierService/index.js +5 -0
  78. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +0 -1
  79. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -1
  80. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +0 -1
  81. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +10 -21
  82. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  83. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -7
  84. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +1 -4
  85. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  86. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +11 -47
  87. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +10 -4
  88. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
  89. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +10 -4
  90. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
  91. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +28 -9
  92. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
  93. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
  94. package/dist/esm/lib/contractsIntegration/TradingFloorService/index.js +5 -0
  95. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +15 -0
  96. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  97. package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +45 -0
  98. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts +643 -0
  99. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts.map +1 -0
  100. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.js +2 -0
  101. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts +508 -0
  102. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts.map +1 -0
  103. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.js +2 -0
  104. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts +832 -0
  105. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts.map +1 -0
  106. package/dist/esm/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.js +2 -0
  107. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
  108. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
  109. package/dist/esm/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.js +2 -0
  110. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +42 -6
  111. package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
  112. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +150 -59
  113. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
  114. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
  115. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
  116. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -112
  117. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  118. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
  119. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
  120. package/dist/esm/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.js +2 -0
  121. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +866 -0
  122. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts.map +1 -0
  123. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1129 -0
  124. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +670 -0
  125. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts.map +1 -0
  126. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +870 -0
  127. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1201 -0
  128. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts.map +1 -0
  129. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1561 -0
  130. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
  131. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
  132. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1854 -0
  133. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  134. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  135. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  136. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  137. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +60 -5
  138. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -1
  139. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +78 -6
  140. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +226 -64
  141. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  142. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +297 -80
  143. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
  144. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
  145. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
  146. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
  147. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.js +10 -109
  148. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  149. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  150. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
  151. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  152. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +51 -594
  153. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  154. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  155. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
  156. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
  157. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +334 -0
  158. package/dist/types/index.d.ts +10 -0
  159. package/dist/types/index.d.ts.map +1 -1
  160. package/dist/types/lib/addresses/lensAddresses.d.ts +16 -16
  161. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts +29 -0
  162. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/ChipsIntentsVerifierService.d.ts.map +1 -0
  163. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts +24 -0
  164. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/IChipsIntentsVerifierService.d.ts.map +1 -0
  165. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts +4 -0
  166. package/dist/types/lib/contractsIntegration/ChipsIntentsVerifierService/index.d.ts.map +1 -0
  167. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +3 -16
  168. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -1
  169. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +5 -5
  170. package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -1
  171. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts +17 -0
  172. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/ILiquidityIntentsVerifierService.d.ts.map +1 -0
  173. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts +22 -0
  174. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/LiquidityIntentsVerifierService.d.ts.map +1 -0
  175. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts +4 -0
  176. package/dist/types/lib/contractsIntegration/LiquidityIntentsVerifierService/index.d.ts.map +1 -0
  177. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts +24 -0
  178. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/ITradeIntentsVerifierService.d.ts.map +1 -0
  179. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts +29 -0
  180. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/TradeIntentsVerifierService.d.ts.map +1 -0
  181. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts +4 -0
  182. package/dist/types/lib/contractsIntegration/TradeIntentsVerifierService/index.d.ts.map +1 -0
  183. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +0 -1
  184. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -1
  185. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +10 -21
  186. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  187. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +1 -4
  188. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  189. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +10 -4
  190. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
  191. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +10 -4
  192. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
  193. package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts +3 -0
  194. package/dist/types/lib/contractsIntegration/TradingFloorService/index.d.ts.map +1 -0
  195. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +15 -0
  196. package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
  197. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts +643 -0
  198. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1.d.ts.map +1 -0
  199. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts +508 -0
  200. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1.d.ts.map +1 -0
  201. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts +832 -0
  202. package/dist/types/lib/typechain/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1.d.ts.map +1 -0
  203. package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts +1084 -0
  204. package/dist/types/lib/typechain/contracts/Lynx/Lex/LexPool/LexPoolV1.d.ts.map +1 -0
  205. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +42 -6
  206. package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -1
  207. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +150 -59
  208. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
  209. package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts +10 -65
  210. package/dist/types/lib/typechain/contracts/Peripheral/Lens/IntentsVerifierLens.d.ts.map +1 -1
  211. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +34 -112
  212. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  213. package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts +158 -0
  214. package/dist/types/lib/typechain/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor.d.ts.map +1 -0
  215. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +866 -0
  216. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts.map +1 -0
  217. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +670 -0
  218. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts.map +1 -0
  219. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1201 -0
  220. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts.map +1 -0
  221. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1425 -0
  222. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -0
  223. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  224. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  225. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +60 -5
  226. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -1
  227. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +226 -64
  228. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  229. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
  230. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts +10 -85
  231. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory.d.ts.map +1 -1
  232. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  233. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +13 -442
  234. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  235. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  236. package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +251 -0
  237. package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts.map +1 -0
  238. package/package.json +1 -1
package/README.md CHANGED
@@ -105,7 +105,6 @@ const identifier = buildPositionRequestIdentifier({
105
105
  trader: await signer.getAddress(),
106
106
  pairId: 1, // BTC/USD
107
107
  settlementAsset: "0x...", // USDC address
108
- positionIndex: 0
109
108
  });
110
109
 
111
110
  const params = buildPositionRequestParams({
package/dist/cjs/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.TradeIntentsVerifierService = exports.LiquidityIntentsVerifierService = exports.ChipsIntentsVerifierService = void 0;
17
18
  __exportStar(require("./lib/chains/chainConstants"), exports);
18
19
  __exportStar(require("./lib/chains/chainTypes"), exports);
19
20
  __exportStar(require("./lib/utils/addresses"), exports);
@@ -39,6 +40,13 @@ __exportStar(require("./lib/addresses/lensAddresses"), exports);
39
40
  __exportStar(require("./lib/addresses/systemAddresses"), exports);
40
41
  __exportStar(require("./lib/contractsIntegration/deployedContractsConnector"), exports);
41
42
  __exportStar(require("./lib/contractsIntegration/TradersPortalService"), exports);
43
+ __exportStar(require("./lib/contractsIntegration/TradingFloorService"), exports);
44
+ var ChipsIntentsVerifierService_1 = require("./lib/contractsIntegration/ChipsIntentsVerifierService");
45
+ Object.defineProperty(exports, "ChipsIntentsVerifierService", { enumerable: true, get: function () { return ChipsIntentsVerifierService_1.ChipsIntentsVerifierService; } });
46
+ var LiquidityIntentsVerifierService_1 = require("./lib/contractsIntegration/LiquidityIntentsVerifierService");
47
+ Object.defineProperty(exports, "LiquidityIntentsVerifierService", { enumerable: true, get: function () { return LiquidityIntentsVerifierService_1.LiquidityIntentsVerifierService; } });
48
+ var TradeIntentsVerifierService_1 = require("./lib/contractsIntegration/TradeIntentsVerifierService");
49
+ Object.defineProperty(exports, "TradeIntentsVerifierService", { enumerable: true, get: function () { return TradeIntentsVerifierService_1.TradeIntentsVerifierService; } });
42
50
  __exportStar(require("./lib/contractsIntegration/IntentsVerifierLensService"), exports);
43
51
  __exportStar(require("./lib/contractsIntegration/TriggersAndPortalLensService"), exports);
44
52
  __exportStar(require("./lib/contractsIntegration/TradingFloorLensService"), exports);
@@ -47,9 +55,13 @@ __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/IntentsVerifierL
47
55
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens"), exports);
48
56
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/LexLens"), exports);
49
57
  __exportStar(require("./lib/typechain/contracts/Peripheral/Lens/TradingFloorLens"), exports);
58
+ // Intents Verifier types are exported through their respective services to avoid conflicts
50
59
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/IntentsVerifierLens__factory"), exports);
51
60
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory"), exports);
52
61
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory"), exports);
53
62
  __exportStar(require("./lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory"), exports);
63
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory"), exports);
64
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory"), exports);
65
+ __exportStar(require("./lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory"), exports);
54
66
  // Developer Experience utilities
55
67
  __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,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChipsIntentsVerifierService = void 0;
4
+ const ChipsIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory");
5
+ class ChipsIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = ChipsIntentsVerifierV1__factory_1.ChipsIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(chip) {
11
+ return await this.contract.domainSeparatorForAsset(chip);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async chipOutFeeForChip(chip) {
17
+ return await this.contract.chipOutFeeForChip(chip);
18
+ }
19
+ async feesReceiver() {
20
+ return await this.contract.feesReceiver();
21
+ }
22
+ async intentsPermissions(user) {
23
+ return await this.contract.intentsPermissions(user);
24
+ }
25
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
26
+ if (!this.isSigner) {
27
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
28
+ }
29
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
30
+ await tx.wait();
31
+ }
32
+ async forceChipOut(chip, holder, amount, value) {
33
+ if (!this.isSigner) {
34
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
35
+ }
36
+ const tx = await this.contract.forceChipOut(chip, holder, amount, { value: value || 0n });
37
+ await tx.wait();
38
+ }
39
+ async interactOnBehalf_chipOut(chip, holder, amount, value) {
40
+ if (!this.isSigner) {
41
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
42
+ }
43
+ const tx = await this.contract.interactOnBehalf_chipOut(chip, holder, amount, { value: value || 0n });
44
+ await tx.wait();
45
+ }
46
+ async verifyIntent_chipOut(payload, v, r, s, value) {
47
+ if (!this.isSigner) {
48
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
49
+ }
50
+ const tx = await this.contract.verifyIntent_chipOut(payload, v, r, s, { value: value || 0n });
51
+ await tx.wait();
52
+ }
53
+ async verifyIntent_chipOutAndUnwrap(payload, v, r, s, value) {
54
+ if (!this.isSigner) {
55
+ throw new Error("ChipsIntentsVerifierService: Write operations require a signer");
56
+ }
57
+ const tx = await this.contract.verifyIntent_chipOutAndUnwrap(payload, v, r, s, { value: value || 0n });
58
+ await tx.wait();
59
+ }
60
+ async getLZDstChainIdFromChip(chip) {
61
+ return await this.contract.getLZDstChainIdFromChip(chip);
62
+ }
63
+ async getLZDstChainIdFromEvmChainId(evmChainId) {
64
+ return await this.contract.getLZDstChainIdFromEvmChainId(evmChainId);
65
+ }
66
+ async evmIdToLzEid(evmChainId) {
67
+ return await this.contract.evmIdToLzEid(evmChainId);
68
+ }
69
+ async getWrapNativeChipInOutHelper(oftChip) {
70
+ return await this.contract.getWrapNativeChipInOutHelper(oftChip);
71
+ }
72
+ async sourceChainIdForAsset(asset) {
73
+ return await this.contract.sourceChainIdForAsset(asset);
74
+ }
75
+ async processedSignatures(signature) {
76
+ return await this.contract.processedSignatures(signature);
77
+ }
78
+ async admin() {
79
+ return await this.contract.admin();
80
+ }
81
+ async pendingAdmin() {
82
+ return await this.contract.pendingAdmin();
83
+ }
84
+ async registry() {
85
+ return await this.contract.registry();
86
+ }
87
+ async wrapNativeChipInOutHelpers(oftChip) {
88
+ return await this.contract.wrapNativeChipInOutHelpers(oftChip);
89
+ }
90
+ }
91
+ exports.ChipsIntentsVerifierService = ChipsIntentsVerifierService;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChipsIntentsVerifierService = void 0;
4
+ var ChipsIntentsVerifierService_1 = require("./ChipsIntentsVerifierService");
5
+ Object.defineProperty(exports, "ChipsIntentsVerifierService", { enumerable: true, get: function () { return ChipsIntentsVerifierService_1.ChipsIntentsVerifierService; } });
@@ -1,15 +1,2 @@
1
1
  "use strict";
2
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: 0,
8
- currentNonce: 0,
9
- };
10
- exports.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO = {
11
- verifier: "",
12
- hash: "",
13
- actionType: 0,
14
- currentNonce: 0,
15
- };
@@ -2,38 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IntentsVerifierLensService = void 0;
4
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
5
  class IntentsVerifierLensService {
8
6
  constructor(signerOrProvider, address) {
9
7
  this.contract = IntentsVerifierLens__factory_1.IntentsVerifierLens__factory.connect(address, signerOrProvider);
10
8
  }
11
- async getRequestBuildingInfoForChipsIntentsVerifier(account, actionType) {
12
- const result = await this.contract.getRequestBuildingInfoForChipsIntentsVerifier(account, BigInt(actionType));
13
- const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
14
- return {
15
- ...baseStruct,
16
- actionType: Number(baseStruct.actionType),
17
- currentNonce: Number(baseStruct.currentNonce),
18
- };
9
+ async getRequestBuildingInfoForChipsIntentsVerifier() {
10
+ return await this.contract.getRequestBuildingInfoForChipsIntentsVerifier();
19
11
  }
20
- async getRequestBuildingInfoForLiquidityIntentsVerifier(account, actionType) {
21
- const result = await this.contract.getRequestBuildingInfoForLiquidityIntentsVerifier(account, BigInt(actionType));
22
- const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_ACCOUNT_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
23
- return {
24
- ...baseStruct,
25
- actionType: Number(baseStruct.actionType),
26
- currentNonce: Number(baseStruct.currentNonce),
27
- };
12
+ async getRequestBuildingInfoForLiquidityIntentsVerifier() {
13
+ return await this.contract.getRequestBuildingInfoForLiquidityIntentsVerifier();
28
14
  }
29
- async getRequestBuildingInfoForTradeIntentsVerifier(positionId, actionType) {
30
- const result = await this.contract.getRequestBuildingInfoForTradeIntentsVerifier(positionId, BigInt(actionType));
31
- const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, IIntentsVerifierLensService_1.EMPTY_HASH_BASED_INTENTS_VERIFIER_REQUEST_BUILDING_INFO);
32
- return {
33
- ...baseStruct,
34
- actionType: Number(baseStruct.actionType),
35
- currentNonce: Number(baseStruct.currentNonce),
36
- };
15
+ async getRequestBuildingInfoForTradeIntentsVerifier() {
16
+ return await this.contract.getRequestBuildingInfoForTradeIntentsVerifier();
37
17
  }
38
18
  async registry() {
39
19
  return await this.contract.registry();
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiquidityIntentsVerifierService = void 0;
4
+ const LiquidityIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory");
5
+ class LiquidityIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = LiquidityIntentsVerifierV1__factory_1.LiquidityIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(pool) {
11
+ return await this.contract.domainSeparatorForAsset(pool);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async intentsPermissions(user) {
17
+ return await this.contract.intentsPermissions(user);
18
+ }
19
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
20
+ if (!this.isSigner) {
21
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
22
+ }
23
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
24
+ await tx.wait();
25
+ }
26
+ async interactOnBehalf_epochDeposit(pool, liquidityProvider, amount, minAmountOut, domain, referralCode, value) {
27
+ if (!this.isSigner) {
28
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
29
+ }
30
+ const tx = await this.contract.interactOnBehalf_epochDeposit(pool, liquidityProvider, amount, minAmountOut, domain, referralCode, { value: value || 0n });
31
+ await tx.wait();
32
+ }
33
+ async interactOnBehalf_epochRedeem(pool, liquidityProvider, amount, minAmountOut, value) {
34
+ if (!this.isSigner) {
35
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
36
+ }
37
+ const tx = await this.contract.interactOnBehalf_epochRedeem(pool, liquidityProvider, amount, minAmountOut, { value: value || 0n });
38
+ await tx.wait();
39
+ }
40
+ async verifyIntent_epochDeposit(payload, v, r, s, domain, referralCode, value) {
41
+ if (!this.isSigner) {
42
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
43
+ }
44
+ const tx = await this.contract.verifyIntent_epochDeposit(payload, v, r, s, domain, referralCode, { value: value || 0n });
45
+ await tx.wait();
46
+ }
47
+ async verifyIntent_epochRedeem(payload, v, r, s, value) {
48
+ if (!this.isSigner) {
49
+ throw new Error("LiquidityIntentsVerifierService: Write operations require a signer");
50
+ }
51
+ const tx = await this.contract.verifyIntent_epochRedeem(payload, v, r, s, { value: value || 0n });
52
+ await tx.wait();
53
+ }
54
+ async admin() {
55
+ return await this.contract.admin();
56
+ }
57
+ async pendingAdmin() {
58
+ return await this.contract.pendingAdmin();
59
+ }
60
+ async registry() {
61
+ return await this.contract.registry();
62
+ }
63
+ async sourceChainIdForAsset(asset) {
64
+ return await this.contract.sourceChainIdForAsset(asset);
65
+ }
66
+ async processedSignatures(signature) {
67
+ return await this.contract.processedSignatures(signature);
68
+ }
69
+ }
70
+ exports.LiquidityIntentsVerifierService = LiquidityIntentsVerifierService;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiquidityIntentsVerifierService = void 0;
4
+ var LiquidityIntentsVerifierService_1 = require("./LiquidityIntentsVerifierService");
5
+ Object.defineProperty(exports, "LiquidityIntentsVerifierService", { enumerable: true, get: function () { return LiquidityIntentsVerifierService_1.LiquidityIntentsVerifierService; } });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TradeIntentsVerifierService = void 0;
4
+ const TradeIntentsVerifierV1__factory_1 = require("../../typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory");
5
+ class TradeIntentsVerifierService {
6
+ constructor(signerOrProvider, address) {
7
+ this.contract = TradeIntentsVerifierV1__factory_1.TradeIntentsVerifierV1__factory.connect(address, signerOrProvider);
8
+ this.isSigner = 'sendTransaction' in signerOrProvider;
9
+ }
10
+ async domainSeparatorForAsset(settlementAsset) {
11
+ return await this.contract.domainSeparatorForAsset(settlementAsset);
12
+ }
13
+ async domainSeparatorForChain(chainId) {
14
+ return await this.contract.domainSeparatorForChain(chainId);
15
+ }
16
+ async intentsPermissions(user) {
17
+ return await this.contract.intentsPermissions(user);
18
+ }
19
+ async setIntentsPermissions(oftChip, dynAddressSuffix) {
20
+ if (!this.isSigner) {
21
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
22
+ }
23
+ const tx = await this.contract.setIntentsPermissions(oftChip, dynAddressSuffix);
24
+ await tx.wait();
25
+ }
26
+ async verifyIntent_traderRequest_openNewPosition(payload, v, r, s, domain, referralCode, runCapTests, value) {
27
+ if (!this.isSigner) {
28
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
29
+ }
30
+ const tx = await this.contract.verifyIntent_traderRequest_openNewPosition(payload, v, r, s, domain, referralCode, runCapTests, { value: value || 0n });
31
+ await tx.wait();
32
+ }
33
+ async verifyIntent_traderRequest_marketClosePosition(payload, v, r, s, value) {
34
+ if (!this.isSigner) {
35
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
36
+ }
37
+ const tx = await this.contract.verifyIntent_traderRequest_marketClosePosition(payload, v, r, s, { value: value || 0n });
38
+ await tx.wait();
39
+ }
40
+ async verifyIntent_traderAction_updatePendingLimitPosition(payload, v, r, s, value) {
41
+ if (!this.isSigner) {
42
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
43
+ }
44
+ const tx = await this.contract.verifyIntent_traderAction_updatePendingLimitPosition(payload, v, r, s, { value: value || 0n });
45
+ await tx.wait();
46
+ }
47
+ async verifyIntent_traderAction_cancelPendingLimitPosition(payload, v, r, s, value) {
48
+ if (!this.isSigner) {
49
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
50
+ }
51
+ const tx = await this.contract.verifyIntent_traderAction_cancelPendingLimitPosition(payload, v, r, s, { value: value || 0n });
52
+ await tx.wait();
53
+ }
54
+ async verifyIntent_traderRequest_updatePositionSingleField(payload, v, r, s, value) {
55
+ if (!this.isSigner) {
56
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
57
+ }
58
+ const tx = await this.contract.verifyIntent_traderRequest_updatePositionSingleField(payload, v, r, s, { value: value || 0n });
59
+ await tx.wait();
60
+ }
61
+ async verifyIntent_traderRequest_updatePositionDoubleField(payload, v, r, s, value) {
62
+ if (!this.isSigner) {
63
+ throw new Error("TradeIntentsVerifierService: Write operations require a signer");
64
+ }
65
+ const tx = await this.contract.verifyIntent_traderRequest_updatePositionDoubleField(payload, v, r, s, { value: value || 0n });
66
+ await tx.wait();
67
+ }
68
+ async admin() {
69
+ return await this.contract.admin();
70
+ }
71
+ async pendingAdmin() {
72
+ return await this.contract.pendingAdmin();
73
+ }
74
+ async registry() {
75
+ return await this.contract.registry();
76
+ }
77
+ async sourceChainIdForAsset(asset) {
78
+ return await this.contract.sourceChainIdForAsset(asset);
79
+ }
80
+ async processedSignatures(signature) {
81
+ return await this.contract.processedSignatures(signature);
82
+ }
83
+ async domainSeparatorsForPosition(positionId) {
84
+ return await this.contract.domainSeparatorsForPosition(positionId);
85
+ }
86
+ async tradersForPosition(positionId) {
87
+ return await this.contract.tradersForPosition(positionId);
88
+ }
89
+ async settlementAssetsForPosition(positionId) {
90
+ return await this.contract.settlementAssetsForPosition(positionId);
91
+ }
92
+ async getTradingFloor() {
93
+ return await this.contract.getTradingFloor();
94
+ }
95
+ async getTradersPortal() {
96
+ return await this.contract.getTradersPortal();
97
+ }
98
+ }
99
+ exports.TradeIntentsVerifierService = TradeIntentsVerifierService;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TradeIntentsVerifierService = void 0;
4
+ var TradeIntentsVerifierService_1 = require("./TradeIntentsVerifierService");
5
+ Object.defineProperty(exports, "TradeIntentsVerifierService", { enumerable: true, get: function () { return TradeIntentsVerifierService_1.TradeIntentsVerifierService; } });
@@ -15,7 +15,6 @@ function buildPositionRequestIdentifier(params) {
15
15
  trader: params.trader,
16
16
  pairId: BigInt(params.pairId),
17
17
  settlementAsset: params.settlementAsset,
18
- positionIndex: BigInt(params.positionIndex),
19
18
  };
20
19
  }
21
20
  /**
@@ -32,9 +32,7 @@ exports.EMPTY_COMPLETE_POSITION_DATA = {
32
32
  exports.EMPTY_POSITIONS_RESULT = {
33
33
  positions: [],
34
34
  positionsCount: 0,
35
- settlementAssetsLastIndex: 0,
36
- pairIdsLastIndex: 0,
37
- pairTraderLastIndex: 0,
35
+ traderLastIndex: 0,
38
36
  done: false,
39
37
  };
40
38
  exports.EMPTY_POSITION_LIQUIDATION_INFO = {
@@ -47,15 +45,13 @@ exports.EMPTY_POSITION_LIQUIDATION_INFO = {
47
45
  exports.EMPTY_LIQUIDATION_RESULT = {
48
46
  positionsLiquidationInfo: [],
49
47
  positionsCount: 0,
50
- settlementAssetsLastIndex: 0,
51
- pairIdsLastIndex: 0,
52
- pairTraderLastIndex: 0,
48
+ traderLastIndex: 0,
53
49
  positionLastIndex: 0,
54
50
  done: false,
55
51
  };
56
52
  exports.EMPTY_TRADE_PARAMS = {
57
53
  tradingFloor: "",
58
- maxTradesPerPair: 0,
54
+ maxTradesPerTrader: 0,
59
55
  maxSlF: 0,
60
56
  maxSanityProfitF: 0,
61
57
  };
@@ -45,12 +45,9 @@ class TradingFloorLensService {
45
45
  async getAllPositionsDataForAllTraders(params) {
46
46
  const contractParams = {
47
47
  tradingFloor: params.tradingFloor,
48
- settlementAssetsStartIndex: BigInt(params.settlementAssetsStartIndex),
49
- pairIdsStartIndex: BigInt(params.pairIdsStartIndex),
50
- pairTraderStartIndex: BigInt(params.pairTraderStartIndex),
48
+ traderStartIndex: BigInt(params.traderStartIndex),
51
49
  positionsLimit: BigInt(params.positionsLimit),
52
50
  };
53
- // @ts-ignore
54
51
  const result = await this.contract.getAllPositionsDataForAllTraders.staticCall(contractParams);
55
52
  const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITradingFloorLensService_1.EMPTY_POSITIONS_RESULT);
56
53
  // Convert positions and filter out empty ones
@@ -61,44 +58,23 @@ class TradingFloorLensService {
61
58
  ...baseResult,
62
59
  positions: convertedPositions,
63
60
  positionsCount: Number(baseResult.positionsCount),
64
- settlementAssetsLastIndex: Number(baseResult.settlementAssetsLastIndex),
65
- pairIdsLastIndex: Number(baseResult.pairIdsLastIndex),
66
- pairTraderLastIndex: Number(baseResult.pairTraderLastIndex),
61
+ traderLastIndex: Number(baseResult.traderLastIndex),
67
62
  };
68
63
  }
69
- async getAllPositionsDataForAllTradersInDimension(tradingFloor, settlementAsset, arraySize) {
70
- // @ts-ignore
71
- const result = await this.contract.getAllPositionsDataForAllTradersInDimension.staticCall(tradingFloor, settlementAsset, BigInt(arraySize));
72
- // Convert and filter out empty positions (collateral = 0)
73
- return result
74
- .filter((pos) => pos.collateral > 0n)
75
- .map((pos) => convertPositionData(pos));
76
- }
77
- async getAllPositionsDataForTraderInDimension(tradingFloor, settlementAsset, trader) {
78
- // @ts-ignore
79
- const result = await this.contract.getAllPositionsDataForTraderInDimension.staticCall(tradingFloor, settlementAsset, trader);
80
- // Convert and filter out empty positions (collateral = 0)
81
- return result
82
- .filter((pos) => pos.collateral > 0n)
83
- .map((pos) => convertPositionData(pos));
84
- }
85
64
  async getAllPositionsLiquidationInfo(params, phases) {
86
65
  const contractParams = {
87
66
  tradingFloor: params.tradingFloor,
88
- settlementAssetsStartIndex: BigInt(params.settlementAssetsStartIndex),
89
- pairIdsStartIndex: BigInt(params.pairIdsStartIndex),
90
- pairTraderStartIndex: BigInt(params.pairTraderStartIndex),
67
+ traderStartIndex: BigInt(params.traderStartIndex),
91
68
  positionStartIndex: BigInt(params.positionStartIndex),
92
69
  positionsLimit: BigInt(params.positionsLimit),
93
70
  };
94
71
  let result;
95
72
  if (phases !== undefined) {
96
- // @ts-ignore
97
- result = await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint256,uint256,uint16,uint256),uint8[])"].staticCall(contractParams, phases.map(p => BigInt(p)));
73
+ result = await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint16,uint256),uint8[])"].staticCall(contractParams, phases.map((p) => BigInt(p)));
98
74
  }
99
75
  else {
100
- // @ts-ignore
101
- result = await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint256,uint256,uint16,uint256))"].staticCall(contractParams);
76
+ result =
77
+ await this.contract["getAllPositionsLiquidationInfo((address,uint256,uint16,uint256))"].staticCall(contractParams);
102
78
  }
103
79
  const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITradingFloorLensService_1.EMPTY_LIQUIDATION_RESULT);
104
80
  const convertedPositions = result.positionsLiquidationInfo.map((pos) => convertLiquidationInfo(pos));
@@ -106,39 +82,27 @@ class TradingFloorLensService {
106
82
  ...baseResult,
107
83
  positionsLiquidationInfo: convertedPositions,
108
84
  positionsCount: Number(baseResult.positionsCount),
109
- settlementAssetsLastIndex: Number(baseResult.settlementAssetsLastIndex),
110
- pairIdsLastIndex: Number(baseResult.pairIdsLastIndex),
111
- pairTraderLastIndex: Number(baseResult.pairTraderLastIndex),
85
+ traderLastIndex: Number(baseResult.traderLastIndex),
112
86
  positionLastIndex: Number(baseResult.positionLastIndex),
113
87
  };
114
88
  }
115
89
  async getCompletePositionData(tradingFloor, positionId) {
116
- // @ts-ignore
117
90
  const result = await this.contract.getCompletePositionData.staticCall(tradingFloor, positionId);
118
91
  return convertPositionData(result);
119
92
  }
120
- async getPositionDataInPairsForTrader(tradingFloor, settlementAsset, trader, pairIds) {
121
- // @ts-ignore
122
- const result = await this.contract.getPositionDataInPairsForTrader.staticCall(tradingFloor, settlementAsset, trader, pairIds.map(id => BigInt(id)));
123
- // Convert and filter out empty positions (collateral = 0)
124
- return result
125
- .filter((pos) => pos.collateral > 0n)
126
- .map((pos) => convertPositionData(pos));
127
- }
128
- async getPositionsDataInPairForTrader(tradingFloor, settlementAsset, trader, pairId) {
129
- // @ts-ignore
130
- const result = await this.contract.getPositionsDataInPairForTrader.staticCall(tradingFloor, settlementAsset, trader, BigInt(pairId));
93
+ async getPositionsDataForTrader(tradingFloor, trader) {
94
+ const result = await this.contract.getPositionsDataForTrader.staticCall(tradingFloor, trader);
131
95
  // Convert and filter out empty positions (collateral = 0)
132
96
  return result
133
97
  .filter((pos) => pos.collateral > 0n)
134
98
  .map((pos) => convertPositionData(pos));
135
99
  }
136
100
  async getTradingFloorTradeParams(tradingFloor) {
137
- const result = await this.contract.getTradingFloorTradeParams(tradingFloor);
101
+ const result = await this.contract.getTradingFloorTradeParams.staticCall(tradingFloor);
138
102
  // Result is a tuple/array-like object, extract the named properties
139
103
  return {
140
104
  tradingFloor: result.tradingFloor,
141
- maxTradesPerPair: Number(result.maxTradesPerPair),
105
+ maxTradesPerTrader: Number(result.maxTradesPerTrader),
142
106
  maxSlF: Number(result.maxSlF),
143
107
  maxSanityProfitF: Number(result.maxSanityProfitF),
144
108
  };