lynx-client 0.0.1-beta.9 → 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 +1 -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.map +1 -1
- package/dist/esm/lib/constants/contractEnums.js +1 -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.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,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS = exports.EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS = exports.EMPTY_PAIR_CONFIGS_IN_TRIGGERS = void 0;
|
|
4
|
+
exports.EMPTY_PAIR_CONFIGS_IN_TRIGGERS = {
|
|
5
|
+
pairId: 0,
|
|
6
|
+
maxConfidenceFraction: 0,
|
|
7
|
+
spreadFraction: 0,
|
|
8
|
+
};
|
|
9
|
+
exports.EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS = {
|
|
10
|
+
limitOrdersTimelock: 0,
|
|
11
|
+
marketOrdersTimeout: 0,
|
|
12
|
+
isLimitingMarketClosePriceRange: false,
|
|
13
|
+
nativeFeeForPositionOpenRequest: 0n,
|
|
14
|
+
nativeFeeForMarketCloseRequest: 0n,
|
|
15
|
+
nativeFeeForSingleFieldUpdateRequest: 0n,
|
|
16
|
+
nativeFeeForDoubleFieldUpdateRequest: 0n,
|
|
17
|
+
minLiveTimeForMarketClose: 0,
|
|
18
|
+
};
|
|
19
|
+
exports.EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS = {
|
|
20
|
+
minTriggerPeriodForMarketOrders: 0,
|
|
21
|
+
maxTriggerPeriodForMarketOrders: 0,
|
|
22
|
+
marketOrdersTimeout: 0,
|
|
23
|
+
marketOrderTightTimeRange: 0,
|
|
24
|
+
minTriggerPeriodForLimitOrders: 0,
|
|
25
|
+
triggerPriceFreshnessTimeRange: 0,
|
|
26
|
+
marketOrderCancelFeeFraction: 0,
|
|
27
|
+
openPositionCancellationFeeFraction: 0,
|
|
28
|
+
maxTriggersPerBlock: 0,
|
|
29
|
+
permissionedTriggerAccounts: [],
|
|
30
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Provider, Signer } from "ethers";
|
|
2
|
+
import { ITriggersAndPortalLensService, TPairConfigsInTriggersStruct, TCompleteTradersPortalConfigurationsStruct, TCompleteTriggerConfigurationsStruct } from "./ITriggersAndPortalLensService";
|
|
3
|
+
export declare class TriggersAndPortalLensService implements ITriggersAndPortalLensService {
|
|
4
|
+
private readonly contract;
|
|
5
|
+
constructor(signerOrProvider: Signer | Provider, address: string);
|
|
6
|
+
getPairConfigsInTriggers(triggers: string, pairId: number): Promise<TPairConfigsInTriggersStruct>;
|
|
7
|
+
getPairsConfigsInTriggers(triggers: string, pairIds: number[]): Promise<TPairConfigsInTriggersStruct[]>;
|
|
8
|
+
getTradersPortalConfigurations(tradersPortal: string): Promise<TCompleteTradersPortalConfigurationsStruct>;
|
|
9
|
+
getTriggersConfigurations(triggers: string): Promise<TCompleteTriggerConfigurationsStruct>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=TriggersAndPortalLensService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TriggersAndPortalLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAI1C,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,0CAA0C,EAC1C,oCAAoC,EAIrC,MAAM,iCAAiC,CAAC;AAEzC,qBAAa,4BAA6B,YAAW,6BAA6B;IAChF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;gBAErC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM;IAI1D,wBAAwB,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,4BAA4B,CAAC;IAWlC,yBAAyB,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,4BAA4B,EAAE,CAAC;IAcpC,8BAA8B,CAClC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,0CAA0C,CAAC;IAWhD,yBAAyB,CAC7B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,oCAAoC,CAAC;CAgBjD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TriggersAndPortalLensService = void 0;
|
|
4
|
+
const TriggersAndPortalLens__factory_1 = require("../../typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory");
|
|
5
|
+
const ethersTypes_1 = require("../../utils/ethersTypes");
|
|
6
|
+
const ITriggersAndPortalLensService_1 = require("./ITriggersAndPortalLensService");
|
|
7
|
+
class TriggersAndPortalLensService {
|
|
8
|
+
constructor(signerOrProvider, address) {
|
|
9
|
+
this.contract = TriggersAndPortalLens__factory_1.TriggersAndPortalLens__factory.connect(address, signerOrProvider);
|
|
10
|
+
}
|
|
11
|
+
async getPairConfigsInTriggers(triggers, pairId) {
|
|
12
|
+
const result = await this.contract.getPairConfigsInTriggers(triggers, BigInt(pairId));
|
|
13
|
+
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_PAIR_CONFIGS_IN_TRIGGERS);
|
|
14
|
+
return {
|
|
15
|
+
...baseStruct,
|
|
16
|
+
pairId: Number(baseStruct.pairId),
|
|
17
|
+
maxConfidenceFraction: Number(baseStruct.maxConfidenceFraction),
|
|
18
|
+
spreadFraction: Number(baseStruct.spreadFraction),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
async getPairsConfigsInTriggers(triggers, pairIds) {
|
|
22
|
+
const result = await this.contract.getPairsConfigsInTriggers(triggers, pairIds.map(id => BigInt(id)));
|
|
23
|
+
const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ITriggersAndPortalLensService_1.EMPTY_PAIR_CONFIGS_IN_TRIGGERS);
|
|
24
|
+
return baseArray.map(item => ({
|
|
25
|
+
...item,
|
|
26
|
+
pairId: Number(item.pairId),
|
|
27
|
+
maxConfidenceFraction: Number(item.maxConfidenceFraction),
|
|
28
|
+
spreadFraction: Number(item.spreadFraction),
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
async getTradersPortalConfigurations(tradersPortal) {
|
|
32
|
+
const result = await this.contract.getTradersPortalConfigurations(tradersPortal);
|
|
33
|
+
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS);
|
|
34
|
+
return {
|
|
35
|
+
...baseStruct,
|
|
36
|
+
limitOrdersTimelock: Number(baseStruct.limitOrdersTimelock),
|
|
37
|
+
marketOrdersTimeout: Number(baseStruct.marketOrdersTimeout),
|
|
38
|
+
minLiveTimeForMarketClose: Number(baseStruct.minLiveTimeForMarketClose),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
async getTriggersConfigurations(triggers) {
|
|
42
|
+
const result = await this.contract.getTriggersConfigurations(triggers);
|
|
43
|
+
const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS);
|
|
44
|
+
return {
|
|
45
|
+
...baseStruct,
|
|
46
|
+
minTriggerPeriodForMarketOrders: Number(baseStruct.minTriggerPeriodForMarketOrders),
|
|
47
|
+
maxTriggerPeriodForMarketOrders: Number(baseStruct.maxTriggerPeriodForMarketOrders),
|
|
48
|
+
marketOrdersTimeout: Number(baseStruct.marketOrdersTimeout),
|
|
49
|
+
marketOrderTightTimeRange: Number(baseStruct.marketOrderTightTimeRange),
|
|
50
|
+
minTriggerPeriodForLimitOrders: Number(baseStruct.minTriggerPeriodForLimitOrders),
|
|
51
|
+
triggerPriceFreshnessTimeRange: Number(baseStruct.triggerPriceFreshnessTimeRange),
|
|
52
|
+
marketOrderCancelFeeFraction: Number(baseStruct.marketOrderCancelFeeFraction),
|
|
53
|
+
openPositionCancellationFeeFraction: Number(baseStruct.openPositionCancellationFeeFraction),
|
|
54
|
+
maxTriggersPerBlock: Number(baseStruct.maxTriggersPerBlock),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.TriggersAndPortalLensService = TriggersAndPortalLensService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersAndPortalLensService/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,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("./ITriggersAndPortalLensService"), exports);
|
|
18
|
+
__exportStar(require("./TriggersAndPortalLensService"), exports);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { BytesLike, ContractTransactionResponse } from "ethers";
|
|
2
|
+
export interface ITriggersFunctionsGroup_OpenTriggers {
|
|
3
|
+
market(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
4
|
+
limit(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
5
|
+
}
|
|
6
|
+
export interface ITriggersFunctionsGroup_CloseTriggers {
|
|
7
|
+
market(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
8
|
+
takeProfit(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
9
|
+
stopLoss(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
10
|
+
liquidation(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface ITriggersFunctionsGroup_UpdateTriggers {
|
|
13
|
+
takeProfit(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
14
|
+
stopLoss(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
15
|
+
takeProfitAndStopLoss(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
16
|
+
}
|
|
17
|
+
export interface ITriggersFunctionsGroup_TimeoutTriggers {
|
|
18
|
+
marketOpen(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
19
|
+
marketClose(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
20
|
+
updatePosition(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
21
|
+
}
|
|
22
|
+
export interface ITriggersFunctionsGroup_ContractInfo {
|
|
23
|
+
admin(): Promise<string>;
|
|
24
|
+
pendingAdmin(): Promise<string>;
|
|
25
|
+
orderBook(): Promise<string>;
|
|
26
|
+
tradingFloor(): Promise<string>;
|
|
27
|
+
priceValidator(): Promise<string>;
|
|
28
|
+
}
|
|
29
|
+
export interface ITriggersFunctionsGroup_Status {
|
|
30
|
+
isDone(): Promise<boolean>;
|
|
31
|
+
isPaused(): Promise<boolean>;
|
|
32
|
+
}
|
|
33
|
+
export interface ITriggersFunctionsGroup_Configuration {
|
|
34
|
+
marketOrderCancelFeeFraction(): Promise<bigint>;
|
|
35
|
+
marketOrderTightTimeRange(): Promise<bigint>;
|
|
36
|
+
marketOrdersTimeout(): Promise<bigint>;
|
|
37
|
+
maxTriggerPeriodForMarketOrders(): Promise<bigint>;
|
|
38
|
+
minTriggerPeriodForLimitOrders(): Promise<bigint>;
|
|
39
|
+
minTriggerPeriodForMarketOrders(): Promise<bigint>;
|
|
40
|
+
openPositionCancellationFeeFraction(): Promise<bigint>;
|
|
41
|
+
triggerPriceFreshnessTimeRange(): Promise<bigint>;
|
|
42
|
+
maxTriggersPerBlock(): Promise<bigint>;
|
|
43
|
+
triggersPerBlock(blockNumber: bigint): Promise<bigint>;
|
|
44
|
+
}
|
|
45
|
+
export interface ITriggersFunctionsGroup_PairConfiguration {
|
|
46
|
+
maxConfidenceFractionForPair(pairId: bigint): Promise<bigint>;
|
|
47
|
+
spreadFractionForPair(pairId: bigint): Promise<bigint>;
|
|
48
|
+
}
|
|
49
|
+
export interface ITriggersFunctionsGroup_Permissions {
|
|
50
|
+
isAllowedToTrigger(account: string): Promise<boolean>;
|
|
51
|
+
getAllTriggerPermissionedAccounts(): Promise<string[]>;
|
|
52
|
+
}
|
|
53
|
+
export interface ITriggersFunctionsGroup_Constants {
|
|
54
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
55
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
56
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
57
|
+
MAX_ALLOWED_CONFIDENCE_FRACTION(): Promise<bigint>;
|
|
58
|
+
MAX_ALLOWED_SPREAD_FRACTION(): Promise<bigint>;
|
|
59
|
+
PRECISION(): Promise<bigint>;
|
|
60
|
+
}
|
|
61
|
+
export interface ITriggersService {
|
|
62
|
+
openTriggers: ITriggersFunctionsGroup_OpenTriggers;
|
|
63
|
+
closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
|
|
64
|
+
updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
|
|
65
|
+
timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
|
|
66
|
+
contractInfo: ITriggersFunctionsGroup_ContractInfo;
|
|
67
|
+
status: ITriggersFunctionsGroup_Status;
|
|
68
|
+
configuration: ITriggersFunctionsGroup_Configuration;
|
|
69
|
+
pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
|
|
70
|
+
permissions: ITriggersFunctionsGroup_Permissions;
|
|
71
|
+
constants: ITriggersFunctionsGroup_Constants;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ITriggersService.d.ts.map
|
|
@@ -0,0 +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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AAC,MAAM,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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";
|
|
3
|
+
export declare class TriggersService implements ITriggersService {
|
|
4
|
+
private signerOrProvider;
|
|
5
|
+
private triggersContract;
|
|
6
|
+
readonly openTriggers: ITriggersFunctionsGroup_OpenTriggers;
|
|
7
|
+
readonly closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
|
|
8
|
+
readonly updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
|
|
9
|
+
readonly timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
|
|
10
|
+
readonly contractInfo: ITriggersFunctionsGroup_ContractInfo;
|
|
11
|
+
readonly status: ITriggersFunctionsGroup_Status;
|
|
12
|
+
readonly configuration: ITriggersFunctionsGroup_Configuration;
|
|
13
|
+
readonly pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
|
|
14
|
+
readonly permissions: ITriggersFunctionsGroup_Permissions;
|
|
15
|
+
readonly constants: ITriggersFunctionsGroup_Constants;
|
|
16
|
+
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=TriggersService.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TriggersService = void 0;
|
|
4
|
+
const TriggersV1__factory_1 = require("../../typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory");
|
|
5
|
+
class OpenTriggers {
|
|
6
|
+
constructor(triggersContract) {
|
|
7
|
+
this.triggersContract = triggersContract;
|
|
8
|
+
}
|
|
9
|
+
async market(positionId, pricePayload, nativeFee) {
|
|
10
|
+
return this.triggersContract.trigger_openTrade_market(positionId, pricePayload, { value: nativeFee });
|
|
11
|
+
}
|
|
12
|
+
async limit(positionId, pricePayload, nativeFee) {
|
|
13
|
+
return this.triggersContract.trigger_openTrade_limit(positionId, pricePayload, { value: nativeFee });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class CloseTriggers {
|
|
17
|
+
constructor(triggersContract) {
|
|
18
|
+
this.triggersContract = triggersContract;
|
|
19
|
+
}
|
|
20
|
+
async market(positionId, pricePayload, nativeFee) {
|
|
21
|
+
return this.triggersContract.trigger_closeTrade_market(positionId, pricePayload, { value: nativeFee });
|
|
22
|
+
}
|
|
23
|
+
async takeProfit(positionId, pricePayload, nativeFee) {
|
|
24
|
+
return this.triggersContract.trigger_closeTrade_TP(positionId, pricePayload, { value: nativeFee });
|
|
25
|
+
}
|
|
26
|
+
async stopLoss(positionId, pricePayload, nativeFee) {
|
|
27
|
+
return this.triggersContract.trigger_closeTrade_SL(positionId, pricePayload, { value: nativeFee });
|
|
28
|
+
}
|
|
29
|
+
async liquidation(positionId, pricePayload, nativeFee) {
|
|
30
|
+
return this.triggersContract.trigger_closeTrade_LIQ(positionId, pricePayload, { value: nativeFee });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
class UpdateTriggers {
|
|
34
|
+
constructor(triggersContract) {
|
|
35
|
+
this.triggersContract = triggersContract;
|
|
36
|
+
}
|
|
37
|
+
async takeProfit(positionId, pricePayload, nativeFee) {
|
|
38
|
+
return this.triggersContract.trigger_update_TP(positionId, pricePayload, { value: nativeFee });
|
|
39
|
+
}
|
|
40
|
+
async stopLoss(positionId, pricePayload, nativeFee) {
|
|
41
|
+
return this.triggersContract.trigger_update_SL(positionId, pricePayload, { value: nativeFee });
|
|
42
|
+
}
|
|
43
|
+
async takeProfitAndStopLoss(positionId, pricePayload, nativeFee) {
|
|
44
|
+
return this.triggersContract.trigger_update_TP_and_SL(positionId, pricePayload, { value: nativeFee });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
class TimeoutTriggers {
|
|
48
|
+
constructor(triggersContract) {
|
|
49
|
+
this.triggersContract = triggersContract;
|
|
50
|
+
}
|
|
51
|
+
async marketOpen(positionId) {
|
|
52
|
+
return this.triggersContract.trigger_timeout_marketOpen(positionId);
|
|
53
|
+
}
|
|
54
|
+
async marketClose(positionId) {
|
|
55
|
+
return this.triggersContract.trigger_timeout_marketClose(positionId);
|
|
56
|
+
}
|
|
57
|
+
async updatePosition(positionId) {
|
|
58
|
+
return this.triggersContract.trigger_timeout_updatePosition(positionId);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
class ContractInfo {
|
|
62
|
+
constructor(triggersContract) {
|
|
63
|
+
this.triggersContract = triggersContract;
|
|
64
|
+
}
|
|
65
|
+
async admin() {
|
|
66
|
+
return this.triggersContract.admin();
|
|
67
|
+
}
|
|
68
|
+
async pendingAdmin() {
|
|
69
|
+
return this.triggersContract.pendingAdmin();
|
|
70
|
+
}
|
|
71
|
+
async orderBook() {
|
|
72
|
+
return this.triggersContract.orderBook();
|
|
73
|
+
}
|
|
74
|
+
async tradingFloor() {
|
|
75
|
+
return this.triggersContract.tradingFloor();
|
|
76
|
+
}
|
|
77
|
+
async priceValidator() {
|
|
78
|
+
return this.triggersContract.priceValidator();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
class Status {
|
|
82
|
+
constructor(triggersContract) {
|
|
83
|
+
this.triggersContract = triggersContract;
|
|
84
|
+
}
|
|
85
|
+
async isDone() {
|
|
86
|
+
return this.triggersContract.isDone();
|
|
87
|
+
}
|
|
88
|
+
async isPaused() {
|
|
89
|
+
return this.triggersContract.isPaused();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
class Configuration {
|
|
93
|
+
constructor(triggersContract) {
|
|
94
|
+
this.triggersContract = triggersContract;
|
|
95
|
+
}
|
|
96
|
+
async marketOrderCancelFeeFraction() {
|
|
97
|
+
return this.triggersContract.marketOrderCancelFeeFraction();
|
|
98
|
+
}
|
|
99
|
+
async marketOrderTightTimeRange() {
|
|
100
|
+
return this.triggersContract.marketOrderTightTimeRange();
|
|
101
|
+
}
|
|
102
|
+
async marketOrdersTimeout() {
|
|
103
|
+
return this.triggersContract.marketOrdersTimeout();
|
|
104
|
+
}
|
|
105
|
+
async maxTriggerPeriodForMarketOrders() {
|
|
106
|
+
return this.triggersContract.maxTriggerPeriodForMarketOrders();
|
|
107
|
+
}
|
|
108
|
+
async minTriggerPeriodForLimitOrders() {
|
|
109
|
+
return this.triggersContract.minTriggerPeriodForLimitOrders();
|
|
110
|
+
}
|
|
111
|
+
async minTriggerPeriodForMarketOrders() {
|
|
112
|
+
return this.triggersContract.minTriggerPeriodForMarketOrders();
|
|
113
|
+
}
|
|
114
|
+
async openPositionCancellationFeeFraction() {
|
|
115
|
+
return this.triggersContract.openPositionCancellationFeeFraction();
|
|
116
|
+
}
|
|
117
|
+
async triggerPriceFreshnessTimeRange() {
|
|
118
|
+
return this.triggersContract.triggerPriceFreshnessTimeRange();
|
|
119
|
+
}
|
|
120
|
+
async maxTriggersPerBlock() {
|
|
121
|
+
return this.triggersContract.maxTriggersPerBlock();
|
|
122
|
+
}
|
|
123
|
+
async triggersPerBlock(blockNumber) {
|
|
124
|
+
return this.triggersContract.triggersPerBlock(blockNumber);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
class PairConfiguration {
|
|
128
|
+
constructor(triggersContract) {
|
|
129
|
+
this.triggersContract = triggersContract;
|
|
130
|
+
}
|
|
131
|
+
async maxConfidenceFractionForPair(pairId) {
|
|
132
|
+
return this.triggersContract.maxConfidenceFractionForPair(pairId);
|
|
133
|
+
}
|
|
134
|
+
async spreadFractionForPair(pairId) {
|
|
135
|
+
return this.triggersContract.spreadFractionForPair(pairId);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
class Permissions {
|
|
139
|
+
constructor(triggersContract) {
|
|
140
|
+
this.triggersContract = triggersContract;
|
|
141
|
+
}
|
|
142
|
+
async isAllowedToTrigger(account) {
|
|
143
|
+
return this.triggersContract.isAllowedToTrigger(account);
|
|
144
|
+
}
|
|
145
|
+
async getAllTriggerPermissionedAccounts() {
|
|
146
|
+
return this.triggersContract.getAllTriggerPermissionedAccounts();
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
class Constants {
|
|
150
|
+
constructor(triggersContract) {
|
|
151
|
+
this.triggersContract = triggersContract;
|
|
152
|
+
}
|
|
153
|
+
async ACCURACY_IMPROVEMENT_SCALE() {
|
|
154
|
+
return this.triggersContract.ACCURACY_IMPROVEMENT_SCALE();
|
|
155
|
+
}
|
|
156
|
+
async FRACTION_SCALE() {
|
|
157
|
+
return this.triggersContract.FRACTION_SCALE();
|
|
158
|
+
}
|
|
159
|
+
async LEVERAGE_SCALE() {
|
|
160
|
+
return this.triggersContract.LEVERAGE_SCALE();
|
|
161
|
+
}
|
|
162
|
+
async MAX_ALLOWED_CONFIDENCE_FRACTION() {
|
|
163
|
+
return this.triggersContract.MAX_ALLOWED_CONFIDENCE_FRACTION();
|
|
164
|
+
}
|
|
165
|
+
async MAX_ALLOWED_SPREAD_FRACTION() {
|
|
166
|
+
return this.triggersContract.MAX_ALLOWED_SPREAD_FRACTION();
|
|
167
|
+
}
|
|
168
|
+
async PRECISION() {
|
|
169
|
+
return this.triggersContract.PRECISION();
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
class TriggersService {
|
|
173
|
+
constructor(address, signerOrProvider) {
|
|
174
|
+
this.signerOrProvider = signerOrProvider;
|
|
175
|
+
this.triggersContract = TriggersV1__factory_1.TriggersV1__factory.connect(address, signerOrProvider);
|
|
176
|
+
this.openTriggers = new OpenTriggers(this.triggersContract);
|
|
177
|
+
this.closeTriggers = new CloseTriggers(this.triggersContract);
|
|
178
|
+
this.updateTriggers = new UpdateTriggers(this.triggersContract);
|
|
179
|
+
this.timeoutTriggers = new TimeoutTriggers(this.triggersContract);
|
|
180
|
+
this.contractInfo = new ContractInfo(this.triggersContract);
|
|
181
|
+
this.status = new Status(this.triggersContract);
|
|
182
|
+
this.configuration = new Configuration(this.triggersContract);
|
|
183
|
+
this.pairConfiguration = new PairConfiguration(this.triggersContract);
|
|
184
|
+
this.permissions = new Permissions(this.triggersContract);
|
|
185
|
+
this.constants = new Constants(this.triggersContract);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.TriggersService = TriggersService;
|
|
@@ -1,10 +1,49 @@
|
|
|
1
|
-
import { Provider } from "ethers";
|
|
1
|
+
import { Provider, Signer } from "ethers";
|
|
2
2
|
import { TradingFloorLens } from "../typechain/contracts/Peripheral/Lens/TradingFloorLens";
|
|
3
3
|
import { LexLens } from "../typechain/contracts/Peripheral/Lens/LexLens";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { RegistryProxy } from "../typechain/contracts/Lynx/Registry/RegistryProxy";
|
|
5
|
+
import { TradingFloorProxy } from "../typechain/contracts/Lynx/TradingFloor/TradingFloorProxy";
|
|
6
|
+
import { OrderBookProxy } from "../typechain/contracts/Lynx/OrderBook/OrderBookProxy";
|
|
7
|
+
import { RegistryV1 } from "../typechain/contracts/Lynx/Registry/RegistryV1";
|
|
8
|
+
import { TradingFloorV1 } from "../typechain/contracts/Lynx/TradingFloor/TradingFloorV1";
|
|
9
|
+
import { OrderBookV1 } from "../typechain/contracts/Lynx/OrderBook/OrderBookV1";
|
|
10
|
+
import { TradersPortalV1 } from "../typechain/contracts/Lynx/TradersPortal/TradersPortalV1";
|
|
11
|
+
import { TriggersV1 } from "../typechain/contracts/Lynx/Triggers/TriggersV1";
|
|
12
|
+
import { IntentsVerifierLensService } from "./IntentsVerifierLensService";
|
|
13
|
+
import { TriggersAndPortalLensService } from "./TriggersAndPortalLensService";
|
|
14
|
+
import { TradingFloorLensService } from "./TradingFloorLensService";
|
|
15
|
+
import { LexLensService } from "./LexLensService";
|
|
16
|
+
export declare function connectToRegistryProxyForSigner(signer: Signer, address: string): RegistryProxy;
|
|
17
|
+
/**
|
|
18
|
+
* To be used with the proxy address and the implementation ABI
|
|
19
|
+
*/
|
|
20
|
+
export declare function connectToLatestRegistryForSigner(signer: Signer, address: string): RegistryV1;
|
|
21
|
+
/**
|
|
22
|
+
* To be used with the proxy address and the implementation ABI
|
|
23
|
+
*/
|
|
24
|
+
export declare function connectToLatestRegistry(provider: Provider, address: string): RegistryV1;
|
|
25
|
+
export declare function connectToTradingFloorProxyForSigner(signer: Signer, address: string): TradingFloorProxy;
|
|
26
|
+
export declare function connectToTradingFloorProxy(provider: Provider, address: string): TradingFloorProxy;
|
|
27
|
+
/**
|
|
28
|
+
* To be used with the proxy address and the implementation ABI
|
|
29
|
+
*/
|
|
30
|
+
export declare function connectToLatestTradingFloorForSigner(signer: Signer, address: string): TradingFloorV1;
|
|
31
|
+
/**
|
|
32
|
+
* To be used with the proxy address and the implementation ABI
|
|
33
|
+
*/
|
|
34
|
+
export declare function connectToLatestTradingFloor(provider: Provider, address: string): TradingFloorV1;
|
|
35
|
+
export declare function connectToOrderBookProxyForSigner(signer: Signer, address: string): OrderBookProxy;
|
|
36
|
+
export declare function connectToOrderBookProxy(provider: Provider, address: string): OrderBookProxy;
|
|
37
|
+
export declare function connectToLatestOrderBookForSigner(signer: Signer, address: string): OrderBookV1;
|
|
38
|
+
export declare function connectToLatestOrderBook(provider: Provider, address: string): OrderBookV1;
|
|
39
|
+
export declare function connectToLatestTradersPortalForSigner(signer: Signer, address: string): TradersPortalV1;
|
|
40
|
+
export declare function connectToLatestTradersPortal(provider: Provider, address: string): TradersPortalV1;
|
|
41
|
+
export declare function connectToLatestTriggersForSigner(signer: Signer, address: string): TriggersV1;
|
|
42
|
+
export declare function connectToLatestTriggers(provider: Provider, address: string): TriggersV1;
|
|
6
43
|
export declare function connectToTradingFloorLens(provider: Provider, address: string): TradingFloorLens;
|
|
7
44
|
export declare function connectToLeXLens(provider: Provider, address: string): LexLens;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
45
|
+
export declare function createIntentsVerifierLensService(signerOrProvider: Signer | Provider, address: string): IntentsVerifierLensService;
|
|
46
|
+
export declare function createTriggersAndPortalLensService(signerOrProvider: Signer | Provider, address: string): TriggersAndPortalLensService;
|
|
47
|
+
export declare function createTradingFloorLensService(signerOrProvider: Signer | Provider, address: string): TradingFloorLensService;
|
|
48
|
+
export declare function createLexLensService(signerOrProvider: Signer | Provider, address: string): LexLensService;
|
|
10
49
|
//# sourceMappingURL=deployedContractsConnector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployedContractsConnector.d.ts","sourceRoot":"","sources":["../../../../lib/contractsIntegration/deployedContractsConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"deployed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gC,CAC9C,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EACnC,OAAO,EAAE,MAAM,GACd,0BAA0B,CAE5B;AAED,wBAAgB,kCAAkC,CAChD,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EACnC,OAAO,EAAE,MAAM,GACd,4BAA4B,CAE9B;AAED,wBAAgB,6BAA6B,CAC3C,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EACnC,OAAO,EAAE,MAAM,GACd,uBAAuB,CAEzB;AAED,wBAAgB,oBAAoB,CAClC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EACnC,OAAO,EAAE,MAAM,GACd,cAAc,CAEhB"}
|
|
@@ -1,22 +1,133 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.connectToRegistryProxyForSigner = connectToRegistryProxyForSigner;
|
|
4
|
+
exports.connectToLatestRegistryForSigner = connectToLatestRegistryForSigner;
|
|
5
|
+
exports.connectToLatestRegistry = connectToLatestRegistry;
|
|
6
|
+
exports.connectToTradingFloorProxyForSigner = connectToTradingFloorProxyForSigner;
|
|
7
|
+
exports.connectToTradingFloorProxy = connectToTradingFloorProxy;
|
|
8
|
+
exports.connectToLatestTradingFloorForSigner = connectToLatestTradingFloorForSigner;
|
|
9
|
+
exports.connectToLatestTradingFloor = connectToLatestTradingFloor;
|
|
10
|
+
exports.connectToOrderBookProxyForSigner = connectToOrderBookProxyForSigner;
|
|
11
|
+
exports.connectToOrderBookProxy = connectToOrderBookProxy;
|
|
12
|
+
exports.connectToLatestOrderBookForSigner = connectToLatestOrderBookForSigner;
|
|
13
|
+
exports.connectToLatestOrderBook = connectToLatestOrderBook;
|
|
14
|
+
exports.connectToLatestTradersPortalForSigner = connectToLatestTradersPortalForSigner;
|
|
15
|
+
exports.connectToLatestTradersPortal = connectToLatestTradersPortal;
|
|
16
|
+
exports.connectToLatestTriggersForSigner = connectToLatestTriggersForSigner;
|
|
17
|
+
exports.connectToLatestTriggers = connectToLatestTriggers;
|
|
3
18
|
exports.connectToTradingFloorLens = connectToTradingFloorLens;
|
|
4
19
|
exports.connectToLeXLens = connectToLeXLens;
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
20
|
+
exports.createIntentsVerifierLensService = createIntentsVerifierLensService;
|
|
21
|
+
exports.createTriggersAndPortalLensService = createTriggersAndPortalLensService;
|
|
22
|
+
exports.createTradingFloorLensService = createTradingFloorLensService;
|
|
23
|
+
exports.createLexLensService = createLexLensService;
|
|
7
24
|
const TradingFloorLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory");
|
|
8
25
|
const LexLens__factory_1 = require("../typechain/factories/contracts/Peripheral/Lens/LexLens__factory");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
26
|
+
const RegistryProxy__factory_1 = require("../typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory");
|
|
27
|
+
const RegistryV1__factory_1 = require("../typechain/factories/contracts/Lynx/Registry/RegistryV1__factory");
|
|
28
|
+
const TradingFloorProxy__factory_1 = require("../typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory");
|
|
29
|
+
const TradingFloorV1__factory_1 = require("../typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory");
|
|
30
|
+
const OrderBookProxy__factory_1 = require("../typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory");
|
|
31
|
+
const OrderBookV1__factory_1 = require("../typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory");
|
|
32
|
+
const TradersPortalV1__factory_1 = require("../typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory");
|
|
33
|
+
const TriggersV1__factory_1 = require("../typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory");
|
|
34
|
+
const IntentsVerifierLensService_1 = require("./IntentsVerifierLensService");
|
|
35
|
+
const TriggersAndPortalLensService_1 = require("./TriggersAndPortalLensService");
|
|
36
|
+
const TradingFloorLensService_1 = require("./TradingFloorLensService");
|
|
37
|
+
const LexLensService_1 = require("./LexLensService");
|
|
38
|
+
//
|
|
39
|
+
// ***** Registry & Proxy *****
|
|
40
|
+
//
|
|
41
|
+
function connectToRegistryProxyForSigner(signer, address) {
|
|
42
|
+
return RegistryProxy__factory_1.RegistryProxy__factory.connect(address, signer);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* To be used with the proxy address and the implementation ABI
|
|
46
|
+
*/
|
|
47
|
+
function connectToLatestRegistryForSigner(signer, address) {
|
|
48
|
+
return RegistryV1__factory_1.RegistryV1__factory.connect(address, signer);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* To be used with the proxy address and the implementation ABI
|
|
52
|
+
*/
|
|
53
|
+
function connectToLatestRegistry(provider, address) {
|
|
54
|
+
return RegistryV1__factory_1.RegistryV1__factory.connect(address, provider);
|
|
55
|
+
}
|
|
56
|
+
//
|
|
57
|
+
// ***** Trading Floor & Proxy *****
|
|
58
|
+
//
|
|
59
|
+
function connectToTradingFloorProxyForSigner(signer, address) {
|
|
60
|
+
return TradingFloorProxy__factory_1.TradingFloorProxy__factory.connect(address, signer);
|
|
61
|
+
}
|
|
62
|
+
function connectToTradingFloorProxy(provider, address) {
|
|
63
|
+
return TradingFloorProxy__factory_1.TradingFloorProxy__factory.connect(address, provider);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* To be used with the proxy address and the implementation ABI
|
|
67
|
+
*/
|
|
68
|
+
function connectToLatestTradingFloorForSigner(signer, address) {
|
|
69
|
+
return TradingFloorV1__factory_1.TradingFloorV1__factory.connect(address, signer);
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* To be used with the proxy address and the implementation ABI
|
|
73
|
+
*/
|
|
74
|
+
function connectToLatestTradingFloor(provider, address) {
|
|
75
|
+
return TradingFloorV1__factory_1.TradingFloorV1__factory.connect(address, provider);
|
|
76
|
+
}
|
|
77
|
+
//
|
|
78
|
+
// ***** Order Book Proxy *****
|
|
79
|
+
//
|
|
80
|
+
function connectToOrderBookProxyForSigner(signer, address) {
|
|
81
|
+
return OrderBookProxy__factory_1.OrderBookProxy__factory.connect(address, signer);
|
|
82
|
+
}
|
|
83
|
+
function connectToOrderBookProxy(provider, address) {
|
|
84
|
+
return OrderBookProxy__factory_1.OrderBookProxy__factory.connect(address, provider);
|
|
85
|
+
}
|
|
86
|
+
//
|
|
87
|
+
// ***** Order Book *****
|
|
88
|
+
//
|
|
89
|
+
function connectToLatestOrderBookForSigner(signer, address) {
|
|
90
|
+
return OrderBookV1__factory_1.OrderBookV1__factory.connect(address, signer);
|
|
91
|
+
}
|
|
92
|
+
function connectToLatestOrderBook(provider, address) {
|
|
93
|
+
return OrderBookV1__factory_1.OrderBookV1__factory.connect(address, provider);
|
|
94
|
+
}
|
|
95
|
+
//
|
|
96
|
+
// Trading
|
|
97
|
+
//
|
|
98
|
+
function connectToLatestTradersPortalForSigner(signer, address) {
|
|
99
|
+
return TradersPortalV1__factory_1.TradersPortalV1__factory.connect(address, signer);
|
|
100
|
+
}
|
|
101
|
+
function connectToLatestTradersPortal(provider, address) {
|
|
102
|
+
return TradersPortalV1__factory_1.TradersPortalV1__factory.connect(address, provider);
|
|
103
|
+
}
|
|
104
|
+
//
|
|
105
|
+
// Triggers
|
|
106
|
+
//
|
|
107
|
+
function connectToLatestTriggersForSigner(signer, address) {
|
|
108
|
+
return TriggersV1__factory_1.TriggersV1__factory.connect(address, signer);
|
|
109
|
+
}
|
|
110
|
+
function connectToLatestTriggers(provider, address) {
|
|
111
|
+
return TriggersV1__factory_1.TriggersV1__factory.connect(address, provider);
|
|
112
|
+
}
|
|
11
113
|
function connectToTradingFloorLens(provider, address) {
|
|
12
114
|
return TradingFloorLens__factory_1.TradingFloorLens__factory.connect(address, provider);
|
|
13
115
|
}
|
|
14
116
|
function connectToLeXLens(provider, address) {
|
|
15
117
|
return LexLens__factory_1.LexLens__factory.connect(address, provider);
|
|
16
118
|
}
|
|
17
|
-
|
|
18
|
-
|
|
119
|
+
//
|
|
120
|
+
// ***** Lens Services *****
|
|
121
|
+
//
|
|
122
|
+
function createIntentsVerifierLensService(signerOrProvider, address) {
|
|
123
|
+
return new IntentsVerifierLensService_1.IntentsVerifierLensService(signerOrProvider, address);
|
|
124
|
+
}
|
|
125
|
+
function createTriggersAndPortalLensService(signerOrProvider, address) {
|
|
126
|
+
return new TriggersAndPortalLensService_1.TriggersAndPortalLensService(signerOrProvider, address);
|
|
127
|
+
}
|
|
128
|
+
function createTradingFloorLensService(signerOrProvider, address) {
|
|
129
|
+
return new TradingFloorLensService_1.TradingFloorLensService(signerOrProvider, address);
|
|
19
130
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
131
|
+
function createLexLensService(signerOrProvider, address) {
|
|
132
|
+
return new LexLensService_1.LexLensService(signerOrProvider, address);
|
|
22
133
|
}
|