lynx-client 0.0.11 → 0.0.12

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 (190) hide show
  1. package/README.md +192 -2
  2. package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
  3. package/dist/cjs/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +158 -25
  4. package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
  5. package/dist/cjs/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
  6. package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
  7. package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
  8. package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
  9. package/dist/cjs/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
  10. package/dist/cjs/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
  11. package/dist/cjs/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
  12. package/dist/cjs/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
  13. package/dist/cjs/lib/contractsIntegration/common/index.js +2 -0
  14. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
  15. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
  16. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
  17. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
  18. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
  19. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
  20. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +207 -1
  21. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  22. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  23. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
  24. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -28
  25. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
  26. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  27. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  28. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  29. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
  30. package/dist/esm/index.d.ts +1 -1
  31. package/dist/esm/index.d.ts.map +1 -1
  32. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
  33. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
  34. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
  35. package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
  36. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +52 -6
  37. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -1
  38. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +17 -20
  39. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -1
  40. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +158 -25
  41. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +1 -1
  42. package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -1
  43. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
  44. package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
  45. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
  46. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
  47. package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
  48. package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
  49. package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
  50. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
  51. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
  52. package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
  53. package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
  54. package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
  55. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
  56. package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
  57. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
  58. package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
  59. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
  60. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
  61. package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
  62. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
  63. package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
  64. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
  65. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
  66. package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
  67. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
  68. package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
  69. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
  70. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
  71. package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
  72. package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
  73. package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
  74. package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
  75. package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
  76. package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
  77. package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
  78. package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
  79. package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
  80. package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
  81. package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
  82. package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
  83. package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
  84. package/dist/esm/lib/contractsIntegration/common/index.d.ts +5 -0
  85. package/dist/esm/lib/contractsIntegration/common/index.d.ts.map +1 -0
  86. package/dist/esm/lib/contractsIntegration/common/index.js +2 -0
  87. package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +151 -1
  88. package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -1
  89. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
  90. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
  91. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
  92. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
  93. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
  94. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
  95. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
  96. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
  97. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
  98. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
  99. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
  100. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
  101. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
  102. package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +157 -1
  103. package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -1
  104. package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +207 -1
  105. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  106. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  107. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  108. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  109. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
  110. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
  111. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -21
  112. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  113. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -28
  114. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
  115. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
  116. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  117. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  118. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  119. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
  120. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  121. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
  122. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
  123. package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
  124. package/dist/types/index.d.ts +1 -1
  125. package/dist/types/index.d.ts.map +1 -1
  126. package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
  127. package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
  128. package/dist/types/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
  129. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +52 -6
  130. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -1
  131. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +17 -20
  132. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -1
  133. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +1 -1
  134. package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -1
  135. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
  136. package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
  137. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
  138. package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
  139. package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
  140. package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
  141. package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
  142. package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
  143. package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
  144. package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
  145. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
  146. package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
  147. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
  148. package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
  149. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
  150. package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
  151. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
  152. package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
  153. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
  154. package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
  155. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
  156. package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
  157. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
  158. package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
  159. package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
  160. package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
  161. package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
  162. package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
  163. package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
  164. package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
  165. package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
  166. package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
  167. package/dist/types/lib/contractsIntegration/common/index.d.ts +5 -0
  168. package/dist/types/lib/contractsIntegration/common/index.d.ts.map +1 -0
  169. package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +151 -1
  170. package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -1
  171. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
  172. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
  173. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
  174. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
  175. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
  176. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
  177. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
  178. package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +157 -1
  179. package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -1
  180. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  181. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  182. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
  183. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -21
  184. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  185. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
  186. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  187. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
  188. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
  189. package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
  190. package/package.json +4 -4
@@ -2,12 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TradingFloorService = void 0;
4
4
  const TradingFloorV1__factory_1 = require("../../typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory");
5
- class TradingFloorService {
6
- constructor(address, signerOrProvider) {
7
- this.signerOrProvider = signerOrProvider;
8
- this.tradingFloorContract = TradingFloorV1__factory_1.TradingFloorV1__factory.connect(address, signerOrProvider);
5
+ class PositionQueries {
6
+ constructor(tradingFloorContract) {
7
+ this.tradingFloorContract = tradingFloorContract;
9
8
  }
10
- // Read-only Functions - Position Information
11
9
  async generatePositionHashId(settlementAsset, trader, pairId, index) {
12
10
  return this.tradingFloorContract.generatePositionHashId(settlementAsset, trader, pairId, index);
13
11
  }
@@ -81,7 +79,11 @@ class TradingFloorService {
81
79
  async initialCollateralByPositionId(positionId) {
82
80
  return this.tradingFloorContract.initialCollateralByPositionId(positionId);
83
81
  }
84
- // Read-only Functions - Settlement & Pool Information
82
+ }
83
+ class SettlementAndPool {
84
+ constructor(tradingFloorContract) {
85
+ this.tradingFloorContract = tradingFloorContract;
86
+ }
85
87
  async isSettlementAssetSupported(settlementAsset) {
86
88
  return this.tradingFloorContract.isSettlementAssetSupported(settlementAsset);
87
89
  }
@@ -91,7 +93,11 @@ class TradingFloorService {
91
93
  async poolAccountantForAsset(asset) {
92
94
  return this.tradingFloorContract.poolAccountantForAsset(asset);
93
95
  }
94
- // Read-only Functions - Trading Pair Information
96
+ }
97
+ class Deprecated {
98
+ constructor(tradingFloorContract) {
99
+ this.tradingFloorContract = tradingFloorContract;
100
+ }
95
101
  async deprecated_pairTraders(asset, pairId, index) {
96
102
  return this.tradingFloorContract.deprecated_pairTraders(asset, pairId, index);
97
103
  }
@@ -108,7 +114,11 @@ class TradingFloorService {
108
114
  async pausedPairs(pairId) {
109
115
  return this.tradingFloorContract.pausedPairs(pairId);
110
116
  }
111
- // Read-only Functions - Global Trader Tracking (v1.01)
117
+ }
118
+ class TraderTracking {
119
+ constructor(tradingFloorContract) {
120
+ this.tradingFloorContract = tradingFloorContract;
121
+ }
112
122
  async traders(index) {
113
123
  return this.tradingFloorContract.traders(index);
114
124
  }
@@ -136,7 +146,11 @@ class TradingFloorService {
136
146
  async pairTradersLastUsedPositionIndex(trader) {
137
147
  return this.tradingFloorContract.pairTradersLastUsedPositionIndex(trader);
138
148
  }
139
- // Read-only Functions - Trading Parameters
149
+ }
150
+ class TradingParameters {
151
+ constructor(tradingFloorContract) {
152
+ this.tradingFloorContract = tradingFloorContract;
153
+ }
140
154
  async maxSanityProfitF() {
141
155
  return this.tradingFloorContract.maxSanityProfitF();
142
156
  }
@@ -146,27 +160,49 @@ class TradingFloorService {
146
160
  async maxTradesPerTrader() {
147
161
  return this.tradingFloorContract.maxTradesPerTrader();
148
162
  }
149
- // Read-only Functions - Fee Information
163
+ }
164
+ class Fees {
165
+ constructor(tradingFloorContract) {
166
+ this.tradingFloorContract = tradingFloorContract;
167
+ }
150
168
  async feesMap(asset, feeType) {
151
169
  return this.tradingFloorContract.feesMap(asset, feeType);
152
170
  }
153
- // Read-only Functions - Admin & Implementation Info
171
+ }
172
+ class ContractReferences {
173
+ constructor(tradingFloorContract) {
174
+ this.tradingFloorContract = tradingFloorContract;
175
+ }
176
+ async registry() {
177
+ return this.tradingFloorContract.registry();
178
+ }
179
+ }
180
+ class PendableAdmin {
181
+ constructor(tradingFloorContract) {
182
+ this.tradingFloorContract = tradingFloorContract;
183
+ }
154
184
  async admin() {
155
185
  return this.tradingFloorContract.admin();
156
186
  }
157
187
  async pendingAdmin() {
158
188
  return this.tradingFloorContract.pendingAdmin();
159
189
  }
190
+ }
191
+ class PendableImplementation {
192
+ constructor(tradingFloorContract) {
193
+ this.tradingFloorContract = tradingFloorContract;
194
+ }
160
195
  async implementation() {
161
196
  return this.tradingFloorContract.implementation();
162
197
  }
163
198
  async pendingImplementation() {
164
199
  return this.tradingFloorContract.pendingImplementation();
165
200
  }
166
- async registry() {
167
- return this.tradingFloorContract.registry();
201
+ }
202
+ class LynxVersionedContract {
203
+ constructor(tradingFloorContract) {
204
+ this.tradingFloorContract = tradingFloorContract;
168
205
  }
169
- // Contract Information
170
206
  async getContractName() {
171
207
  return this.tradingFloorContract.getContractName();
172
208
  }
@@ -179,7 +215,11 @@ class TradingFloorService {
179
215
  async CONTRACT_VERSION() {
180
216
  return this.tradingFloorContract.CONTRACT_VERSION();
181
217
  }
182
- // Constants
218
+ }
219
+ class Constants {
220
+ constructor(tradingFloorContract) {
221
+ this.tradingFloorContract = tradingFloorContract;
222
+ }
183
223
  async ACCURACY_IMPROVEMENT_SCALE() {
184
224
  return this.tradingFloorContract.ACCURACY_IMPROVEMENT_SCALE();
185
225
  }
@@ -196,4 +236,21 @@ class TradingFloorService {
196
236
  return this.tradingFloorContract.PRECISION();
197
237
  }
198
238
  }
239
+ class TradingFloorService {
240
+ constructor(address, signerOrProvider) {
241
+ this.signerOrProvider = signerOrProvider;
242
+ this.tradingFloorContract = TradingFloorV1__factory_1.TradingFloorV1__factory.connect(address, signerOrProvider);
243
+ this.positionQueries = new PositionQueries(this.tradingFloorContract);
244
+ this.settlementAndPool = new SettlementAndPool(this.tradingFloorContract);
245
+ this.deprecated = new Deprecated(this.tradingFloorContract);
246
+ this.traderTracking = new TraderTracking(this.tradingFloorContract);
247
+ this.tradingParameters = new TradingParameters(this.tradingFloorContract);
248
+ this.fees = new Fees(this.tradingFloorContract);
249
+ this.contractReferences = new ContractReferences(this.tradingFloorContract);
250
+ this.pendableAdmin = new PendableAdmin(this.tradingFloorContract);
251
+ this.pendableImplementation = new PendableImplementation(this.tradingFloorContract);
252
+ this.lynxVersionedContract = new LynxVersionedContract(this.tradingFloorContract);
253
+ this.constants = new Constants(this.tradingFloorContract);
254
+ }
255
+ }
199
256
  exports.TradingFloorService = TradingFloorService;
@@ -1,4 +1,5 @@
1
1
  import { BytesLike, ContractTransactionResponse } from "ethers";
2
+ import { IPendableAdmin, IProtocolConstants } from "../common";
2
3
  export interface ITriggersFunctionsGroup_OpenTriggers {
3
4
  market(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
4
5
  limit(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
@@ -19,9 +20,7 @@ export interface ITriggersFunctionsGroup_TimeoutTriggers {
19
20
  marketClose(positionId: BytesLike): Promise<ContractTransactionResponse>;
20
21
  updatePosition(positionId: BytesLike): Promise<ContractTransactionResponse>;
21
22
  }
22
- export interface ITriggersFunctionsGroup_ContractInfo {
23
- admin(): Promise<string>;
24
- pendingAdmin(): Promise<string>;
23
+ export interface ITriggersFunctionsGroup_ContractReferences {
25
24
  orderBook(): Promise<string>;
26
25
  tradingFloor(): Promise<string>;
27
26
  priceValidator(): Promise<string>;
@@ -50,20 +49,18 @@ export interface ITriggersFunctionsGroup_Permissions {
50
49
  isAllowedToTrigger(account: string): Promise<boolean>;
51
50
  getAllTriggerPermissionedAccounts(): Promise<string[]>;
52
51
  }
53
- export interface ITriggersFunctionsGroup_Constants {
54
- ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
55
- FRACTION_SCALE(): Promise<bigint>;
56
- LEVERAGE_SCALE(): Promise<bigint>;
52
+ export interface ITriggersFunctionsGroup_Constants extends IProtocolConstants {
57
53
  MAX_ALLOWED_CONFIDENCE_FRACTION(): Promise<bigint>;
58
54
  MAX_ALLOWED_SPREAD_FRACTION(): Promise<bigint>;
59
- PRECISION(): Promise<bigint>;
55
+ ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
60
56
  }
61
57
  export interface ITriggersService {
62
58
  openTriggers: ITriggersFunctionsGroup_OpenTriggers;
63
59
  closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
64
60
  updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
65
61
  timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
66
- contractInfo: ITriggersFunctionsGroup_ContractInfo;
62
+ contractReferences: ITriggersFunctionsGroup_ContractReferences;
63
+ pendableAdmin: IPendableAdmin;
67
64
  status: ITriggersFunctionsGroup_Status;
68
65
  configuration: ITriggersFunctionsGroup_Configuration;
69
66
  pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"ITriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/ITriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAEhE,MAAM,WAAW,oCAAoC;IACnD,MAAM,CACJ,UAAU,EAAE,SAAS,EACrB,YAAY,EAAE,SAAS,EAAE,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAExC,KAAK,CACH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CAAC,CAAC;CACxD;AAED,MAAM,WAAW,mCAAmC;IAClD,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,iCAAiC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,iCAAiC;IAChD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,+BAA+B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,oCAAoC,CAAC;IACnD,aAAa,EAAE,qCAAqC,CAAC;IACrD,cAAc,EAAE,sCAAsC,CAAC;IACvD,eAAe,EAAE,uCAAuC,CAAC;IACzD,YAAY,EAAE,oCAAoC,CAAC;IACnD,MAAM,EAAE,8BAA8B,CAAC;IACvC,aAAa,EAAE,qCAAqC,CAAC;IACrD,iBAAiB,EAAE,yCAAyC,CAAC;IAC7D,WAAW,EAAE,mCAAmC,CAAC;IACjD,SAAS,EAAE,iCAAiC,CAAC;CAC9C"}
1
+ {"version":3,"file":"ITriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/ITriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,WAAW,oCAAoC;IACnD,MAAM,CACJ,UAAU,EAAE,SAAS,EACrB,YAAY,EAAE,SAAS,EAAE,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,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kB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,iCAAiC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,iCAAkC,SAAQ,kBAAkB;IAE3E,+BAA+B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAG/C,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,oCAAoC,CAAC;IACnD,aAAa,EAAE,qCAAqC,CAAC;IACrD,cAAc,EAAE,sCAAsC,CAAC;IACvD,eAAe,EAAE,uCAAuC,CAAC;IACzD,kBAAkB,EAAE,0CAA0C,CAAC;IAC/D,aAAa,EAAE,cAAc,CAAC;IAC9B,MAAM,EAAE,8BAA8B,CAAC;IACvC,aAAa,EAAE,qCAAqC,CAAC;IACrD,iBAAiB,EAAE,yCAAyC,CAAC;IAC7D,WAAW,EAAE,mCAAmC,CAAC;IACjD,SAAS,EAAE,iCAAiC,CAAC;CAC9C"}
@@ -1,5 +1,6 @@
1
1
  import { Signer, Provider } from "ethers";
2
- import { ITriggersService, ITriggersFunctionsGroup_OpenTriggers, ITriggersFunctionsGroup_CloseTriggers, ITriggersFunctionsGroup_UpdateTriggers, ITriggersFunctionsGroup_TimeoutTriggers, ITriggersFunctionsGroup_ContractInfo, ITriggersFunctionsGroup_Status, ITriggersFunctionsGroup_Configuration, ITriggersFunctionsGroup_PairConfiguration, ITriggersFunctionsGroup_Permissions, ITriggersFunctionsGroup_Constants } from "./ITriggersService";
2
+ import { ITriggersService, ITriggersFunctionsGroup_OpenTriggers, ITriggersFunctionsGroup_CloseTriggers, ITriggersFunctionsGroup_UpdateTriggers, ITriggersFunctionsGroup_TimeoutTriggers, ITriggersFunctionsGroup_ContractReferences, ITriggersFunctionsGroup_Status, ITriggersFunctionsGroup_Configuration, ITriggersFunctionsGroup_PairConfiguration, ITriggersFunctionsGroup_Permissions, ITriggersFunctionsGroup_Constants } from "./ITriggersService";
3
+ import { IPendableAdmin } from "../common";
3
4
  export declare class TriggersService implements ITriggersService {
4
5
  private signerOrProvider;
5
6
  private triggersContract;
@@ -7,7 +8,8 @@ export declare class TriggersService implements ITriggersService {
7
8
  readonly closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
8
9
  readonly updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
9
10
  readonly timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
10
- readonly contractInfo: ITriggersFunctionsGroup_ContractInfo;
11
+ readonly contractReferences: ITriggersFunctionsGroup_ContractReferences;
12
+ readonly pendableAdmin: IPendableAdmin;
11
13
  readonly status: ITriggersFunctionsGroup_Status;
12
14
  readonly configuration: ITriggersFunctionsGroup_Configuration;
13
15
  readonly pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
@@ -1 +1 @@
1
- {"version":3,"file":"TriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/TriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,gBAAgB,EAChB,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,oCAAoC,EACpC,8BAA8B,EAC9B,qCAAqC,EACrC,yCAAyC,EACzC,mCAAmC,EACnC,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAoR5B,qBAAa,eAAgB,YAAW,gBAAgB;IAepD,OAAO,CAAC,gBAAgB;IAd1B,OAAO,CAAC,gBAAgB,CAAa;IACrC,SAAgB,YAAY,EAAE,oCAAoC,CAAC;IACnE,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,cAAc,EAAE,sCAAsC,CAAC;IACvE,SAAgB,eAAe,EAAE,uCAAuC,CAAC;IACzE,SAAgB,YAAY,EAAE,oCAAoC,CAAC;IACnE,SAAgB,MAAM,EAAE,8BAA8B,CAAC;IACvD,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,iBAAiB,EAAE,yCAAyC,CAAC;IAC7E,SAAgB,WAAW,EAAE,mCAAmC,CAAC;IACjE,SAAgB,SAAS,EAAE,iCAAiC,CAAC;gBAG3D,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAkB9C"}
1
+ {"version":3,"file":"TriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/TriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,gBAAgB,EAChB,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,0CAA0C,EAC1C,8BAA8B,EAC9B,qCAAqC,EACrC,yCAAyC,EACzC,mCAAmC,EACnC,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAwR3C,qBAAa,eAAgB,YAAW,gBAAgB;IAgBpD,OAAO,CAAC,gBAAgB;IAf1B,OAAO,CAAC,gBAAgB,CAAa;IACrC,SAAgB,YAAY,EAAE,oCAAoC,CAAC;IACnE,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,cAAc,EAAE,sCAAsC,CAAC;IACvE,SAAgB,eAAe,EAAE,uCAAuC,CAAC;IACzE,SAAgB,kBAAkB,EAAE,0CAA0C,CAAC;IAC/E,SAAgB,aAAa,EAAE,cAAc,CAAC;IAC9C,SAAgB,MAAM,EAAE,8BAA8B,CAAC;IACvD,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,iBAAiB,EAAE,yCAAyC,CAAC;IAC7E,SAAgB,WAAW,EAAE,mCAAmC,CAAC;IACjE,SAAgB,SAAS,EAAE,iCAAiC,CAAC;gBAG3D,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAmB9C"}
@@ -58,16 +58,10 @@ class TimeoutTriggers {
58
58
  return this.triggersContract.trigger_timeout_updatePosition(positionId);
59
59
  }
60
60
  }
61
- class ContractInfo {
61
+ class ContractReferences {
62
62
  constructor(triggersContract) {
63
63
  this.triggersContract = triggersContract;
64
64
  }
65
- async admin() {
66
- return this.triggersContract.admin();
67
- }
68
- async pendingAdmin() {
69
- return this.triggersContract.pendingAdmin();
70
- }
71
65
  async orderBook() {
72
66
  return this.triggersContract.orderBook();
73
67
  }
@@ -78,6 +72,17 @@ class ContractInfo {
78
72
  return this.triggersContract.priceValidator();
79
73
  }
80
74
  }
75
+ class PendableAdmin {
76
+ constructor(triggersContract) {
77
+ this.triggersContract = triggersContract;
78
+ }
79
+ async admin() {
80
+ return this.triggersContract.admin();
81
+ }
82
+ async pendingAdmin() {
83
+ return this.triggersContract.pendingAdmin();
84
+ }
85
+ }
81
86
  class Status {
82
87
  constructor(triggersContract) {
83
88
  this.triggersContract = triggersContract;
@@ -177,7 +182,8 @@ class TriggersService {
177
182
  this.closeTriggers = new CloseTriggers(this.triggersContract);
178
183
  this.updateTriggers = new UpdateTriggers(this.triggersContract);
179
184
  this.timeoutTriggers = new TimeoutTriggers(this.triggersContract);
180
- this.contractInfo = new ContractInfo(this.triggersContract);
185
+ this.contractReferences = new ContractReferences(this.triggersContract);
186
+ this.pendableAdmin = new PendableAdmin(this.triggersContract);
181
187
  this.status = new Status(this.triggersContract);
182
188
  this.configuration = new Configuration(this.triggersContract);
183
189
  this.pairConfiguration = new PairConfiguration(this.triggersContract);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Common interface for Lynx versioned contracts
3
+ * All Lynx contracts implement these versioning methods
4
+ */
5
+ export interface ILynxVersionedContract {
6
+ getContractName(): Promise<string>;
7
+ getContractVersion(): Promise<string>;
8
+ CONTRACT_NAME(): Promise<string>;
9
+ CONTRACT_VERSION(): Promise<string>;
10
+ }
11
+ //# sourceMappingURL=ILynxVersionedContract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILynxVersionedContract.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/ILynxVersionedContract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACrC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAChC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACpC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Common interface for contracts with pendable admin pattern
3
+ * Allows for two-step admin transfer process
4
+ */
5
+ export interface IPendableAdmin {
6
+ admin(): Promise<string>;
7
+ pendingAdmin(): Promise<string>;
8
+ }
9
+ //# sourceMappingURL=IPendableAdmin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPendableAdmin.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IPendableAdmin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAChC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Common interface for upgradeable contracts with pendable implementation pattern
3
+ * Allows for two-step implementation upgrade process
4
+ */
5
+ export interface IPendableImplementation {
6
+ implementation(): Promise<string>;
7
+ pendingImplementation(): Promise<string>;
8
+ }
9
+ //# sourceMappingURL=IPendableImplementation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPendableImplementation.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IPendableImplementation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACjC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACzC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Common interface for protocol-wide constants used across multiple contracts
3
+ * These constants define the scaling factors and precision levels used throughout the Lynx protocol
4
+ */
5
+ export interface IProtocolConstants {
6
+ /**
7
+ * Scale factor for fraction calculations (typically 100,000 for 5 decimal precision)
8
+ * Used for percentage-based calculations like fees, rates, etc.
9
+ */
10
+ FRACTION_SCALE(): Promise<bigint>;
11
+ /**
12
+ * General precision constant used for various calculations
13
+ * The specific value and usage may vary by contract
14
+ */
15
+ PRECISION(): Promise<bigint>;
16
+ /**
17
+ * Scale factor for leverage values (typically 100)
18
+ * Leverage of 25x is stored as 2500
19
+ */
20
+ LEVERAGE_SCALE(): Promise<bigint>;
21
+ /**
22
+ * Optional: Scale factor for improved calculation accuracy
23
+ * Not all contracts implement this
24
+ */
25
+ ACCURACY_IMPROVEMENT_SCALE?(): Promise<bigint>;
26
+ /**
27
+ * Optional: Unit scale specific to the contract
28
+ * Used in contracts like LexPool for internal calculations
29
+ */
30
+ SELF_UNIT_SCALE?(): Promise<bigint>;
31
+ }
32
+ //# sourceMappingURL=IProtocolConstants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IProtocolConstants.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IProtocolConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAEjC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAEjC;;;OAGG;IACH,0BAA0B,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE9C;;;OAGG;IACH,eAAe,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACpC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type { ILynxVersionedContract } from "./ILynxVersionedContract";
2
+ export type { IPendableAdmin } from "./IPendableAdmin";
3
+ export type { IPendableImplementation } from "./IPendableImplementation";
4
+ export type { IProtocolConstants } from "./IProtocolConstants";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,43 @@
1
1
  import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
2
2
  import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../../../common";
3
+ export declare namespace OnBehalfTradingStructsV1 {
4
+ type TradingPermissionStruct = {
5
+ amountLimit: BigNumberish;
6
+ amountUsed: BigNumberish;
7
+ expiryTime: BigNumberish;
8
+ isActive: boolean;
9
+ };
10
+ type TradingPermissionStructOutput = [
11
+ amountLimit: bigint,
12
+ amountUsed: bigint,
13
+ expiryTime: bigint,
14
+ isActive: boolean
15
+ ] & {
16
+ amountLimit: bigint;
17
+ amountUsed: bigint;
18
+ expiryTime: bigint;
19
+ isActive: boolean;
20
+ };
21
+ type PermissionSettingPayloadStruct = {
22
+ spender: AddressLike;
23
+ token: AddressLike;
24
+ amountLimit: BigNumberish;
25
+ duration: BigNumberish;
26
+ };
27
+ type PermissionSettingPayloadStructOutput = [
28
+ spender: string,
29
+ token: string,
30
+ amountLimit: bigint,
31
+ duration: bigint
32
+ ] & {
33
+ spender: string;
34
+ token: string;
35
+ amountLimit: bigint;
36
+ duration: bigint;
37
+ };
38
+ }
3
39
  export interface OnBehalfTradingV1Interface extends Interface {
4
- getFunction(nameOrSignature: "CONTRACT_NAME" | "CONTRACT_VERSION" | "_acceptAdmin" | "_setPendingAdmin" | "admin" | "chargePermission" | "dynamicRoleCallers" | "getContractName" | "getContractVersion" | "getRemainingAmount" | "grantPermission" | "isPaused" | "isPermissionValid" | "maxPermissionAmountPerToken" | "maxPermissionDuration" | "pendingAdmin" | "permanentlyRevoked" | "permissions" | "registry" | "requirePermission" | "revokeAllPermissions" | "revokePermission" | "setDynamicRoleCaller" | "setDynamicRoleCallers" | "setMaxPermissionAmountForToken" | "setMaxPermissionAmountsForTokens" | "setMaxPermissionDuration" | "togglePause"): FunctionFragment;
40
+ getFunction(nameOrSignature: "CONTRACT_NAME" | "CONTRACT_VERSION" | "_acceptAdmin" | "_setPendingAdmin" | "admin" | "chargePermission" | "dynamicRoleCallers" | "getActivePermissionCount" | "getActiveSpenders" | "getActiveTokensForSpender" | "getAllActivePermissions" | "getContractConfiguration" | "getContractName" | "getContractVersion" | "getRemainingAmount" | "grantPermission" | "hasActivePermissions" | "isPaused" | "isPermissionValid" | "maxPermissionAmountPerToken" | "maxPermissionDuration" | "pendingAdmin" | "permanentlyRevoked" | "permissions" | "registry" | "requirePermission" | "revokeAllPermissions" | "revokePermission" | "setDynamicRoleCaller" | "setDynamicRoleCallers" | "setMaxPermissionAmountForToken" | "setMaxPermissionAmountsForTokens" | "setMaxPermissionDuration" | "setPermissions" | "togglePause"): FunctionFragment;
5
41
  getEvent(nameOrSignatureOrTopic: "AllPermissionsPermanentlyRevoked" | "DynamicRoleCallerUpdated" | "MaxPermissionAmountUpdatedForToken" | "MaxPermissionDurationUpdated" | "NewAdmin" | "NewPendingAdmin" | "PausedToggled" | "PermissionCharged" | "PermissionGranted" | "PermissionRevoked"): EventFragment;
6
42
  encodeFunctionData(functionFragment: "CONTRACT_NAME", values?: undefined): string;
7
43
  encodeFunctionData(functionFragment: "CONTRACT_VERSION", values?: undefined): string;
@@ -10,10 +46,16 @@ export interface OnBehalfTradingV1Interface extends Interface {
10
46
  encodeFunctionData(functionFragment: "admin", values?: undefined): string;
11
47
  encodeFunctionData(functionFragment: "chargePermission", values: [AddressLike, AddressLike, AddressLike, BigNumberish]): string;
12
48
  encodeFunctionData(functionFragment: "dynamicRoleCallers", values: [AddressLike]): string;
49
+ encodeFunctionData(functionFragment: "getActivePermissionCount", values: [AddressLike]): string;
50
+ encodeFunctionData(functionFragment: "getActiveSpenders", values: [AddressLike]): string;
51
+ encodeFunctionData(functionFragment: "getActiveTokensForSpender", values: [AddressLike, AddressLike]): string;
52
+ encodeFunctionData(functionFragment: "getAllActivePermissions", values: [AddressLike]): string;
53
+ encodeFunctionData(functionFragment: "getContractConfiguration", values: [AddressLike[]]): string;
13
54
  encodeFunctionData(functionFragment: "getContractName", values?: undefined): string;
14
55
  encodeFunctionData(functionFragment: "getContractVersion", values?: undefined): string;
15
56
  encodeFunctionData(functionFragment: "getRemainingAmount", values: [AddressLike, AddressLike, AddressLike]): string;
16
57
  encodeFunctionData(functionFragment: "grantPermission", values: [AddressLike, AddressLike, BigNumberish, BigNumberish]): string;
58
+ encodeFunctionData(functionFragment: "hasActivePermissions", values: [AddressLike]): string;
17
59
  encodeFunctionData(functionFragment: "isPaused", values?: undefined): string;
18
60
  encodeFunctionData(functionFragment: "isPermissionValid", values: [AddressLike, AddressLike, AddressLike]): string;
19
61
  encodeFunctionData(functionFragment: "maxPermissionAmountPerToken", values: [AddressLike]): string;
@@ -30,6 +72,7 @@ export interface OnBehalfTradingV1Interface extends Interface {
30
72
  encodeFunctionData(functionFragment: "setMaxPermissionAmountForToken", values: [AddressLike, BigNumberish]): string;
31
73
  encodeFunctionData(functionFragment: "setMaxPermissionAmountsForTokens", values: [AddressLike[], BigNumberish[]]): string;
32
74
  encodeFunctionData(functionFragment: "setMaxPermissionDuration", values: [BigNumberish]): string;
75
+ encodeFunctionData(functionFragment: "setPermissions", values: [OnBehalfTradingStructsV1.PermissionSettingPayloadStruct[]]): string;
33
76
  encodeFunctionData(functionFragment: "togglePause", values?: undefined): string;
34
77
  decodeFunctionResult(functionFragment: "CONTRACT_NAME", data: BytesLike): Result;
35
78
  decodeFunctionResult(functionFragment: "CONTRACT_VERSION", data: BytesLike): Result;
@@ -38,10 +81,16 @@ export interface OnBehalfTradingV1Interface extends Interface {
38
81
  decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result;
39
82
  decodeFunctionResult(functionFragment: "chargePermission", data: BytesLike): Result;
40
83
  decodeFunctionResult(functionFragment: "dynamicRoleCallers", data: BytesLike): Result;
84
+ decodeFunctionResult(functionFragment: "getActivePermissionCount", data: BytesLike): Result;
85
+ decodeFunctionResult(functionFragment: "getActiveSpenders", data: BytesLike): Result;
86
+ decodeFunctionResult(functionFragment: "getActiveTokensForSpender", data: BytesLike): Result;
87
+ decodeFunctionResult(functionFragment: "getAllActivePermissions", data: BytesLike): Result;
88
+ decodeFunctionResult(functionFragment: "getContractConfiguration", data: BytesLike): Result;
41
89
  decodeFunctionResult(functionFragment: "getContractName", data: BytesLike): Result;
42
90
  decodeFunctionResult(functionFragment: "getContractVersion", data: BytesLike): Result;
43
91
  decodeFunctionResult(functionFragment: "getRemainingAmount", data: BytesLike): Result;
44
92
  decodeFunctionResult(functionFragment: "grantPermission", data: BytesLike): Result;
93
+ decodeFunctionResult(functionFragment: "hasActivePermissions", data: BytesLike): Result;
45
94
  decodeFunctionResult(functionFragment: "isPaused", data: BytesLike): Result;
46
95
  decodeFunctionResult(functionFragment: "isPermissionValid", data: BytesLike): Result;
47
96
  decodeFunctionResult(functionFragment: "maxPermissionAmountPerToken", data: BytesLike): Result;
@@ -58,6 +107,7 @@ export interface OnBehalfTradingV1Interface extends Interface {
58
107
  decodeFunctionResult(functionFragment: "setMaxPermissionAmountForToken", data: BytesLike): Result;
59
108
  decodeFunctionResult(functionFragment: "setMaxPermissionAmountsForTokens", data: BytesLike): Result;
60
109
  decodeFunctionResult(functionFragment: "setMaxPermissionDuration", data: BytesLike): Result;
110
+ decodeFunctionResult(functionFragment: "setPermissions", data: BytesLike): Result;
61
111
  decodeFunctionResult(functionFragment: "togglePause", data: BytesLike): Result;
62
112
  }
63
113
  export declare namespace AllPermissionsPermanentlyRevokedEvent {
@@ -251,6 +301,52 @@ export interface OnBehalfTradingV1 extends BaseContract {
251
301
  ], [
252
302
  string
253
303
  ], "view">;
304
+ getActivePermissionCount: TypedContractMethod<[
305
+ owner: AddressLike
306
+ ], [
307
+ bigint
308
+ ], "view">;
309
+ getActiveSpenders: TypedContractMethod<[
310
+ owner: AddressLike
311
+ ], [
312
+ string[]
313
+ ], "view">;
314
+ getActiveTokensForSpender: TypedContractMethod<[
315
+ owner: AddressLike,
316
+ spender: AddressLike
317
+ ], [
318
+ string[]
319
+ ], "view">;
320
+ getAllActivePermissions: TypedContractMethod<[
321
+ owner: AddressLike
322
+ ], [
323
+ [
324
+ string[],
325
+ string[],
326
+ OnBehalfTradingStructsV1.TradingPermissionStructOutput[]
327
+ ] & {
328
+ spenders: string[];
329
+ tokens: string[];
330
+ permissionData: OnBehalfTradingStructsV1.TradingPermissionStructOutput[];
331
+ }
332
+ ], "view">;
333
+ getContractConfiguration: TypedContractMethod<[
334
+ tokensToQuery: AddressLike[]
335
+ ], [
336
+ [
337
+ boolean,
338
+ bigint,
339
+ bigint[],
340
+ string,
341
+ string
342
+ ] & {
343
+ isPausedState: boolean;
344
+ maxDuration: bigint;
345
+ tokenMaxAmounts: bigint[];
346
+ registryAddress: string;
347
+ tradersPortalAddress: string;
348
+ }
349
+ ], "view">;
254
350
  getContractName: TypedContractMethod<[], [string], "view">;
255
351
  getContractVersion: TypedContractMethod<[], [string], "view">;
256
352
  getRemainingAmount: TypedContractMethod<[
@@ -268,6 +364,11 @@ export interface OnBehalfTradingV1 extends BaseContract {
268
364
  ], [
269
365
  void
270
366
  ], "nonpayable">;
367
+ hasActivePermissions: TypedContractMethod<[
368
+ owner: AddressLike
369
+ ], [
370
+ boolean
371
+ ], "view">;
271
372
  isPaused: TypedContractMethod<[], [boolean], "view">;
272
373
  isPermissionValid: TypedContractMethod<[
273
374
  owner: AddressLike,
@@ -354,6 +455,11 @@ export interface OnBehalfTradingV1 extends BaseContract {
354
455
  ], [
355
456
  void
356
457
  ], "nonpayable">;
458
+ setPermissions: TypedContractMethod<[
459
+ settings: OnBehalfTradingStructsV1.PermissionSettingPayloadStruct[]
460
+ ], [
461
+ void
462
+ ], "nonpayable">;
357
463
  togglePause: TypedContractMethod<[], [void], "nonpayable">;
358
464
  getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
359
465
  getFunction(nameOrSignature: "CONTRACT_NAME"): TypedContractMethod<[], [string], "view">;
@@ -370,6 +476,44 @@ export interface OnBehalfTradingV1 extends BaseContract {
370
476
  void
371
477
  ], "nonpayable">;
372
478
  getFunction(nameOrSignature: "dynamicRoleCallers"): TypedContractMethod<[arg0: AddressLike], [string], "view">;
479
+ getFunction(nameOrSignature: "getActivePermissionCount"): TypedContractMethod<[owner: AddressLike], [bigint], "view">;
480
+ getFunction(nameOrSignature: "getActiveSpenders"): TypedContractMethod<[owner: AddressLike], [string[]], "view">;
481
+ getFunction(nameOrSignature: "getActiveTokensForSpender"): TypedContractMethod<[
482
+ owner: AddressLike,
483
+ spender: AddressLike
484
+ ], [
485
+ string[]
486
+ ], "view">;
487
+ getFunction(nameOrSignature: "getAllActivePermissions"): TypedContractMethod<[
488
+ owner: AddressLike
489
+ ], [
490
+ [
491
+ string[],
492
+ string[],
493
+ OnBehalfTradingStructsV1.TradingPermissionStructOutput[]
494
+ ] & {
495
+ spenders: string[];
496
+ tokens: string[];
497
+ permissionData: OnBehalfTradingStructsV1.TradingPermissionStructOutput[];
498
+ }
499
+ ], "view">;
500
+ getFunction(nameOrSignature: "getContractConfiguration"): TypedContractMethod<[
501
+ tokensToQuery: AddressLike[]
502
+ ], [
503
+ [
504
+ boolean,
505
+ bigint,
506
+ bigint[],
507
+ string,
508
+ string
509
+ ] & {
510
+ isPausedState: boolean;
511
+ maxDuration: bigint;
512
+ tokenMaxAmounts: bigint[];
513
+ registryAddress: string;
514
+ tradersPortalAddress: string;
515
+ }
516
+ ], "view">;
373
517
  getFunction(nameOrSignature: "getContractName"): TypedContractMethod<[], [string], "view">;
374
518
  getFunction(nameOrSignature: "getContractVersion"): TypedContractMethod<[], [string], "view">;
375
519
  getFunction(nameOrSignature: "getRemainingAmount"): TypedContractMethod<[
@@ -387,6 +531,7 @@ export interface OnBehalfTradingV1 extends BaseContract {
387
531
  ], [
388
532
  void
389
533
  ], "nonpayable">;
534
+ getFunction(nameOrSignature: "hasActivePermissions"): TypedContractMethod<[owner: AddressLike], [boolean], "view">;
390
535
  getFunction(nameOrSignature: "isPaused"): TypedContractMethod<[], [boolean], "view">;
391
536
  getFunction(nameOrSignature: "isPermissionValid"): TypedContractMethod<[
392
537
  owner: AddressLike,
@@ -461,6 +606,11 @@ export interface OnBehalfTradingV1 extends BaseContract {
461
606
  void
462
607
  ], "nonpayable">;
463
608
  getFunction(nameOrSignature: "setMaxPermissionDuration"): TypedContractMethod<[_maxDuration: BigNumberish], [void], "nonpayable">;
609
+ getFunction(nameOrSignature: "setPermissions"): TypedContractMethod<[
610
+ settings: OnBehalfTradingStructsV1.PermissionSettingPayloadStruct[]
611
+ ], [
612
+ void
613
+ ], "nonpayable">;
464
614
  getFunction(nameOrSignature: "togglePause"): TypedContractMethod<[], [void], "nonpayable">;
465
615
  getEvent(key: "AllPermissionsPermanentlyRevoked"): TypedContractEvent<AllPermissionsPermanentlyRevokedEvent.InputTuple, AllPermissionsPermanentlyRevokedEvent.OutputTuple, AllPermissionsPermanentlyRevokedEvent.OutputObject>;
466
616
  getEvent(key: "DynamicRoleCallerUpdated"): TypedContractEvent<DynamicRoleCallerUpdatedEvent.InputTuple, DynamicRoleCallerUpdatedEvent.OutputTuple, DynamicRoleCallerUpdatedEvent.OutputObject>;