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 @@
|
|
|
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,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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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,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
|
package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITradersPortalService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradersPortalService/ITradersPortalService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EACL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,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,sCAAsC;IACrD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,yBAAyB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7C,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,qBAAqB;IACpC,cAAc,EAAE,2CAA2C,CAAC;IAC5D,aAAa,EAAE,0CAA0C,CAAC;IAC1D,YAAY,EAAE,yCAAyC,CAAC;IACxD,MAAM,EAAE,mCAAmC,CAAC;IAC5C,QAAQ,EAAE,qCAAqC,CAAC;IAChD,SAAS,EAAE,sCAAsC,CAAC;CACnD"}
|
package/dist/types/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
|
|
@@ -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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TPositionRequestIdentifierStruct, TPositionRequestParamsStruct } from "./ITradersPortalService";
|
|
2
|
+
export interface HumanReadablePositionRequestIdentifier {
|
|
3
|
+
trader: string;
|
|
4
|
+
pairId: number;
|
|
5
|
+
settlementAsset: string;
|
|
6
|
+
positionIndex: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HumanReadablePositionRequestParams {
|
|
9
|
+
isLong: boolean;
|
|
10
|
+
collateral: number;
|
|
11
|
+
leverage: number;
|
|
12
|
+
minPrice: number;
|
|
13
|
+
maxPrice: number;
|
|
14
|
+
takeProfit?: number;
|
|
15
|
+
stopLoss?: number;
|
|
16
|
+
takeProfitByFraction?: number;
|
|
17
|
+
stopLossByFraction?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Builds a position request identifier struct from human-readable values
|
|
21
|
+
* @param params Human-readable position request identifier parameters
|
|
22
|
+
* @returns TPositionRequestIdentifierStruct ready for contract interaction
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildPositionRequestIdentifier(params: HumanReadablePositionRequestIdentifier): TPositionRequestIdentifierStruct;
|
|
25
|
+
/**
|
|
26
|
+
* Builds a position request params struct from human-readable values
|
|
27
|
+
* @param params Human-readable position request parameters
|
|
28
|
+
* @returns TPositionRequestParamsStruct ready for contract interaction
|
|
29
|
+
* @throws Error if both price-based and fraction-based TP/SL are provided
|
|
30
|
+
*/
|
|
31
|
+
export declare function buildPositionRequestParams(params: HumanReadablePositionRequestParams): TPositionRequestParamsStruct;
|
|
32
|
+
//# sourceMappingURL=TradersPortalUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradersPortalUtils.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradersPortalService/TradersPortalUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAQjC,MAAM,WAAW,sCAAsC;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,sCAAsC,GAC7C,gCAAgC,CAOlC;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,kCAAkC,GACzC,4BAA4B,CA+C9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradersPortalService/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC"}
|
package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BytesLike } from "ethers";
|
|
2
|
+
import { TradingFloorLensStructs } from "../../typechain/contracts/Peripheral/Lens/TradingFloorLens";
|
|
3
|
+
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
4
|
+
export type TCompletePositionDataFromLensStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.CompletePositionDataFromLensStruct>, "pairId" | "positionIndex" | "phase" | "inPhaseSince" | "leverage" | "openPrice" | "spreadReductionF" | "minPrice" | "maxPrice" | "tpLastUpdated" | "slLastUpdated" | "tp" | "sl" | "pendingUpdateOrderType" | "pendingUpdateOrderTimestamp" | "liquidationPrice"> & {
|
|
5
|
+
pairId: number;
|
|
6
|
+
positionIndex: number;
|
|
7
|
+
phase: number;
|
|
8
|
+
inPhaseSince: number;
|
|
9
|
+
leverage: number;
|
|
10
|
+
openPrice: number;
|
|
11
|
+
spreadReductionF: number;
|
|
12
|
+
minPrice: number;
|
|
13
|
+
maxPrice: number;
|
|
14
|
+
tpLastUpdated: number;
|
|
15
|
+
slLastUpdated: number;
|
|
16
|
+
tp: number;
|
|
17
|
+
sl: number;
|
|
18
|
+
pendingUpdateOrderType: number;
|
|
19
|
+
pendingUpdateOrderTimestamp: number;
|
|
20
|
+
liquidationPrice: number;
|
|
21
|
+
};
|
|
22
|
+
export type TGetAllPositionsDataForAllTradersResultStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsDataForAllTradersResultStruct>, "positions" | "positionsCount" | "settlementAssetsLastIndex" | "pairIdsLastIndex" | "pairTraderLastIndex"> & {
|
|
23
|
+
positions: TCompletePositionDataFromLensStruct[];
|
|
24
|
+
positionsCount: number;
|
|
25
|
+
settlementAssetsLastIndex: number;
|
|
26
|
+
pairIdsLastIndex: number;
|
|
27
|
+
pairTraderLastIndex: number;
|
|
28
|
+
};
|
|
29
|
+
export type TPositionLiquidationInfoStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.PositionLiquidationInfoStruct>, "phase" | "liquidationPrice"> & {
|
|
30
|
+
phase: number;
|
|
31
|
+
liquidationPrice: number;
|
|
32
|
+
};
|
|
33
|
+
export type TGetAllPositionsLiquidationInfoResultStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsLiquidationInfoResultStruct>, "positionsLiquidationInfo" | "positionsCount" | "settlementAssetsLastIndex" | "pairIdsLastIndex" | "pairTraderLastIndex" | "positionLastIndex"> & {
|
|
34
|
+
positionsLiquidationInfo: TPositionLiquidationInfoStruct[];
|
|
35
|
+
positionsCount: number;
|
|
36
|
+
settlementAssetsLastIndex: number;
|
|
37
|
+
pairIdsLastIndex: number;
|
|
38
|
+
pairTraderLastIndex: number;
|
|
39
|
+
positionLastIndex: number;
|
|
40
|
+
};
|
|
41
|
+
export type TGetAllPositionsDataForAllTradersParamsStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsDataForAllTradersParamsStruct>, "settlementAssetsStartIndex" | "pairIdsStartIndex" | "pairTraderStartIndex" | "positionsLimit"> & {
|
|
42
|
+
settlementAssetsStartIndex: number;
|
|
43
|
+
pairIdsStartIndex: number;
|
|
44
|
+
pairTraderStartIndex: number;
|
|
45
|
+
positionsLimit: number;
|
|
46
|
+
};
|
|
47
|
+
export type TGetAllPositionsLiquidationInfoParamsStruct = Omit<TSafeBigNumberStruct<TradingFloorLensStructs.GetAllPositionsLiquidationInfoParamsStruct>, "settlementAssetsStartIndex" | "pairIdsStartIndex" | "pairTraderStartIndex" | "positionStartIndex" | "positionsLimit"> & {
|
|
48
|
+
settlementAssetsStartIndex: number;
|
|
49
|
+
pairIdsStartIndex: number;
|
|
50
|
+
pairTraderStartIndex: number;
|
|
51
|
+
positionStartIndex: number;
|
|
52
|
+
positionsLimit: number;
|
|
53
|
+
};
|
|
54
|
+
export type TTradingFloorLensTradeParamsStruct = {
|
|
55
|
+
tradingFloor: string;
|
|
56
|
+
maxTradesPerPair: number;
|
|
57
|
+
maxSlF: number;
|
|
58
|
+
maxSanityProfitF: number;
|
|
59
|
+
};
|
|
60
|
+
export declare const EMPTY_COMPLETE_POSITION_DATA: TCompletePositionDataFromLensStruct;
|
|
61
|
+
export declare const EMPTY_POSITIONS_RESULT: TGetAllPositionsDataForAllTradersResultStruct;
|
|
62
|
+
export declare const EMPTY_POSITION_LIQUIDATION_INFO: TPositionLiquidationInfoStruct;
|
|
63
|
+
export declare const EMPTY_LIQUIDATION_RESULT: TGetAllPositionsLiquidationInfoResultStruct;
|
|
64
|
+
export declare const EMPTY_TRADE_PARAMS: TTradingFloorLensTradeParamsStruct;
|
|
65
|
+
export interface ITradingFloorLensService {
|
|
66
|
+
generatePositionHashId(settlementAsset: string, trader: string, pairId: number, index: number): Promise<string>;
|
|
67
|
+
getAllPositionsDataForAllTraders(params: TGetAllPositionsDataForAllTradersParamsStruct): Promise<TGetAllPositionsDataForAllTradersResultStruct>;
|
|
68
|
+
getAllPositionsDataForAllTradersInDimension(tradingFloor: string, settlementAsset: string, arraySize: number): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
69
|
+
getAllPositionsDataForTraderInDimension(tradingFloor: string, settlementAsset: string, trader: string): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
70
|
+
getAllPositionsLiquidationInfo(params: TGetAllPositionsLiquidationInfoParamsStruct, phases?: number[]): Promise<TGetAllPositionsLiquidationInfoResultStruct>;
|
|
71
|
+
getCompletePositionData(tradingFloor: string, positionId: BytesLike): Promise<TCompletePositionDataFromLensStruct>;
|
|
72
|
+
getPositionDataInPairsForTrader(tradingFloor: string, settlementAsset: string, trader: string, pairIds: number[]): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
73
|
+
getPositionsDataInPairForTrader(tradingFloor: string, settlementAsset: string, trader: string, pairId: number): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
74
|
+
getTradingFloorTradeParams(tradingFloor: string): Promise<TTradingFloorLensTradeParamsStruct>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=ITradingFloorLensService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,oBAAoB,CAAC,uBAAuB,CAAC,kCAAkC,CAAC,EAChF,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW,GAAG,kBAAkB,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,e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,OAAO,CAAC,kCAAkC,CAAC,CAAC;CAChD"}
|
package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BytesLike, Provider, Signer } from "ethers";
|
|
2
|
+
import { ITradingFloorLensService, TCompletePositionDataFromLensStruct, TGetAllPositionsDataForAllTradersResultStruct, TGetAllPositionsDataForAllTradersParamsStruct, TGetAllPositionsLiquidationInfoResultStruct, TGetAllPositionsLiquidationInfoParamsStruct, TTradingFloorLensTradeParamsStruct } from "./ITradingFloorLensService";
|
|
3
|
+
export declare class TradingFloorLensService implements ITradingFloorLensService {
|
|
4
|
+
private readonly contract;
|
|
5
|
+
constructor(signerOrProvider: Signer | Provider, contractAddress: string);
|
|
6
|
+
generatePositionHashId(settlementAsset: string, trader: string, pairId: number, index: number): Promise<string>;
|
|
7
|
+
getAllPositionsDataForAllTraders(params: TGetAllPositionsDataForAllTradersParamsStruct): Promise<TGetAllPositionsDataForAllTradersResultStruct>;
|
|
8
|
+
getAllPositionsDataForAllTradersInDimension(tradingFloor: string, settlementAsset: string, arraySize: number): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
9
|
+
getAllPositionsDataForTraderInDimension(tradingFloor: string, settlementAsset: string, trader: string): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
10
|
+
getAllPositionsLiquidationInfo(params: TGetAllPositionsLiquidationInfoParamsStruct, phases?: number[]): Promise<TGetAllPositionsLiquidationInfoResultStruct>;
|
|
11
|
+
getCompletePositionData(tradingFloor: string, positionId: BytesLike): Promise<TCompletePositionDataFromLensStruct>;
|
|
12
|
+
getPositionDataInPairsForTrader(tradingFloor: string, settlementAsset: string, trader: string, pairIds: number[]): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
13
|
+
getPositionsDataInPairForTrader(tradingFloor: string, settlementAsset: string, trader: string, pairId: number): Promise<TCompletePositionDataFromLensStruct[]>;
|
|
14
|
+
getTradingFloorTradeParams(tradingFloor: string): Promise<TTradingFloorLensTradeParamsStruct>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=TradingFloorLensService.d.ts.map
|
package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradingFloorLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrD,OAAO,EACL,wBAAwB,EACxB,mCAAmC,EACnC,6CAA6C,EAC7C,6CAA6C,EAC7C,2CAA2C,EAC3C,2CAA2C,EAE3C,kCAAkC,EAKnC,MAAM,4BAA4B,CAAC;AAmCpC,qBAAa,uBAAwB,YAAW,wBAAwB;IACtE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;gBAEhC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,eAAe,EAAE,MAAM;IAIlE,sBAAsB,CAC1B,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC;IASZ,gCAAgC,CACpC,MAAM,EAAE,6CAA6C,GACpD,OAAO,CAAC,6CAA6C,CAAC;IA2BnD,2CAA2C,CAC/C,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAa3C,uCAAuC,CAC3C,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAa3C,8BAA8B,CAClC,MAAM,EAAE,2CAA2C,EACnD,MAAM,CAAC,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,2CAA2C,CAAC;IAsCjD,uBAAuB,CAC3B,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,SAAS,GACpB,OAAO,CAAC,mCAAmC,CAAC;IAMzC,+BAA+B,CACnC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAc3C,+BAA+B,CACnC,YAAY,EAAE,MAAM,EACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,mCAAmC,EAAE,CAAC;IAc3C,0BAA0B,CAC9B,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,kCAAkC,CAAC;CAU/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorLensService/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { BytesLike } from "ethers";
|
|
2
|
+
import { TradingFloorStructsV1 } from "../../typechain/contracts/Lynx/TradingFloor/TradingFloorV1";
|
|
3
|
+
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
4
|
+
type PositionRequestIdentifierStruct = TradingFloorStructsV1.PositionRequestIdentifiersStruct;
|
|
5
|
+
type PositionRequestParamsStruct = TradingFloorStructsV1.PositionRequestParamsStruct;
|
|
6
|
+
export type TPositionRequestIdentifierStruct = TSafeBigNumberStruct<PositionRequestIdentifierStruct>;
|
|
7
|
+
export type TPositionRequestParamsStruct = TSafeBigNumberStruct<PositionRequestParamsStruct>;
|
|
8
|
+
export interface ITradingFloorService {
|
|
9
|
+
generatePositionHashId(settlementAsset: string, trader: string, pairId: bigint, index: bigint): Promise<string>;
|
|
10
|
+
getPositionPortalInfo(positionId: BytesLike): Promise<{
|
|
11
|
+
phase: bigint;
|
|
12
|
+
timestamp: bigint;
|
|
13
|
+
trader: string;
|
|
14
|
+
}>;
|
|
15
|
+
getPositionRegistrationParams(positionId: BytesLike): Promise<{
|
|
16
|
+
collateral: bigint;
|
|
17
|
+
leverage: bigint;
|
|
18
|
+
long: boolean;
|
|
19
|
+
openPrice: bigint;
|
|
20
|
+
tp: bigint;
|
|
21
|
+
}>;
|
|
22
|
+
getPositionTriggerInfo(positionId: BytesLike): Promise<{
|
|
23
|
+
phase: bigint;
|
|
24
|
+
timestamp: bigint;
|
|
25
|
+
pairId: bigint;
|
|
26
|
+
long: boolean;
|
|
27
|
+
spreadReductionF: bigint;
|
|
28
|
+
}>;
|
|
29
|
+
positionIdentifiersById(positionId: BytesLike): Promise<{
|
|
30
|
+
settlementAsset: string;
|
|
31
|
+
pairId: bigint;
|
|
32
|
+
index: bigint;
|
|
33
|
+
trader: string;
|
|
34
|
+
}>;
|
|
35
|
+
positionLimitsInfoById(positionId: BytesLike): Promise<{
|
|
36
|
+
tpLastUpdated: bigint;
|
|
37
|
+
slLastUpdated: bigint;
|
|
38
|
+
tp: bigint;
|
|
39
|
+
sl: bigint;
|
|
40
|
+
}>;
|
|
41
|
+
positionsById(positionId: BytesLike): Promise<{
|
|
42
|
+
collateral: bigint;
|
|
43
|
+
phase: bigint;
|
|
44
|
+
inPhaseSince: bigint;
|
|
45
|
+
leverage: bigint;
|
|
46
|
+
long: boolean;
|
|
47
|
+
openPrice: bigint;
|
|
48
|
+
spreadReductionF: bigint;
|
|
49
|
+
}>;
|
|
50
|
+
triggerPricesById(positionId: BytesLike): Promise<{
|
|
51
|
+
minPrice: bigint;
|
|
52
|
+
maxPrice: bigint;
|
|
53
|
+
tpByFraction: bigint;
|
|
54
|
+
slByFraction: bigint;
|
|
55
|
+
}>;
|
|
56
|
+
initialCollateralByPositionId(positionId: BytesLike): Promise<bigint>;
|
|
57
|
+
isSettlementAssetSupported(settlementAsset: string): Promise<boolean>;
|
|
58
|
+
lexPoolForAsset(asset: string): Promise<string>;
|
|
59
|
+
poolAccountantForAsset(asset: string): Promise<string>;
|
|
60
|
+
pairTraders(asset: string, pairId: bigint, index: bigint): Promise<string>;
|
|
61
|
+
pairTradersArray(asset: string, pairIndex: bigint): Promise<string[]>;
|
|
62
|
+
pairTradersInfo(asset: string, trader: string, pairId: bigint): Promise<{
|
|
63
|
+
positionsCounter: bigint;
|
|
64
|
+
positionInArray: bigint;
|
|
65
|
+
}>;
|
|
66
|
+
pausedPairs(pairId: bigint): Promise<boolean>;
|
|
67
|
+
maxSanityProfitF(): Promise<bigint>;
|
|
68
|
+
maxSlF(): Promise<bigint>;
|
|
69
|
+
maxTradesPerPair(): Promise<bigint>;
|
|
70
|
+
feesMap(asset: string, feeType: bigint): Promise<bigint>;
|
|
71
|
+
admin(): Promise<string>;
|
|
72
|
+
pendingAdmin(): Promise<string>;
|
|
73
|
+
implementation(): Promise<string>;
|
|
74
|
+
pendingImplementation(): Promise<string>;
|
|
75
|
+
registry(): Promise<string>;
|
|
76
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
77
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
78
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
79
|
+
MAX_FEE_FRACTION_FOR_CANCEL(): Promise<bigint>;
|
|
80
|
+
PRECISION(): Promise<bigint>;
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=ITradingFloorService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/ITradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE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Ae,CACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;QAAE,gBAAgB,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAG9C,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1B,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAGpC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAGzD,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;IACzC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAI5B,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9C,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/C,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { BytesLike, Signer, Provider } from "ethers";
|
|
2
|
+
import { ITradingFloorService } from "./ITradingFloorService";
|
|
3
|
+
export declare class TradingFloorService implements ITradingFloorService {
|
|
4
|
+
private signerOrProvider;
|
|
5
|
+
private tradingFloorContract;
|
|
6
|
+
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
7
|
+
generatePositionHashId(settlementAsset: string, trader: string, pairId: bigint, index: bigint): Promise<string>;
|
|
8
|
+
getPositionPortalInfo(positionId: BytesLike): Promise<{
|
|
9
|
+
phase: bigint;
|
|
10
|
+
timestamp: bigint;
|
|
11
|
+
trader: string;
|
|
12
|
+
}>;
|
|
13
|
+
getPositionRegistrationParams(positionId: BytesLike): Promise<{
|
|
14
|
+
collateral: bigint;
|
|
15
|
+
leverage: bigint;
|
|
16
|
+
long: boolean;
|
|
17
|
+
openPrice: bigint;
|
|
18
|
+
tp: bigint;
|
|
19
|
+
}>;
|
|
20
|
+
getPositionTriggerInfo(positionId: BytesLike): Promise<{
|
|
21
|
+
phase: bigint;
|
|
22
|
+
timestamp: bigint;
|
|
23
|
+
pairId: bigint;
|
|
24
|
+
long: boolean;
|
|
25
|
+
spreadReductionF: bigint;
|
|
26
|
+
}>;
|
|
27
|
+
positionIdentifiersById(positionId: BytesLike): Promise<{
|
|
28
|
+
settlementAsset: string;
|
|
29
|
+
pairId: bigint;
|
|
30
|
+
index: bigint;
|
|
31
|
+
trader: string;
|
|
32
|
+
}>;
|
|
33
|
+
positionLimitsInfoById(positionId: BytesLike): Promise<{
|
|
34
|
+
tpLastUpdated: bigint;
|
|
35
|
+
slLastUpdated: bigint;
|
|
36
|
+
tp: bigint;
|
|
37
|
+
sl: bigint;
|
|
38
|
+
}>;
|
|
39
|
+
positionsById(positionId: BytesLike): Promise<{
|
|
40
|
+
collateral: bigint;
|
|
41
|
+
phase: bigint;
|
|
42
|
+
inPhaseSince: bigint;
|
|
43
|
+
leverage: bigint;
|
|
44
|
+
long: boolean;
|
|
45
|
+
openPrice: bigint;
|
|
46
|
+
spreadReductionF: bigint;
|
|
47
|
+
}>;
|
|
48
|
+
triggerPricesById(positionId: BytesLike): Promise<{
|
|
49
|
+
minPrice: bigint;
|
|
50
|
+
maxPrice: bigint;
|
|
51
|
+
tpByFraction: bigint;
|
|
52
|
+
slByFraction: bigint;
|
|
53
|
+
}>;
|
|
54
|
+
initialCollateralByPositionId(positionId: BytesLike): Promise<bigint>;
|
|
55
|
+
isSettlementAssetSupported(settlementAsset: string): Promise<boolean>;
|
|
56
|
+
lexPoolForAsset(asset: string): Promise<string>;
|
|
57
|
+
poolAccountantForAsset(asset: string): Promise<string>;
|
|
58
|
+
pairTraders(asset: string, pairId: bigint, index: bigint): Promise<string>;
|
|
59
|
+
pairTradersArray(asset: string, pairIndex: bigint): Promise<string[]>;
|
|
60
|
+
pairTradersInfo(asset: string, trader: string, pairId: bigint): Promise<{
|
|
61
|
+
positionsCounter: bigint;
|
|
62
|
+
positionInArray: bigint;
|
|
63
|
+
}>;
|
|
64
|
+
pausedPairs(pairId: bigint): Promise<boolean>;
|
|
65
|
+
maxSanityProfitF(): Promise<bigint>;
|
|
66
|
+
maxSlF(): Promise<bigint>;
|
|
67
|
+
maxTradesPerPair(): Promise<bigint>;
|
|
68
|
+
feesMap(asset: string, feeType: bigint): Promise<bigint>;
|
|
69
|
+
admin(): Promise<string>;
|
|
70
|
+
pendingAdmin(): Promise<string>;
|
|
71
|
+
implementation(): Promise<string>;
|
|
72
|
+
pendingImplementation(): Promise<string>;
|
|
73
|
+
registry(): Promise<string>;
|
|
74
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
75
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
76
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
77
|
+
MAX_FEE_FRACTION_FOR_CANCEL(): Promise<bigint>;
|
|
78
|
+
PRECISION(): Promise<bigint>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=TradingFloorService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/TradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AA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IAY3D,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK7C,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAInC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAIzB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAKnC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKxD,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAIxB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC;IAIxC,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAM3B,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7C,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIjC,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC;IAI9C,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;CAGnC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PairConfigsInTriggersStruct, CompleteTradersPortalConfigurationsStruct, CompleteTriggerConfigurationsStruct } from "../../typechain/contracts/Peripheral/Lens/TriggersAndPortalLens";
|
|
2
|
+
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
3
|
+
export type TPairConfigsInTriggersStruct = Omit<TSafeBigNumberStruct<PairConfigsInTriggersStruct>, "pairId" | "maxConfidenceFraction" | "spreadFraction"> & {
|
|
4
|
+
pairId: number;
|
|
5
|
+
maxConfidenceFraction: number;
|
|
6
|
+
spreadFraction: number;
|
|
7
|
+
};
|
|
8
|
+
export type TCompleteTradersPortalConfigurationsStruct = Omit<TSafeBigNumberStruct<CompleteTradersPortalConfigurationsStruct>, "limitOrdersTimelock" | "marketOrdersTimeout" | "minLiveTimeForMarketClose"> & {
|
|
9
|
+
limitOrdersTimelock: number;
|
|
10
|
+
marketOrdersTimeout: number;
|
|
11
|
+
minLiveTimeForMarketClose: number;
|
|
12
|
+
};
|
|
13
|
+
export type TCompleteTriggerConfigurationsStruct = Omit<TSafeBigNumberStruct<CompleteTriggerConfigurationsStruct>, "minTriggerPeriodForMarketOrders" | "maxTriggerPeriodForMarketOrders" | "marketOrdersTimeout" | "marketOrderTightTimeRange" | "minTriggerPeriodForLimitOrders" | "triggerPriceFreshnessTimeRange" | "marketOrderCancelFeeFraction" | "openPositionCancellationFeeFraction" | "maxTriggersPerBlock"> & {
|
|
14
|
+
minTriggerPeriodForMarketOrders: number;
|
|
15
|
+
maxTriggerPeriodForMarketOrders: number;
|
|
16
|
+
marketOrdersTimeout: number;
|
|
17
|
+
marketOrderTightTimeRange: number;
|
|
18
|
+
minTriggerPeriodForLimitOrders: number;
|
|
19
|
+
triggerPriceFreshnessTimeRange: number;
|
|
20
|
+
marketOrderCancelFeeFraction: number;
|
|
21
|
+
openPositionCancellationFeeFraction: number;
|
|
22
|
+
maxTriggersPerBlock: number;
|
|
23
|
+
};
|
|
24
|
+
export interface ITriggersAndPortalLensService {
|
|
25
|
+
getPairConfigsInTriggers(triggers: string, pairId: number): Promise<TPairConfigsInTriggersStruct>;
|
|
26
|
+
getPairsConfigsInTriggers(triggers: string, pairIds: number[]): Promise<TPairConfigsInTriggersStruct[]>;
|
|
27
|
+
getTradersPortalConfigurations(tradersPortal: string): Promise<TCompleteTradersPortalConfigurationsStruct>;
|
|
28
|
+
getTriggersConfigurations(triggers: string): Promise<TCompleteTriggerConfigurationsStruct>;
|
|
29
|
+
}
|
|
30
|
+
export declare const EMPTY_PAIR_CONFIGS_IN_TRIGGERS: TPairConfigsInTriggersStruct;
|
|
31
|
+
export declare const EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS: TCompleteTradersPortalConfigurationsStruct;
|
|
32
|
+
export declare const EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS: TCompleteTriggerConfigurationsStruct;
|
|
33
|
+
//# sourceMappingURL=ITriggersAndPortalLensService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITriggersAndPortalLensService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,yCAAyC,EACzC,mCAAmC,EACpC,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,oBAAoB,CAAC,2BAA2B,CAAC,EACjD,QAAQ,GAAG,uBAAuB,GAAG,gBAAgB,CACtD,GAAG;IACF,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,0CAA0C,GAAG,IAAI,CAC3D,oBAAoB,CAAC,yCAAyC,CAAC,EAC/D,qBAAqB,GAAG,qBAAqB,GAAG,2BAA2B,CAC5E,GAAG;IACF,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yBAAyB,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,IAAI,CACrD,oBAAoB,CAAC,mCAAmC,CAAC,EACzD,iCAAiC,GAAG,iCAAiC,GAAG,qBAAqB,GAAG,2BAA2B,GAAG,gCAAgC,GAAG,gCAAgC,GAAG,8BAA8B,GAAG,qCAAqC,GAAG,qBAAqB,CACnS,GAAG;IACF,+BAA+B,EAAE,MAAM,CAAC;IACxC,+BAA+B,EAAE,MAAM,CAAC;IACxC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,yBAAyB,EAAE,MAAM,CAAC;IAClC,8BAA8B,EAAE,MAAM,CAAC;IACvC,8BAA8B,EAAE,MAAM,CAAC;IACvC,4BAA4B,EAAE,MAAM,CAAC;IACrC,mCAAmC,EAAE,MAAM,CAAC;IAC5C,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,WAAW,6BAA6B;IAC5C,wBAAwB,CACtB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAEzC,yBAAyB,CACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAAC,4BAA4B,EAAE,CAAC,CAAC;IAE3C,8BAA8B,CAC5B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,0CAA0C,CAAC,CAAC;IAEvD,yBAAyB,CACvB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,oCAAoC,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,8BAA8B,EAAE,4BAI5C,CAAC;AAEF,eAAO,MAAM,4CAA4C,EAAE,0CAS1D,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,oCAWnD,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersAndPortalLensService/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC"}
|