lynx-client 0.0.1-beta.8 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +392 -3
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/lib/chains/chainMappings.js +17 -0
- package/dist/cjs/lib/constants/contractEnums.js +2 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +42 -0
- package/dist/cjs/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
- package/dist/cjs/lib/contractsIntegration/LexLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/index.js +19 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +61 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +147 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
- package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
- package/dist/cjs/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
- package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +119 -8
- package/dist/cjs/lib/devex/getChainAddresses.js +65 -0
- package/dist/cjs/lib/devex/getSupportedEngineChains.js +45 -0
- package/dist/cjs/lib/devex/index.js +9 -0
- package/dist/cjs/lib/devex/types.js +2 -0
- package/dist/cjs/lib/lynxSystem/hashes.js +9 -0
- package/dist/cjs/lib/lynxSystem/lynxScalesUtils.js +8 -0
- package/dist/cjs/lib/lynxSystem/registry/registryReading.js +38 -0
- package/dist/cjs/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
- package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/cjs/lib/utils/ethersTypes.js +29 -6
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +8 -0
- package/dist/esm/lib/chains/chainMappings.d.ts +13 -0
- package/dist/esm/lib/chains/chainMappings.d.ts.map +1 -0
- package/dist/esm/lib/chains/chainMappings.js +17 -0
- package/dist/esm/lib/chains/chainTypes.d.ts +3 -0
- package/dist/esm/lib/chains/chainTypes.d.ts.map +1 -1
- package/dist/esm/lib/constants/contractEnums.d.ts +1 -0
- package/dist/esm/lib/constants/contractEnums.d.ts.map +1 -1
- package/dist/esm/lib/constants/contractEnums.js +2 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +20 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.js +15 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.js +42 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/IntentsVerifierLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/ILexLensService.js +137 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/LexLensService.js +250 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/LexLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.js +2 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +92 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +157 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.js +64 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradersPortalService/index.js +19 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +76 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +61 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +16 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +147 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +158 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +30 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +58 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/index.js +18 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.js +2 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +188 -0
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +119 -8
- package/dist/esm/lib/devex/getChainAddresses.d.ts +20 -0
- package/dist/esm/lib/devex/getChainAddresses.d.ts.map +1 -0
- package/dist/esm/lib/devex/getChainAddresses.js +65 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.d.ts +37 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
- package/dist/esm/lib/devex/getSupportedEngineChains.js +45 -0
- package/dist/esm/lib/devex/index.d.ts +5 -0
- package/dist/esm/lib/devex/index.d.ts.map +1 -0
- package/dist/esm/lib/devex/index.js +9 -0
- package/dist/esm/lib/devex/types.d.ts +20 -0
- package/dist/esm/lib/devex/types.d.ts.map +1 -0
- package/dist/esm/lib/devex/types.js +2 -0
- package/dist/esm/lib/lynxSystem/hashes.d.ts +6 -0
- package/dist/esm/lib/lynxSystem/hashes.d.ts.map +1 -1
- package/dist/esm/lib/lynxSystem/hashes.js +9 -0
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
- package/dist/esm/lib/lynxSystem/lynxScalesUtils.js +8 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts +9 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
- package/dist/esm/lib/lynxSystem/registry/registryReading.js +38 -0
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/dist/esm/lib/priceFeeds/pyth/pythFeedConstants.js +1 -2
- package/dist/esm/lib/typechain/common.d.ts.map +1 -1
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Registry/RegistryV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
- package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.js +258 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +539 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.js +226 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1108 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +966 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.js +258 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1774 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1459 -0
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/esm/lib/utils/ethersTypes.d.ts +2 -2
- package/dist/esm/lib/utils/ethersTypes.d.ts.map +1 -1
- package/dist/esm/lib/utils/ethersTypes.js +29 -6
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/chains/chainMappings.d.ts +13 -0
- package/dist/types/lib/chains/chainMappings.d.ts.map +1 -0
- package/dist/types/lib/chains/chainTypes.d.ts +3 -0
- package/dist/types/lib/chains/chainTypes.d.ts.map +1 -1
- package/dist/types/lib/constants/contractEnums.d.ts +1 -0
- package/dist/types/lib/constants/contractEnums.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts +20 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IIntentsVerifierLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/IntentsVerifierLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/IntentsVerifierLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts +85 -0
- package/dist/types/lib/contractsIntegration/LexLensService/ILexLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts +34 -0
- package/dist/types/lib/contractsIntegration/LexLensService/LexLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/LexLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +40 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +12 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +61 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +14 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts +32 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalUtils.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts +4 -0
- package/dist/types/lib/contractsIntegration/TradersPortalService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +76 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts +16 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/TradingFloorLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +83 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +80 -0
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +33 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +73 -0
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +18 -0
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +44 -5
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/types/lib/devex/getChainAddresses.d.ts +20 -0
- package/dist/types/lib/devex/getChainAddresses.d.ts.map +1 -0
- package/dist/types/lib/devex/getSupportedEngineChains.d.ts +37 -0
- package/dist/types/lib/devex/getSupportedEngineChains.d.ts.map +1 -0
- package/dist/types/lib/devex/index.d.ts +5 -0
- package/dist/types/lib/devex/index.d.ts.map +1 -0
- package/dist/types/lib/devex/types.d.ts +20 -0
- package/dist/types/lib/devex/types.d.ts.map +1 -0
- package/dist/types/lib/lynxSystem/hashes.d.ts +6 -0
- package/dist/types/lib/lynxSystem/hashes.d.ts.map +1 -1
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts +2 -0
- package/dist/types/lib/lynxSystem/lynxScalesUtils.d.ts.map +1 -1
- package/dist/types/lib/lynxSystem/registry/registryReading.d.ts +9 -0
- package/dist/types/lib/lynxSystem/registry/registryReading.d.ts.map +1 -0
- package/dist/types/lib/priceFeeds/pyth/pythFeedConstants.d.ts.map +1 -1
- package/dist/types/lib/typechain/common.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts +151 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts +268 -0
- package/dist/types/lib/typechain/contracts/Lynx/OrderBook/OrderBookV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts +143 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts +603 -0
- package/dist/types/lib/typechain/contracts/Lynx/Registry/RegistryV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts +571 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradersPortal/TradersPortalV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts +151 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorProxy.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +1160 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +977 -0
- package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +1 -3
- package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts +193 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +407 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts +169 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +841 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +745 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts +193 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorProxy__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1374 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1135 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/types/lib/utils/ethersTypes.d.ts +2 -2
- package/dist/types/lib/utils/ethersTypes.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,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":"deployedContractsConnector.d.ts","sourceRoot":"","sources":["../../../../lib/contractsIntegration/deployedContractsConnector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yDAAyD,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AAEzE,OAAO,EAAE,aAAa,EAAE,MAAM,oDAAoD,CAAC;AAGnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAI/F,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAItF,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,aAAa,CAEf;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ;AAMD,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,iBAAiB,CAEnB;AAED,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,iBAAiB,CAEnB;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,cAAc,CAEhB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,cAAc,CAEhB;AAKD,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,cAAc,CAEhB;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,cAAc,CAEhB;AAKD,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,WAAW,CAEb;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,WAAW,CAEb;AAMD,wBAAgB,qCAAqC,CACnD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,eAAe,CAEjB;AAED,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,eAAe,CAEjB;AAMD,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ;AAED,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,UAAU,CAEZ;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,GACd,gBAAgB,CAElB;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE7E;AAOD,wBAAgB,gCAAgC,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
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ILynxChainAddresses, IGetChainAddressesOptions } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Get all Lynx system contract addresses for a specific chain
|
|
4
|
+
* @param options - Chain ID and provider
|
|
5
|
+
* @returns Promise<ILynxChainAddresses> - All system contract addresses
|
|
6
|
+
* @throws Error if chain is not supported
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { getChainAddresses } from 'lynx-client/devex';
|
|
11
|
+
* import { ethers } from 'ethers';
|
|
12
|
+
*
|
|
13
|
+
* const provider = new ethers.JsonRpcProvider('https://rpc.example.com');
|
|
14
|
+
* const addresses = await getChainAddresses({ chainId: 146, provider });
|
|
15
|
+
*
|
|
16
|
+
* console.log(addresses.tradingFloorAddress); // Address of TradingFloor contract
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function getChainAddresses(options: IGetChainAddressesOptions): Promise<ILynxChainAddresses>;
|
|
20
|
+
//# sourceMappingURL=getChainAddresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getChainAddresses.d.ts","sourceRoot":"","sources":["../../../../lib/devex/getChainAddresses.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAOzE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,mBAAmB,CAAC,CAsD9B"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChainAddresses = getChainAddresses;
|
|
4
|
+
const systemAddresses_1 = require("../addresses/systemAddresses");
|
|
5
|
+
const lensAddresses_1 = require("../addresses/lensAddresses");
|
|
6
|
+
const deployedContractsConnector_1 = require("../contractsIntegration/deployedContractsConnector");
|
|
7
|
+
const chainMappings_1 = require("../chains/chainMappings");
|
|
8
|
+
/**
|
|
9
|
+
* Get all Lynx system contract addresses for a specific chain
|
|
10
|
+
* @param options - Chain ID and provider
|
|
11
|
+
* @returns Promise<ILynxChainAddresses> - All system contract addresses
|
|
12
|
+
* @throws Error if chain is not supported
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { getChainAddresses } from 'lynx-client/devex';
|
|
17
|
+
* import { ethers } from 'ethers';
|
|
18
|
+
*
|
|
19
|
+
* const provider = new ethers.JsonRpcProvider('https://rpc.example.com');
|
|
20
|
+
* const addresses = await getChainAddresses({ chainId: 146, provider });
|
|
21
|
+
*
|
|
22
|
+
* console.log(addresses.tradingFloorAddress); // Address of TradingFloor contract
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
async function getChainAddresses(options) {
|
|
26
|
+
const { chainId, provider } = options;
|
|
27
|
+
// Find the chain configuration
|
|
28
|
+
const chainEntry = Object.entries(chainMappings_1.ENGINE_CHAIN_ID_BY_NAME).find(([_, id]) => id === chainId);
|
|
29
|
+
if (!chainEntry) {
|
|
30
|
+
throw new Error(`Chain ID ${chainId} is not supported by Lynx protocol engine chains`);
|
|
31
|
+
}
|
|
32
|
+
const [chainKey] = chainEntry;
|
|
33
|
+
const addresses = systemAddresses_1.LynxSystemAddresses[chainKey];
|
|
34
|
+
const lensAddresses = lensAddresses_1.LensAddresses[chainKey];
|
|
35
|
+
const chainName = chainMappings_1.ENGINE_CHAIN_DISPLAY_NAME[chainKey];
|
|
36
|
+
// Connect to registry to get current implementation addresses
|
|
37
|
+
const registry = (0, deployedContractsConnector_1.connectToLatestRegistry)(provider, addresses.registryProxyAddress);
|
|
38
|
+
try {
|
|
39
|
+
// Fetch all contract addresses from registry
|
|
40
|
+
const [tradersPortal, orderBook, triggers,] = await Promise.all([
|
|
41
|
+
registry.tradersPortal(),
|
|
42
|
+
registry.orderBook(),
|
|
43
|
+
registry.triggers(),
|
|
44
|
+
]);
|
|
45
|
+
// Get registry implementation
|
|
46
|
+
const registryImplementation = await registry.implementation();
|
|
47
|
+
return {
|
|
48
|
+
chainId,
|
|
49
|
+
chainName,
|
|
50
|
+
registryProxyAddress: addresses.registryProxyAddress,
|
|
51
|
+
registryImplementationAddress: registryImplementation,
|
|
52
|
+
tradersPortalAddress: tradersPortal,
|
|
53
|
+
tradingFloorAddress: addresses.tradingFloorProxyAddress,
|
|
54
|
+
orderBookAddress: orderBook,
|
|
55
|
+
triggersAddress: triggers,
|
|
56
|
+
lexLensAddress: lensAddresses.lexLens,
|
|
57
|
+
tradingFloorLensAddress: lensAddresses.tradingFloorLensLens,
|
|
58
|
+
intentsVerifierLensAddress: lensAddresses.intentsVerifierLens,
|
|
59
|
+
triggersAndPortalLensAddress: lensAddresses.triggersAndPortalLens,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
throw new Error(`Failed to fetch addresses from registry on chain ${chainId}: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface ISupportedChainDescriptor {
|
|
2
|
+
chainId: number;
|
|
3
|
+
chainName: string;
|
|
4
|
+
chainKey: string;
|
|
5
|
+
registryProxyAddress: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get all chains supported by the Lynx protocol
|
|
9
|
+
* @returns Array of supported chains with their details
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { getSupportedChains } from 'lynx-client/devex';
|
|
14
|
+
*
|
|
15
|
+
* const chains = getSupportedChains();
|
|
16
|
+
* chains.forEach(chain => {
|
|
17
|
+
* console.log(`${chain.chainName} (${chain.chainId}): ${chain.registryProxyAddress}`);
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function getSupportedEngineChains(): ISupportedChainDescriptor[];
|
|
22
|
+
/**
|
|
23
|
+
* Check if a chain is supported by the Lynx protocol
|
|
24
|
+
* @param chainId - The chain ID to check
|
|
25
|
+
* @returns boolean - true if supported, false otherwise
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import { isChainSupported } from 'lynx-client/devex';
|
|
30
|
+
*
|
|
31
|
+
* if (isChainSupported(146)) {
|
|
32
|
+
* console.log('Sonic chain is supported!');
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare function isEngineChainId(chainId: number): boolean;
|
|
37
|
+
//# sourceMappingURL=getSupportedEngineChains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSupportedEngineChains.d.ts","sourceRoot":"","sources":["../../../../lib/devex/getSupportedEngineChains.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,IAAI,yBAAyB,EAAE,CAQtE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAExD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSupportedEngineChains = getSupportedEngineChains;
|
|
4
|
+
exports.isEngineChainId = isEngineChainId;
|
|
5
|
+
const systemAddresses_1 = require("../addresses/systemAddresses");
|
|
6
|
+
const chainMappings_1 = require("../chains/chainMappings");
|
|
7
|
+
/**
|
|
8
|
+
* Get all chains supported by the Lynx protocol
|
|
9
|
+
* @returns Array of supported chains with their details
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { getSupportedChains } from 'lynx-client/devex';
|
|
14
|
+
*
|
|
15
|
+
* const chains = getSupportedChains();
|
|
16
|
+
* chains.forEach(chain => {
|
|
17
|
+
* console.log(`${chain.chainName} (${chain.chainId}): ${chain.registryProxyAddress}`);
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
function getSupportedEngineChains() {
|
|
22
|
+
return Object.entries(systemAddresses_1.LynxSystemAddresses).map(([chainKey, config]) => ({
|
|
23
|
+
chainId: chainMappings_1.ENGINE_CHAIN_ID_BY_NAME[chainKey],
|
|
24
|
+
chainName: chainMappings_1.ENGINE_CHAIN_DISPLAY_NAME[chainKey] || chainKey,
|
|
25
|
+
chainKey,
|
|
26
|
+
registryProxyAddress: config.registryProxyAddress,
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Check if a chain is supported by the Lynx protocol
|
|
31
|
+
* @param chainId - The chain ID to check
|
|
32
|
+
* @returns boolean - true if supported, false otherwise
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import { isChainSupported } from 'lynx-client/devex';
|
|
37
|
+
*
|
|
38
|
+
* if (isChainSupported(146)) {
|
|
39
|
+
* console.log('Sonic chain is supported!');
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
function isEngineChainId(chainId) {
|
|
44
|
+
return Object.values(chainMappings_1.ENGINE_CHAIN_ID_BY_NAME).includes(chainId);
|
|
45
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { getChainAddresses } from "./getChainAddresses";
|
|
2
|
+
export { getSupportedEngineChains, isEngineChainId, } from "./getSupportedEngineChains";
|
|
3
|
+
export type { ILynxChainAddresses, IGetChainAddressesOptions } from "./types";
|
|
4
|
+
export type { ISupportedChainDescriptor } from "./getSupportedEngineChains";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/devex/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,wBAAwB,EACxB,eAAe,GAChB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAC9E,YAAY,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEngineChainId = exports.getSupportedEngineChains = exports.getChainAddresses = void 0;
|
|
4
|
+
// Developer Experience utilities
|
|
5
|
+
var getChainAddresses_1 = require("./getChainAddresses");
|
|
6
|
+
Object.defineProperty(exports, "getChainAddresses", { enumerable: true, get: function () { return getChainAddresses_1.getChainAddresses; } });
|
|
7
|
+
var getSupportedEngineChains_1 = require("./getSupportedEngineChains");
|
|
8
|
+
Object.defineProperty(exports, "getSupportedEngineChains", { enumerable: true, get: function () { return getSupportedEngineChains_1.getSupportedEngineChains; } });
|
|
9
|
+
Object.defineProperty(exports, "isEngineChainId", { enumerable: true, get: function () { return getSupportedEngineChains_1.isEngineChainId; } });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Provider } from "ethers";
|
|
2
|
+
export interface ILynxChainAddresses {
|
|
3
|
+
chainId: number;
|
|
4
|
+
chainName: string;
|
|
5
|
+
registryProxyAddress: string;
|
|
6
|
+
registryImplementationAddress: string;
|
|
7
|
+
tradersPortalAddress: string;
|
|
8
|
+
tradingFloorAddress: string;
|
|
9
|
+
orderBookAddress: string;
|
|
10
|
+
triggersAddress: string;
|
|
11
|
+
lexLensAddress: string;
|
|
12
|
+
tradingFloorLensAddress: string;
|
|
13
|
+
intentsVerifierLensAddress: string;
|
|
14
|
+
triggersAndPortalLensAddress: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IGetChainAddressesOptions {
|
|
17
|
+
chainId: number;
|
|
18
|
+
provider: Provider;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../lib/devex/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,6BAA6B,EAAE,MAAM,CAAC;IACtC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,EAAE,MAAM,CAAC;IAChC,0BAA0B,EAAE,MAAM,CAAC;IACnC,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare function hashContractName(contractName: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Helper function to hash role names for use in role-based access control tests
|
|
4
|
+
* @param roleName The human-readable role name
|
|
5
|
+
* @returns The keccak256 hash of the role name as a hex string
|
|
6
|
+
*/
|
|
7
|
+
export declare function hashRoleName(roleName: string): string;
|
|
2
8
|
//# sourceMappingURL=hashes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../../../../lib/lynxSystem/hashes.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAO7D"}
|
|
1
|
+
{"version":3,"file":"hashes.d.ts","sourceRoot":"","sources":["../../../../lib/lynxSystem/hashes.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAO7D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAErD"}
|