lynx-client 0.0.1-beta.8 → 0.0.2
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.
- package/README.md +392 -3
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/lib/chains/chainMappings.js +17 -0
- package/dist/cjs/lib/constants/contractEnums.js +2 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +42 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/index.js +19 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +61 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +147 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
- package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +119 -8
- package/dist/cjs/lib/devex/getChainAddresses.js +65 -0
- package/dist/cjs/lib/devex/getSupportedEngineChains.js +45 -0
- package/dist/cjs/lib/devex/index.js +9 -0
- package/dist/cjs/lib/devex/types.js +2 -0
- package/dist/cjs/lib/lynxSystem/hashes.js +9 -0
- package/dist/cjs/lib/lynxSystem/lynxScalesUtils.js +8 -0
- package/dist/cjs/lib/lynxSystem/registry/registryReading.js +38 -0
- package/dist/cjs/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
- package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/cjs/lib/utils/ethersTypes.js +29 -6
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +8 -0
- package/dist/esm/lib/chains/chainMappings.d.ts +13 -0
- package/dist/esm/lib/chains/chainMappings.d.ts.map +1 -0
- package/dist/esm/lib/chains/chainMappings.js +17 -0
- package/dist/esm/lib/chains/chainTypes.d.ts +3 -0
- package/dist/esm/lib/chains/chainTypes.d.ts.map +1 -1
- package/dist/esm/lib/constants/contractEnums.d.ts +1 -0
- package/dist/esm/lib/constants/contractEnums.d.ts.map +1 -1
- package/dist/esm/lib/constants/contractEnums.js +2 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +20 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +42 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.js +19 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +76 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +61 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +16 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +147 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +119 -8
- package/dist/esm/lib/devex/getChainAddresses.d.ts +20 -0
- package/dist/esm/lib/devex/getChainAddresses.d.ts.map +1 -0
- package/dist/esm/lib/devex/getChainAddresses.js +65 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.d.ts +37 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.js +45 -0
- package/dist/esm/lib/devex/index.d.ts +5 -0
- package/dist/esm/lib/devex/index.d.ts.map +1 -0
- package/dist/esm/lib/devex/index.js +9 -0
- package/dist/esm/lib/devex/types.d.ts +20 -0
- package/dist/esm/lib/devex/types.d.ts.map +1 -0
- package/dist/esm/lib/devex/types.js +2 -0
- package/dist/esm/lib/lynxSystem/hashes.d.ts +6 -0
- package/dist/esm/lib/lynxSystem/hashes.d.ts.map +1 -1
- package/dist/esm/lib/lynxSystem/hashes.js +9 -0
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.js +8 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts +9 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.js +38 -0
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
- package/dist/esm/lib/typechain/common.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/esm/lib/utils/ethersTypes.d.ts +2 -2
- package/dist/esm/lib/utils/ethersTypes.d.ts.map +1 -1
- package/dist/esm/lib/utils/ethersTypes.js +29 -6
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/chains/chainMappings.d.ts +13 -0
- package/dist/types/lib/chains/chainMappings.d.ts.map +1 -0
- package/dist/types/lib/chains/chainTypes.d.ts +3 -0
- package/dist/types/lib/chains/chainTypes.d.ts.map +1 -1
- package/dist/types/lib/constants/contractEnums.d.ts +1 -0
- package/dist/types/lib/constants/contractEnums.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +20 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
- package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +76 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +16 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/types/lib/devex/getChainAddresses.d.ts +20 -0
- package/dist/types/lib/devex/getChainAddresses.d.ts.map +1 -0
- package/dist/types/lib/devex/getSupportedEngineChains.d.ts +37 -0
- package/dist/types/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
- package/dist/types/lib/devex/index.d.ts +5 -0
- package/dist/types/lib/devex/index.d.ts.map +1 -0
- package/dist/types/lib/devex/types.d.ts +20 -0
- package/dist/types/lib/devex/types.d.ts.map +1 -0
- package/dist/types/lib/lynxSystem/hashes.d.ts +6 -0
- package/dist/types/lib/lynxSystem/hashes.d.ts.map +1 -1
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
- package/dist/types/lib/lynxSystem/registry/registryReading.d.ts +9 -0
- package/dist/types/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
- package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/dist/types/lib/typechain/common.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
- package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/types/lib/utils/ethersTypes.d.ts +2 -2
- package/dist/types/lib/utils/ethersTypes.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LexLensService = void 0;
|
|
4
|
+
const LexLens__factory_1 = require("../../typechain/factories/contracts/Peripheral/Lens/LexLens__factory");
|
|
5
|
+
const ethersTypes_1 = require("../../utils/ethersTypes");
|
|
6
|
+
const ILexLensService_1 = require("./ILexLensService");
|
|
7
|
+
class LexLensService {
|
|
8
|
+
constructor(signerOrProvider, contractAddress) {
|
|
9
|
+
this.contract = LexLens__factory_1.LexLens__factory.connect(contractAddress, signerOrProvider);
|
|
10
|
+
}
|
|
11
|
+
async getAllFeeConfigurationsInLex(lexPool) {
|
|
12
|
+
const result = await this.contract.getAllFeeConfigurationsInLex(lexPool);
|
|
13
|
+
// First convert array, then handle special number conversions
|
|
14
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_FEE_CONFIGS_LENS);
|
|
15
|
+
return baseArray.map(item => ({
|
|
16
|
+
...item,
|
|
17
|
+
feeId: Number(item.feeId),
|
|
18
|
+
openFeeF: Number(item.openFeeF),
|
|
19
|
+
closeFeeF: Number(item.closeFeeF),
|
|
20
|
+
performanceFeeF: Number(item.performanceFeeF),
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
async getAllGroupConfigurationsInLex(lexPool) {
|
|
24
|
+
const result = await this.contract.getAllGroupConfigurationsInLex(lexPool);
|
|
25
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS);
|
|
26
|
+
return baseArray.map(item => ({
|
|
27
|
+
...item,
|
|
28
|
+
groupId: Number(item.groupId),
|
|
29
|
+
maxBorrowF: Number(item.maxBorrowF),
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
async getAllGroupStateInLex(lexPool) {
|
|
33
|
+
const result = await this.contract.getAllGroupStateInLex(lexPool);
|
|
34
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS);
|
|
35
|
+
return baseArray.map(item => ({
|
|
36
|
+
...item,
|
|
37
|
+
groupId: Number(item.groupId),
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
async getAllPairAndGroupAndFeeConfigurationsInLex(lexPool) {
|
|
41
|
+
return await this.contract.getAllPairAndGroupAndFeeConfigurationsInLex(lexPool);
|
|
42
|
+
}
|
|
43
|
+
async getAllPairConfigurationsInLex(lexPool) {
|
|
44
|
+
const result = await this.contract.getAllPairConfigurationsInLex(lexPool);
|
|
45
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS);
|
|
46
|
+
return baseArray.map(item => ({
|
|
47
|
+
...item,
|
|
48
|
+
pairId: Number(item.pairId),
|
|
49
|
+
groupId: Number(item.groupId),
|
|
50
|
+
feeId: Number(item.feeId),
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
async getAllPairStateInLex(lexPool) {
|
|
54
|
+
const result = await this.contract.getAllPairStateInLex(lexPool);
|
|
55
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS);
|
|
56
|
+
return baseArray.map(item => ({
|
|
57
|
+
...item,
|
|
58
|
+
pairId: Number(item.pairId),
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
async getCompleteConfigsForLex(pool) {
|
|
62
|
+
const result = await this.contract.getCompleteConfigsForLex(pool);
|
|
63
|
+
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_CONFIGS, {
|
|
64
|
+
groupsConfigs: ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS,
|
|
65
|
+
pairsConfigs: ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS,
|
|
66
|
+
feesConfigs: ILexLensService_1.EMPTY_FEE_CONFIGS_LENS,
|
|
67
|
+
}, {
|
|
68
|
+
lexPoolParams: ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS,
|
|
69
|
+
lexPoolConfigurations: ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS,
|
|
70
|
+
poolAccountantConfigurations: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS,
|
|
71
|
+
});
|
|
72
|
+
// Apply number conversions
|
|
73
|
+
return {
|
|
74
|
+
...baseResult,
|
|
75
|
+
groupsConfigs: baseResult.groupsConfigs.map(item => ({
|
|
76
|
+
...item,
|
|
77
|
+
groupId: Number(item.groupId),
|
|
78
|
+
maxBorrowF: Number(item.maxBorrowF),
|
|
79
|
+
})),
|
|
80
|
+
pairsConfigs: baseResult.pairsConfigs.map(item => ({
|
|
81
|
+
...item,
|
|
82
|
+
pairId: Number(item.pairId),
|
|
83
|
+
groupId: Number(item.groupId),
|
|
84
|
+
feeId: Number(item.feeId),
|
|
85
|
+
})),
|
|
86
|
+
feesConfigs: baseResult.feesConfigs.map(item => ({
|
|
87
|
+
...item,
|
|
88
|
+
feeId: Number(item.feeId),
|
|
89
|
+
openFeeF: Number(item.openFeeF),
|
|
90
|
+
closeFeeF: Number(item.closeFeeF),
|
|
91
|
+
performanceFeeF: Number(item.performanceFeeF),
|
|
92
|
+
})),
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async getCompleteConfigsForLexes(pools) {
|
|
96
|
+
const results = await this.contract.getCompleteConfigsForLexes(pools);
|
|
97
|
+
return results.map(result => this.convertCompleteConfigsResult(result));
|
|
98
|
+
}
|
|
99
|
+
async getCompleteStateForLex(pool) {
|
|
100
|
+
const result = await this.contract.getCompleteStateForLex(pool);
|
|
101
|
+
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_STATE, {
|
|
102
|
+
pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
|
|
103
|
+
groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
|
|
104
|
+
}, {
|
|
105
|
+
lexPoolState: ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
|
|
106
|
+
poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
|
|
107
|
+
});
|
|
108
|
+
// Apply number conversions
|
|
109
|
+
return {
|
|
110
|
+
...baseResult,
|
|
111
|
+
pairsStates: baseResult.pairsStates.map(item => ({
|
|
112
|
+
...item,
|
|
113
|
+
pairId: Number(item.pairId),
|
|
114
|
+
})),
|
|
115
|
+
groupsStates: baseResult.groupsStates.map(item => ({
|
|
116
|
+
...item,
|
|
117
|
+
groupId: Number(item.groupId),
|
|
118
|
+
})),
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
async getCompleteStateForLexes(pools) {
|
|
122
|
+
const results = await this.contract.getCompleteStateForLexes(pools);
|
|
123
|
+
return results.map(result => {
|
|
124
|
+
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_STATE, {
|
|
125
|
+
pairsStates: ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS,
|
|
126
|
+
groupsStates: ILexLensService_1.EMPTY_LEX_GROUP_STATE_LENS,
|
|
127
|
+
}, {
|
|
128
|
+
lexPoolState: ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE,
|
|
129
|
+
poolAccountantState: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS,
|
|
130
|
+
});
|
|
131
|
+
// Apply number conversions
|
|
132
|
+
return {
|
|
133
|
+
...baseResult,
|
|
134
|
+
pairsStates: baseResult.pairsStates.map(item => ({
|
|
135
|
+
...item,
|
|
136
|
+
pairId: Number(item.pairId),
|
|
137
|
+
})),
|
|
138
|
+
groupsStates: baseResult.groupsStates.map(item => ({
|
|
139
|
+
...item,
|
|
140
|
+
groupId: Number(item.groupId),
|
|
141
|
+
})),
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
async getLExPoolForPoolAccountant(accountant) {
|
|
146
|
+
return await this.contract.getLExPoolForPoolAccountant(accountant);
|
|
147
|
+
}
|
|
148
|
+
async getLexPairState(lexPool, pairId) {
|
|
149
|
+
const result = await this.contract.getLexPairState(lexPool, BigInt(pairId));
|
|
150
|
+
const baseObj = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_PAIR_STATE_LENS);
|
|
151
|
+
return {
|
|
152
|
+
...baseObj,
|
|
153
|
+
pairId: Number(baseObj.pairId),
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
async getLexPoolConfigs(lexPool) {
|
|
157
|
+
const result = await this.contract.getLexPoolConfigs(lexPool);
|
|
158
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS);
|
|
159
|
+
}
|
|
160
|
+
async getLexPoolParams(lexPool) {
|
|
161
|
+
const result = await this.contract.getLexPoolParams(lexPool);
|
|
162
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS);
|
|
163
|
+
}
|
|
164
|
+
async getLexPoolState(lexPool) {
|
|
165
|
+
const result = await this.contract.getLexPoolState(lexPool);
|
|
166
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE);
|
|
167
|
+
}
|
|
168
|
+
async getLexPoolSupplierState(lexPool, supplier) {
|
|
169
|
+
const result = await this.contract.getLexPoolSupplierState(lexPool, supplier);
|
|
170
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE, {
|
|
171
|
+
pendingEpochDeposits: ILexLensService_1.EMPTY_PENDING_EPOCH_DEPOSIT,
|
|
172
|
+
pendingEpochRedeems: ILexLensService_1.EMPTY_PENDING_EPOCH_REDEEM,
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async getLexPoolsStateAll(lexPools) {
|
|
176
|
+
const results = await this.contract.getLexPoolsStateAll(lexPools);
|
|
177
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_LENS_STATE);
|
|
178
|
+
}
|
|
179
|
+
async getPoolAccountantConfigurationsByPool(lexPool) {
|
|
180
|
+
const result = await this.contract.getPoolAccountantConfigurationsByPool(lexPool);
|
|
181
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS);
|
|
182
|
+
}
|
|
183
|
+
async getPoolAccountantConfigurationsByPoolAll(lexPools) {
|
|
184
|
+
const results = await this.contract.getPoolAccountantConfigurationsByPoolAll(lexPools);
|
|
185
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS);
|
|
186
|
+
}
|
|
187
|
+
async getPoolAccountantForLexPool(lexPool) {
|
|
188
|
+
return await this.contract.getPoolAccountantForLexPool(lexPool);
|
|
189
|
+
}
|
|
190
|
+
async getPoolAccountantStateByPool(lexPool) {
|
|
191
|
+
const result = await this.contract.getPoolAccountantStateByPool(lexPool);
|
|
192
|
+
return (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS);
|
|
193
|
+
}
|
|
194
|
+
async getPoolAccountantStateByPoolAll(lexPools) {
|
|
195
|
+
const results = await this.contract.getPoolAccountantStateByPoolAll(lexPools);
|
|
196
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_POOL_ACCOUNTANT_STATE_LENS);
|
|
197
|
+
}
|
|
198
|
+
async getSupplierCurrentStateAll(lexPools, supplier) {
|
|
199
|
+
const results = await this.contract.getSupplierCurrentStateAll(lexPools, supplier);
|
|
200
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_LEX_POOL_SUPPLIER_LENS_STATE, {
|
|
201
|
+
pendingEpochDeposits: ILexLensService_1.EMPTY_PENDING_EPOCH_DEPOSIT,
|
|
202
|
+
pendingEpochRedeems: ILexLensService_1.EMPTY_PENDING_EPOCH_REDEEM,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async tradesValuesMultiplePairs(accountant, pairsTrades) {
|
|
206
|
+
// @ts-ignore
|
|
207
|
+
const results = await this.contract.tradesValuesMultiplePairs.staticCall(accountant, pairsTrades);
|
|
208
|
+
return results.map(pairResults => (0, ethersTypes_1.ethersStructResponseToArray)(pairResults, ILexLensService_1.EMPTY_SINGLE_POSITION_OUTPUT));
|
|
209
|
+
}
|
|
210
|
+
async tradesValuesSinglePair(accountant, pairParams) {
|
|
211
|
+
// @ts-ignore
|
|
212
|
+
const results = await this.contract.tradesValuesSinglePair.staticCall(accountant, pairParams);
|
|
213
|
+
return (0, ethersTypes_1.ethersStructResponseToArray)(results, ILexLensService_1.EMPTY_SINGLE_POSITION_OUTPUT);
|
|
214
|
+
}
|
|
215
|
+
// Helper methods
|
|
216
|
+
convertCompleteConfigsResult(result) {
|
|
217
|
+
const baseResult = (0, ethersTypes_1.ethersStructResponseToObject)(result, ILexLensService_1.EMPTY_COMPLETE_LEX_CONFIGS, {
|
|
218
|
+
groupsConfigs: ILexLensService_1.EMPTY_GROUP_CONFIGS_LENS,
|
|
219
|
+
pairsConfigs: ILexLensService_1.EMPTY_PAIR_CONFIGS_LENS,
|
|
220
|
+
feesConfigs: ILexLensService_1.EMPTY_FEE_CONFIGS_LENS,
|
|
221
|
+
}, {
|
|
222
|
+
lexPoolParams: ILexLensService_1.EMPTY_LEX_POOL_LENS_PARAMS,
|
|
223
|
+
lexPoolConfigurations: ILexLensService_1.EMPTY_LEX_POOL_LENS_CONFIGS,
|
|
224
|
+
poolAccountantConfigurations: ILexLensService_1.EMPTY_POOL_ACCOUNTANT_CONFIGURATIONS_LENS,
|
|
225
|
+
});
|
|
226
|
+
// Apply number conversions
|
|
227
|
+
return {
|
|
228
|
+
...baseResult,
|
|
229
|
+
groupsConfigs: baseResult.groupsConfigs.map(item => ({
|
|
230
|
+
...item,
|
|
231
|
+
groupId: Number(item.groupId),
|
|
232
|
+
maxBorrowF: Number(item.maxBorrowF),
|
|
233
|
+
})),
|
|
234
|
+
pairsConfigs: baseResult.pairsConfigs.map(item => ({
|
|
235
|
+
...item,
|
|
236
|
+
pairId: Number(item.pairId),
|
|
237
|
+
groupId: Number(item.groupId),
|
|
238
|
+
feeId: Number(item.feeId),
|
|
239
|
+
})),
|
|
240
|
+
feesConfigs: baseResult.feesConfigs.map(item => ({
|
|
241
|
+
...item,
|
|
242
|
+
feeId: Number(item.feeId),
|
|
243
|
+
openFeeF: Number(item.openFeeF),
|
|
244
|
+
closeFeeF: Number(item.closeFeeF),
|
|
245
|
+
performanceFeeF: Number(item.performanceFeeF),
|
|
246
|
+
})),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
exports.LexLensService = LexLensService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/LexLensService/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ILexLensService"), exports);
|
|
18
|
+
__exportStar(require("./LexLensService"), exports);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BytesLike, BigNumberish, AddressLike, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import { OrderBookStructsV1 } from "../../typechain/contracts/Lynx/OrderBook/OrderBookV1";
|
|
3
|
+
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
4
|
+
type UpdatePositionFieldOrderStruct = OrderBookStructsV1.UpdatePositionFieldOrderStruct;
|
|
5
|
+
export type TUpdatePositionFieldOrderStruct = TSafeBigNumberStruct<UpdatePositionFieldOrderStruct>;
|
|
6
|
+
export interface IOrderBookFunctionsGroup_OrderManagement {
|
|
7
|
+
getAllPendingUpdateOrderIds(): Promise<string[]>;
|
|
8
|
+
allPendingUpdateOrderIds(index: BigNumberish): Promise<string>;
|
|
9
|
+
pendingUpdateTradeFieldOrdersById(positionId: BytesLike): Promise<TUpdatePositionFieldOrderStruct>;
|
|
10
|
+
readAndDeleteUpdatePositionOrder(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
11
|
+
storeUpdatePositionDoubleFieldOrder(positionId: BytesLike, orderType: BigNumberish, fieldValueA: BigNumberish, fieldValueB: BigNumberish): Promise<ContractTransactionResponse>;
|
|
12
|
+
storeUpdatePositionSingleFieldOrder(positionId: BytesLike, orderType: BigNumberish, fieldValue: BigNumberish): Promise<ContractTransactionResponse>;
|
|
13
|
+
updateOrderIdPositionInList(positionId: BytesLike): Promise<bigint>;
|
|
14
|
+
}
|
|
15
|
+
export interface IOrderBookFunctionsGroup_ContractInfo {
|
|
16
|
+
registry(): Promise<string>;
|
|
17
|
+
tradingFloor(): Promise<string>;
|
|
18
|
+
admin(): Promise<string>;
|
|
19
|
+
pendingAdmin(): Promise<string>;
|
|
20
|
+
implementation(): Promise<string>;
|
|
21
|
+
pendingImplementation(): Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
export interface IOrderBookFunctionsGroup_Administration {
|
|
24
|
+
setTradingFloor(tradingFloor: AddressLike): Promise<ContractTransactionResponse>;
|
|
25
|
+
_become(orderBookProxy: AddressLike): Promise<ContractTransactionResponse>;
|
|
26
|
+
}
|
|
27
|
+
export interface IOrderBookFunctionsGroup_Constants {
|
|
28
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
29
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
30
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
31
|
+
PRECISION(): Promise<bigint>;
|
|
32
|
+
}
|
|
33
|
+
export interface IOrderBookService {
|
|
34
|
+
orderManagement: IOrderBookFunctionsGroup_OrderManagement;
|
|
35
|
+
contractInfo: IOrderBookFunctionsGroup_ContractInfo;
|
|
36
|
+
administration: IOrderBookFunctionsGroup_Administration;
|
|
37
|
+
constants: IOrderBookFunctionsGroup_Constants;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=IOrderBookService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IOrderBookService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OrderBookService/IOrderBookService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,KAAK,8BAA8B,GAAG,kBAAkB,CAAC,8BAA8B,CAAC;AAExF,MAAM,MAAM,+BAA+B,GAAG,oBAAoB,CAAC,8BAA8B,CAAC,CAAC;AAEnG,MAAM,WAAW,wCAAwC;IACvD,2BAA2B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,wBAAwB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/D,iCAAiC,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACnG,gCAAgC,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAC9F,mCAAmC,CACjC,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,YAAY,EACzB,WAAW,EAAE,YAAY,GACxB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxC,mCAAmC,CACjC,UAAU,EAAE,SAAS,EACrB,SAAS,EAAE,YAAY,EACvB,UAAU,EAAE,YAAY,GACvB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxC,2BAA2B,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,qCAAqC;IACpD,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,uCAAuC;IACtD,eAAe,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACjF,OAAO,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,kCAAkC;IACjD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,wCAAwC,CAAC;IAC1D,YAAY,EAAE,qCAAqC,CAAC;IACpD,cAAc,EAAE,uCAAuC,CAAC;IACxD,SAAS,EAAE,kCAAkC,CAAC;CAC/C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Signer, Provider } from "ethers";
|
|
2
|
+
import { IOrderBookService, IOrderBookFunctionsGroup_OrderManagement, IOrderBookFunctionsGroup_ContractInfo, IOrderBookFunctionsGroup_Administration, IOrderBookFunctionsGroup_Constants } from "./IOrderBookService";
|
|
3
|
+
export declare class OrderBookService implements IOrderBookService {
|
|
4
|
+
private signerOrProvider;
|
|
5
|
+
private orderBookContract;
|
|
6
|
+
readonly orderManagement: IOrderBookFunctionsGroup_OrderManagement;
|
|
7
|
+
readonly contractInfo: IOrderBookFunctionsGroup_ContractInfo;
|
|
8
|
+
readonly administration: IOrderBookFunctionsGroup_Administration;
|
|
9
|
+
readonly constants: IOrderBookFunctionsGroup_Constants;
|
|
10
|
+
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=OrderBookService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrderBookService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OrderBookService/OrderBookService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,QAAQ,EAKT,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,iBAAiB,EACjB,wCAAwC,EACxC,qCAAqC,EACrC,uCAAuC,EACvC,kCAAkC,EAEnC,MAAM,qBAAqB,CAAC;AAwH7B,qBAAa,gBAAiB,YAAW,iBAAiB;IAStD,OAAO,CAAC,gBAAgB;IAR1B,OAAO,CAAC,iBAAiB,CAAc;IACvC,SAAgB,eAAe,EAAE,wCAAwC,CAAC;IAC1E,SAAgB,YAAY,EAAE,qCAAqC,CAAC;IACpE,SAAgB,cAAc,EAAE,uCAAuC,CAAC;IACxE,SAAgB,SAAS,EAAE,kCAAkC,CAAC;gBAG5D,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAY9C"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrderBookService = void 0;
|
|
4
|
+
const OrderBookV1__factory_1 = require("../../typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory");
|
|
5
|
+
class OrderManagement {
|
|
6
|
+
constructor(orderBookContract) {
|
|
7
|
+
this.orderBookContract = orderBookContract;
|
|
8
|
+
}
|
|
9
|
+
async getAllPendingUpdateOrderIds() {
|
|
10
|
+
return this.orderBookContract.getAllPendingUpdateOrderIds();
|
|
11
|
+
}
|
|
12
|
+
async allPendingUpdateOrderIds(index) {
|
|
13
|
+
return this.orderBookContract.allPendingUpdateOrderIds(index);
|
|
14
|
+
}
|
|
15
|
+
async pendingUpdateTradeFieldOrdersById(positionId) {
|
|
16
|
+
return this.orderBookContract.pendingUpdateTradeFieldOrdersById(positionId);
|
|
17
|
+
}
|
|
18
|
+
async readAndDeleteUpdatePositionOrder(positionId) {
|
|
19
|
+
return this.orderBookContract.readAndDeleteUpdatePositionOrder(positionId);
|
|
20
|
+
}
|
|
21
|
+
async storeUpdatePositionDoubleFieldOrder(positionId, orderType, fieldValueA, fieldValueB) {
|
|
22
|
+
return this.orderBookContract.storeUpdatePositionDoubleFieldOrder(positionId, orderType, fieldValueA, fieldValueB);
|
|
23
|
+
}
|
|
24
|
+
async storeUpdatePositionSingleFieldOrder(positionId, orderType, fieldValue) {
|
|
25
|
+
return this.orderBookContract.storeUpdatePositionSingleFieldOrder(positionId, orderType, fieldValue);
|
|
26
|
+
}
|
|
27
|
+
async updateOrderIdPositionInList(positionId) {
|
|
28
|
+
return this.orderBookContract.updateOrderIdPositionInList(positionId);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class ContractInfo {
|
|
32
|
+
constructor(orderBookContract) {
|
|
33
|
+
this.orderBookContract = orderBookContract;
|
|
34
|
+
}
|
|
35
|
+
async registry() {
|
|
36
|
+
return this.orderBookContract.registry();
|
|
37
|
+
}
|
|
38
|
+
async tradingFloor() {
|
|
39
|
+
return this.orderBookContract.tradingFloor();
|
|
40
|
+
}
|
|
41
|
+
async admin() {
|
|
42
|
+
return this.orderBookContract.admin();
|
|
43
|
+
}
|
|
44
|
+
async pendingAdmin() {
|
|
45
|
+
return this.orderBookContract.pendingAdmin();
|
|
46
|
+
}
|
|
47
|
+
async implementation() {
|
|
48
|
+
return this.orderBookContract.implementation();
|
|
49
|
+
}
|
|
50
|
+
async pendingImplementation() {
|
|
51
|
+
return this.orderBookContract.pendingImplementation();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
class Administration {
|
|
55
|
+
constructor(orderBookContract) {
|
|
56
|
+
this.orderBookContract = orderBookContract;
|
|
57
|
+
}
|
|
58
|
+
async setTradingFloor(tradingFloor) {
|
|
59
|
+
return this.orderBookContract.setTradingFloor(tradingFloor);
|
|
60
|
+
}
|
|
61
|
+
async _become(orderBookProxy) {
|
|
62
|
+
return this.orderBookContract._become(orderBookProxy);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
class Constants {
|
|
66
|
+
constructor(orderBookContract) {
|
|
67
|
+
this.orderBookContract = orderBookContract;
|
|
68
|
+
}
|
|
69
|
+
async ACCURACY_IMPROVEMENT_SCALE() {
|
|
70
|
+
return this.orderBookContract.ACCURACY_IMPROVEMENT_SCALE();
|
|
71
|
+
}
|
|
72
|
+
async FRACTION_SCALE() {
|
|
73
|
+
return this.orderBookContract.FRACTION_SCALE();
|
|
74
|
+
}
|
|
75
|
+
async LEVERAGE_SCALE() {
|
|
76
|
+
return this.orderBookContract.LEVERAGE_SCALE();
|
|
77
|
+
}
|
|
78
|
+
async PRECISION() {
|
|
79
|
+
return this.orderBookContract.PRECISION();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
class OrderBookService {
|
|
83
|
+
constructor(address, signerOrProvider) {
|
|
84
|
+
this.signerOrProvider = signerOrProvider;
|
|
85
|
+
this.orderBookContract = OrderBookV1__factory_1.OrderBookV1__factory.connect(address, signerOrProvider);
|
|
86
|
+
this.orderManagement = new OrderManagement(this.orderBookContract);
|
|
87
|
+
this.contractInfo = new ContractInfo(this.orderBookContract);
|
|
88
|
+
this.administration = new Administration(this.orderBookContract);
|
|
89
|
+
this.constants = new Constants(this.orderBookContract);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.OrderBookService = OrderBookService;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BytesLike, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import { TOpenOrderType, TUpdatePositionFieldOrderType } from "../../constants/contractEnums";
|
|
3
|
+
import { TradingFloorStructsV1 } from "../../typechain/contracts/Lynx/TradingFloor/TradingFloorV1";
|
|
4
|
+
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
5
|
+
type PositionRequestIdentifierStruct = TradingFloorStructsV1.PositionRequestIdentifiersStruct;
|
|
6
|
+
type PositionRequestParamsStruct = TradingFloorStructsV1.PositionRequestParamsStruct;
|
|
7
|
+
export type TPositionRequestIdentifierStruct = TSafeBigNumberStruct<PositionRequestIdentifierStruct>;
|
|
8
|
+
export type TPositionRequestParamsStruct = TSafeBigNumberStruct<PositionRequestParamsStruct>;
|
|
9
|
+
export interface ITradersPortalFunctionsGroup_TraderRequests {
|
|
10
|
+
openNewPosition(tradeRequestIdentifier: TPositionRequestIdentifierStruct, tradeRequestParams: TPositionRequestParamsStruct, orderType: TOpenOrderType, referrerDomain: BytesLike, referrerCode: BytesLike, runCapTests: boolean, nativeFee: bigint, staticCall?: boolean): Promise<ContractTransactionResponse>;
|
|
11
|
+
setExistingPositionToMarketClose(positionId: BytesLike, minPrice: bigint, maxPrice: bigint, nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
12
|
+
updatePositionSingleField(positionId: BytesLike, orderType: TUpdatePositionFieldOrderType, fieldValue: bigint, nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
13
|
+
updatePositionDoubleFieldTpAndSl(positionId: BytesLike, tpValue: bigint, slValue: bigint, nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
14
|
+
}
|
|
15
|
+
export interface ITradersPortalFunctionsGroup_DirectActions {
|
|
16
|
+
timeoutOpenMarket(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
17
|
+
timeoutCloseMarket(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
18
|
+
cancelPendingPositionLimit(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
19
|
+
cancelPendingUpdatePositionField(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
20
|
+
updatePendingPositionLimit(positionId: BytesLike, minPrice: bigint, maxPrice: bigint, tp: bigint, sl: bigint): Promise<ContractTransactionResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface ITradersPortalFunctionsGroup_ContractInfo {
|
|
23
|
+
getContractName(): Promise<string>;
|
|
24
|
+
getContractVersion(): Promise<string>;
|
|
25
|
+
getOrderBook(): Promise<string>;
|
|
26
|
+
getTradeIntentsVerifier(): Promise<string>;
|
|
27
|
+
registry(): Promise<string>;
|
|
28
|
+
tradingFloor(): Promise<string>;
|
|
29
|
+
admin(): Promise<string>;
|
|
30
|
+
pendingAdmin(): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
export interface ITradersPortalFunctionsGroup_Status {
|
|
33
|
+
isDone(): Promise<boolean>;
|
|
34
|
+
isLimitingMarketClosePriceRange(): Promise<boolean>;
|
|
35
|
+
isPaused(): Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
export interface ITradersPortalFunctionsGroup_Settings {
|
|
38
|
+
limitOrdersTimelock(): Promise<bigint>;
|
|
39
|
+
marketOrdersTimeout(): Promise<bigint>;
|
|
40
|
+
minLiveTimeForMarketClose(): Promise<bigint>;
|
|
41
|
+
actionFees(actionType: bigint): Promise<bigint>;
|
|
42
|
+
}
|
|
43
|
+
export interface ITradersPortalFunctionsGroup_Constants {
|
|
44
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
45
|
+
CONTRACT_NAME(): Promise<string>;
|
|
46
|
+
CONTRACT_VERSION(): Promise<string>;
|
|
47
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
48
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
49
|
+
NATIVE_UNDERLYING_ADDRESS(): Promise<string>;
|
|
50
|
+
PRECISION(): Promise<bigint>;
|
|
51
|
+
}
|
|
52
|
+
export interface ITradersPortalService {
|
|
53
|
+
traderRequests: ITradersPortalFunctionsGroup_TraderRequests;
|
|
54
|
+
directActions: ITradersPortalFunctionsGroup_DirectActions;
|
|
55
|
+
contractInfo: ITradersPortalFunctionsGroup_ContractInfo;
|
|
56
|
+
status: ITradersPortalFunctionsGroup_Status;
|
|
57
|
+
settings: ITradersPortalFunctionsGroup_Settings;
|
|
58
|
+
constants: ITradersPortalFunctionsGroup_Constants;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=ITradersPortalService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITradersPortalService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradersPortalService/ITradersPortalService.ts"],"names":[],"mappings":"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"}
|
package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Signer, Provider } from "ethers";
|
|
2
|
+
import { ITradersPortalService, ITradersPortalFunctionsGroup_TraderRequests, ITradersPortalFunctionsGroup_DirectActions, ITradersPortalFunctionsGroup_ContractInfo, ITradersPortalFunctionsGroup_Status, ITradersPortalFunctionsGroup_Settings, ITradersPortalFunctionsGroup_Constants } from "./ITradersPortalService";
|
|
3
|
+
export declare class TradersPortalServiceService implements ITradersPortalService {
|
|
4
|
+
private signerOrProvider;
|
|
5
|
+
private tradingContract;
|
|
6
|
+
readonly traderRequests: ITradersPortalFunctionsGroup_TraderRequests;
|
|
7
|
+
readonly directActions: ITradersPortalFunctionsGroup_DirectActions;
|
|
8
|
+
readonly contractInfo: ITradersPortalFunctionsGroup_ContractInfo;
|
|
9
|
+
readonly status: ITradersPortalFunctionsGroup_Status;
|
|
10
|
+
readonly settings: ITradersPortalFunctionsGroup_Settings;
|
|
11
|
+
readonly constants: ITradersPortalFunctionsGroup_Constants;
|
|
12
|
+
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=TradersPortalServiceService.d.ts.map
|
package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradersPortalServiceService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AAGhB,OAAO,EACL,qBAAqB,EACrB,2CAA2C,EAC3C,0CAA0C,EAC1C,yCAAyC,EACzC,mCAAmC,EACnC,qCAAqC,EACrC,sCAAsC,EAGvC,MAAM,yBAAyB,CAAC;AA4PjC,qBAAa,2BAA4B,YAAW,qBAAqB;IAWrE,OAAO,CAAC,gBAAgB;IAV1B,OAAO,CAAC,eAAe,CAAkB;IACzC,SAAgB,cAAc,EAAE,2CAA2C,CAAC;IAC5E,SAAgB,aAAa,EAAE,0CAA0C,CAAC;IAC1E,SAAgB,YAAY,EAAE,yCAAyC,CAAC;IACxE,SAAgB,MAAM,EAAE,mCAAmC,CAAC;IAC5D,SAAgB,QAAQ,EAAE,qCAAqC,CAAC;IAChE,SAAgB,SAAS,EAAE,sCAAsC,CAAC;gBAGhE,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAc9C"}
|