lynx-client 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -2
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
- package/dist/cjs/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.js +2 -0
- package/dist/cjs/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +255 -0
- package/dist/cjs/lib/contractsIntegration/OnBehalfTradingService/index.js +5 -0
- package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
- package/dist/cjs/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
- package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
- package/dist/cjs/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/index.js +2 -0
- package/dist/cjs/lib/contractsIntegration/deployedContractsConnector.js +17 -0
- package/dist/cjs/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +979 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +114 -29
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- 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/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +74 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.js +2 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +26 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +255 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +3 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.js +5 -0
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
- package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
- package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
- package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
- package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/index.d.ts +5 -0
- package/dist/esm/lib/contractsIntegration/common/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/index.js +2 -0
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts +5 -0
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/deployedContractsConnector.js +17 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +648 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +54 -4
- package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +750 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +979 -0
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +91 -22
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +114 -29
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- 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/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +74 -0
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +26 -0
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +3 -0
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
- package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
- package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
- package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
- package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
- package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
- package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/index.d.ts +5 -0
- package/dist/types/lib/contractsIntegration/common/index.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts +5 -0
- package/dist/types/lib/contractsIntegration/deployedContractsConnector.d.ts.map +1 -1
- package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +648 -0
- package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +54 -4
- package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +750 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -0
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +91 -22
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- 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/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Provider, Signer } from "ethers";
|
|
2
|
+
import { OnBehalfTradingV1 } from "../../typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1";
|
|
3
|
+
import { IOnBehalfTradingService, IOnBehalfTradingFunctionsGroup_PermissionQueries, IOnBehalfTradingFunctionsGroup_PermissionManagement, IOnBehalfTradingFunctionsGroup_Configuration, IOnBehalfTradingFunctionsGroup_AdminFunctions, IOnBehalfTradingFunctionsGroup_ContractReferences } from "./IOnBehalfTradingService";
|
|
4
|
+
import { ILynxVersionedContract, IPendableAdmin } from "../common";
|
|
5
|
+
/**
|
|
6
|
+
* Service for interacting with the OnBehalfTrading contract
|
|
7
|
+
* Manages delegated trading permissions between users
|
|
8
|
+
*/
|
|
9
|
+
export declare class OnBehalfTradingService implements IOnBehalfTradingService {
|
|
10
|
+
private readonly contract;
|
|
11
|
+
private readonly isSigner;
|
|
12
|
+
readonly permissionQueries: IOnBehalfTradingFunctionsGroup_PermissionQueries;
|
|
13
|
+
readonly permissionManagement: IOnBehalfTradingFunctionsGroup_PermissionManagement;
|
|
14
|
+
readonly configuration: IOnBehalfTradingFunctionsGroup_Configuration;
|
|
15
|
+
readonly adminFunctions: IOnBehalfTradingFunctionsGroup_AdminFunctions;
|
|
16
|
+
readonly contractReferences: IOnBehalfTradingFunctionsGroup_ContractReferences;
|
|
17
|
+
readonly pendableAdmin: IPendableAdmin;
|
|
18
|
+
readonly lynxVersionedContract: ILynxVersionedContract;
|
|
19
|
+
constructor(signerOrProvider: Signer | Provider, address: string);
|
|
20
|
+
/**
|
|
21
|
+
* Get the underlying contract instance
|
|
22
|
+
* Useful for accessing contract methods directly when needed
|
|
23
|
+
*/
|
|
24
|
+
getContract(): OnBehalfTradingV1;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=OnBehalfTradingService.d.ts.map
|
package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnBehalfTradingService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAErG,OAAO,EACL,uBAAuB,EACvB,gDAAgD,EAChD,mDAAmD,EACnD,4CAA4C,EAC5C,6CAA6C,EAC7C,iDAAiD,EAKlD,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AA6VnE;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,uBAAuB;IACpE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IAEnC,SAAgB,iBAAiB,EAAE,gDAAgD,CAAC;IACpF,SAAgB,oBAAoB,EAAE,mDAAmD,CAAC;IAC1F,SAAgB,aAAa,EAAE,4CAA4C,CAAC;IAC5E,SAAgB,cAAc,EAAE,6CAA6C,CAAC;IAC9E,SAAgB,kBAAkB,EAAE,iDAAiD,CAAC;IACtF,SAAgB,aAAa,EAAE,cAAc,CAAC;IAC9C,SAAgB,qBAAqB,EAAE,sBAAsB,CAAC;gBAElD,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM;IAoBhE;;;OAGG;IACH,WAAW,IAAI,iBAAiB;CAGjC"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnBehalfTradingService = void 0;
|
|
4
|
+
const OnBehalfTradingV1__factory_1 = require("../../typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory");
|
|
5
|
+
// ============ Permission Queries Implementation ============
|
|
6
|
+
class PermissionQueries {
|
|
7
|
+
constructor(contract) {
|
|
8
|
+
this.contract = contract;
|
|
9
|
+
}
|
|
10
|
+
async isPermissionValid(owner, spender, token) {
|
|
11
|
+
return await this.contract.isPermissionValid(owner, spender, token);
|
|
12
|
+
}
|
|
13
|
+
async getRemainingAmount(owner, spender, token) {
|
|
14
|
+
return await this.contract.getRemainingAmount(owner, spender, token);
|
|
15
|
+
}
|
|
16
|
+
async getPermission(owner, spender, token) {
|
|
17
|
+
const permission = await this.contract.permissions(owner, spender, token);
|
|
18
|
+
return {
|
|
19
|
+
amountLimit: permission.amountLimit,
|
|
20
|
+
amountUsed: permission.amountUsed,
|
|
21
|
+
expiryTime: permission.expiryTime,
|
|
22
|
+
isActive: permission.isActive,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
async permanentlyRevoked(owner, spender) {
|
|
26
|
+
return await this.contract.permanentlyRevoked(owner, spender);
|
|
27
|
+
}
|
|
28
|
+
async hasActivePermissions(owner) {
|
|
29
|
+
return await this.contract.hasActivePermissions(owner);
|
|
30
|
+
}
|
|
31
|
+
async getActivePermissionCount(owner) {
|
|
32
|
+
return await this.contract.getActivePermissionCount(owner);
|
|
33
|
+
}
|
|
34
|
+
async getActiveSpenders(owner) {
|
|
35
|
+
return await this.contract.getActiveSpenders(owner);
|
|
36
|
+
}
|
|
37
|
+
async getActiveTokensForSpender(owner, spender) {
|
|
38
|
+
return await this.contract.getActiveTokensForSpender(owner, spender);
|
|
39
|
+
}
|
|
40
|
+
async getAllActivePermissions(owner) {
|
|
41
|
+
const result = await this.contract.getAllActivePermissions(owner);
|
|
42
|
+
return {
|
|
43
|
+
spenders: result.spenders,
|
|
44
|
+
tokens: result.tokens,
|
|
45
|
+
permissionData: result.permissionData.map((p) => ({
|
|
46
|
+
amountLimit: p.amountLimit,
|
|
47
|
+
amountUsed: p.amountUsed,
|
|
48
|
+
expiryTime: p.expiryTime,
|
|
49
|
+
isActive: p.isActive,
|
|
50
|
+
})),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
async requirePermission(owner, spender, token) {
|
|
54
|
+
await this.contract.requirePermission(owner, spender, token);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// ============ Permission Management Implementation ============
|
|
58
|
+
class PermissionManagement {
|
|
59
|
+
constructor(contract, isSigner) {
|
|
60
|
+
this.contract = contract;
|
|
61
|
+
this.isSigner = isSigner;
|
|
62
|
+
}
|
|
63
|
+
async grantPermission(spender, token, amountLimit, duration) {
|
|
64
|
+
if (!this.isSigner) {
|
|
65
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
66
|
+
}
|
|
67
|
+
const tx = await this.contract.grantPermission(spender, token, amountLimit, duration);
|
|
68
|
+
await tx.wait();
|
|
69
|
+
}
|
|
70
|
+
async revokePermission(spender, token) {
|
|
71
|
+
if (!this.isSigner) {
|
|
72
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
73
|
+
}
|
|
74
|
+
const tx = await this.contract.revokePermission(spender, token);
|
|
75
|
+
await tx.wait();
|
|
76
|
+
}
|
|
77
|
+
async revokeAllPermissions(spender) {
|
|
78
|
+
if (!this.isSigner) {
|
|
79
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
80
|
+
}
|
|
81
|
+
const tx = await this.contract.revokeAllPermissions(spender);
|
|
82
|
+
await tx.wait();
|
|
83
|
+
}
|
|
84
|
+
async chargePermission(owner, spender, token, amount) {
|
|
85
|
+
if (!this.isSigner) {
|
|
86
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
87
|
+
}
|
|
88
|
+
const tx = await this.contract.chargePermission(owner, spender, token, amount);
|
|
89
|
+
await tx.wait();
|
|
90
|
+
}
|
|
91
|
+
async setPermissions(payloads) {
|
|
92
|
+
if (!this.isSigner) {
|
|
93
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
94
|
+
}
|
|
95
|
+
const tx = await this.contract.setPermissions(payloads);
|
|
96
|
+
await tx.wait();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// ============ Configuration Implementation ============
|
|
100
|
+
class Configuration {
|
|
101
|
+
constructor(contract) {
|
|
102
|
+
this.contract = contract;
|
|
103
|
+
}
|
|
104
|
+
async isPaused() {
|
|
105
|
+
return await this.contract.isPaused();
|
|
106
|
+
}
|
|
107
|
+
async maxPermissionDuration() {
|
|
108
|
+
return await this.contract.maxPermissionDuration();
|
|
109
|
+
}
|
|
110
|
+
async maxPermissionAmountPerToken(token) {
|
|
111
|
+
return await this.contract.maxPermissionAmountPerToken(token);
|
|
112
|
+
}
|
|
113
|
+
async getContractConfiguration(tokensToQuery) {
|
|
114
|
+
const config = await this.contract.getContractConfiguration(tokensToQuery);
|
|
115
|
+
return {
|
|
116
|
+
isPausedState: config.isPausedState,
|
|
117
|
+
maxDuration: config.maxDuration,
|
|
118
|
+
tokenMaxAmounts: config.tokenMaxAmounts,
|
|
119
|
+
registryAddress: config.registryAddress,
|
|
120
|
+
tradersPortalAddress: config.tradersPortalAddress,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// ============ Admin Functions Implementation ============
|
|
125
|
+
class AdminFunctions {
|
|
126
|
+
constructor(contract, isSigner) {
|
|
127
|
+
this.contract = contract;
|
|
128
|
+
this.isSigner = isSigner;
|
|
129
|
+
}
|
|
130
|
+
async setMaxPermissionDuration(maxDuration) {
|
|
131
|
+
if (!this.isSigner) {
|
|
132
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
133
|
+
}
|
|
134
|
+
const tx = await this.contract.setMaxPermissionDuration(maxDuration);
|
|
135
|
+
await tx.wait();
|
|
136
|
+
}
|
|
137
|
+
async setMaxPermissionAmountForToken(token, maxAmount) {
|
|
138
|
+
if (!this.isSigner) {
|
|
139
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
140
|
+
}
|
|
141
|
+
const tx = await this.contract.setMaxPermissionAmountForToken(token, maxAmount);
|
|
142
|
+
await tx.wait();
|
|
143
|
+
}
|
|
144
|
+
async setMaxPermissionAmountsForTokens(tokens, maxAmounts) {
|
|
145
|
+
if (!this.isSigner) {
|
|
146
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
147
|
+
}
|
|
148
|
+
const tx = await this.contract.setMaxPermissionAmountsForTokens(tokens, maxAmounts);
|
|
149
|
+
await tx.wait();
|
|
150
|
+
}
|
|
151
|
+
async togglePause() {
|
|
152
|
+
if (!this.isSigner) {
|
|
153
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
154
|
+
}
|
|
155
|
+
const tx = await this.contract.togglePause();
|
|
156
|
+
await tx.wait();
|
|
157
|
+
}
|
|
158
|
+
async setDynamicRoleCaller(caller, roleName) {
|
|
159
|
+
if (!this.isSigner) {
|
|
160
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
161
|
+
}
|
|
162
|
+
const tx = await this.contract.setDynamicRoleCaller(caller, roleName);
|
|
163
|
+
await tx.wait();
|
|
164
|
+
}
|
|
165
|
+
async setDynamicRoleCallers(callers, roleNames) {
|
|
166
|
+
if (!this.isSigner) {
|
|
167
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
168
|
+
}
|
|
169
|
+
const tx = await this.contract.setDynamicRoleCallers(callers, roleNames);
|
|
170
|
+
await tx.wait();
|
|
171
|
+
}
|
|
172
|
+
async setPendingAdmin(newPendingAdmin) {
|
|
173
|
+
if (!this.isSigner) {
|
|
174
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
175
|
+
}
|
|
176
|
+
const tx = await this.contract._setPendingAdmin(newPendingAdmin);
|
|
177
|
+
await tx.wait();
|
|
178
|
+
}
|
|
179
|
+
async acceptAdmin() {
|
|
180
|
+
if (!this.isSigner) {
|
|
181
|
+
throw new Error("OnBehalfTradingService: Write operations require a signer");
|
|
182
|
+
}
|
|
183
|
+
const tx = await this.contract._acceptAdmin();
|
|
184
|
+
await tx.wait();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
// ============ Contract References Implementation ============
|
|
188
|
+
class ContractReferences {
|
|
189
|
+
constructor(contract) {
|
|
190
|
+
this.contract = contract;
|
|
191
|
+
}
|
|
192
|
+
async registry() {
|
|
193
|
+
return await this.contract.registry();
|
|
194
|
+
}
|
|
195
|
+
async dynamicRoleCallers(address) {
|
|
196
|
+
return await this.contract.dynamicRoleCallers(address);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
// ============ Pendable Admin Implementation ============
|
|
200
|
+
class PendableAdmin {
|
|
201
|
+
constructor(contract) {
|
|
202
|
+
this.contract = contract;
|
|
203
|
+
}
|
|
204
|
+
async admin() {
|
|
205
|
+
return await this.contract.admin();
|
|
206
|
+
}
|
|
207
|
+
async pendingAdmin() {
|
|
208
|
+
return await this.contract.pendingAdmin();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// ============ Lynx Versioned Contract Implementation ============
|
|
212
|
+
class LynxVersionedContract {
|
|
213
|
+
constructor(contract) {
|
|
214
|
+
this.contract = contract;
|
|
215
|
+
}
|
|
216
|
+
async getContractName() {
|
|
217
|
+
return await this.contract.getContractName();
|
|
218
|
+
}
|
|
219
|
+
async getContractVersion() {
|
|
220
|
+
return await this.contract.getContractVersion();
|
|
221
|
+
}
|
|
222
|
+
async CONTRACT_NAME() {
|
|
223
|
+
return await this.contract.CONTRACT_NAME();
|
|
224
|
+
}
|
|
225
|
+
async CONTRACT_VERSION() {
|
|
226
|
+
return await this.contract.CONTRACT_VERSION();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
// ============ Main Service Class ============
|
|
230
|
+
/**
|
|
231
|
+
* Service for interacting with the OnBehalfTrading contract
|
|
232
|
+
* Manages delegated trading permissions between users
|
|
233
|
+
*/
|
|
234
|
+
class OnBehalfTradingService {
|
|
235
|
+
constructor(signerOrProvider, address) {
|
|
236
|
+
this.contract = OnBehalfTradingV1__factory_1.OnBehalfTradingV1__factory.connect(address, signerOrProvider);
|
|
237
|
+
this.isSigner = "sendTransaction" in signerOrProvider;
|
|
238
|
+
// Initialize all function groups using separate classes
|
|
239
|
+
this.permissionQueries = new PermissionQueries(this.contract);
|
|
240
|
+
this.permissionManagement = new PermissionManagement(this.contract, this.isSigner);
|
|
241
|
+
this.configuration = new Configuration(this.contract);
|
|
242
|
+
this.adminFunctions = new AdminFunctions(this.contract, this.isSigner);
|
|
243
|
+
this.contractReferences = new ContractReferences(this.contract);
|
|
244
|
+
this.pendableAdmin = new PendableAdmin(this.contract);
|
|
245
|
+
this.lynxVersionedContract = new LynxVersionedContract(this.contract);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Get the underlying contract instance
|
|
249
|
+
* Useful for accessing contract methods directly when needed
|
|
250
|
+
*/
|
|
251
|
+
getContract() {
|
|
252
|
+
return this.contract;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
exports.OnBehalfTradingService = OnBehalfTradingService;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { OnBehalfTradingService } from "./OnBehalfTradingService";
|
|
2
|
+
export type { IOnBehalfTradingService, IOnBehalfTradingFunctionsGroup_PermissionQueries, IOnBehalfTradingFunctionsGroup_PermissionManagement, IOnBehalfTradingFunctionsGroup_Configuration, IOnBehalfTradingFunctionsGroup_AdminFunctions, IOnBehalfTradingFunctionsGroup_ContractReferences, PermissionInfo, ContractConfiguration, AllActivePermissionsResult, PermissionSettingPayload, } from "./IOnBehalfTradingService";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OnBehalfTradingService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EACV,uBAAuB,EACvB,gDAAgD,EAChD,mDAAmD,EACnD,4CAA4C,EAC5C,6CAA6C,EAC7C,iDAAiD,EACjD,cAAc,EACd,qBAAqB,EACrB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OnBehalfTradingService = void 0;
|
|
4
|
+
var OnBehalfTradingService_1 = require("./OnBehalfTradingService");
|
|
5
|
+
Object.defineProperty(exports, "OnBehalfTradingService", { enumerable: true, get: function () { return OnBehalfTradingService_1.OnBehalfTradingService; } });
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BytesLike, BigNumberish, AddressLike, ContractTransactionResponse } from "ethers";
|
|
2
2
|
import { OrderBookStructsV1 } from "../../typechain/contracts/Lynx/OrderBook/OrderBookV1";
|
|
3
3
|
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
4
|
+
import { IPendableAdmin, IPendableImplementation, IProtocolConstants } from "../common";
|
|
4
5
|
type UpdatePositionFieldOrderStruct = OrderBookStructsV1.UpdatePositionFieldOrderStruct;
|
|
5
6
|
export type TUpdatePositionFieldOrderStruct = TSafeBigNumberStruct<UpdatePositionFieldOrderStruct>;
|
|
6
7
|
export interface IOrderBookFunctionsGroup_OrderManagement {
|
|
@@ -12,27 +13,22 @@ export interface IOrderBookFunctionsGroup_OrderManagement {
|
|
|
12
13
|
storeUpdatePositionSingleFieldOrder(positionId: BytesLike, orderType: BigNumberish, fieldValue: BigNumberish): Promise<ContractTransactionResponse>;
|
|
13
14
|
updateOrderIdPositionInList(positionId: BytesLike): Promise<bigint>;
|
|
14
15
|
}
|
|
15
|
-
export interface
|
|
16
|
+
export interface IOrderBookFunctionsGroup_ContractReferences {
|
|
16
17
|
registry(): Promise<string>;
|
|
17
18
|
tradingFloor(): Promise<string>;
|
|
18
|
-
admin(): Promise<string>;
|
|
19
|
-
pendingAdmin(): Promise<string>;
|
|
20
|
-
implementation(): Promise<string>;
|
|
21
|
-
pendingImplementation(): Promise<string>;
|
|
22
19
|
}
|
|
23
20
|
export interface IOrderBookFunctionsGroup_Administration {
|
|
24
21
|
setTradingFloor(tradingFloor: AddressLike): Promise<ContractTransactionResponse>;
|
|
25
22
|
_become(orderBookProxy: AddressLike): Promise<ContractTransactionResponse>;
|
|
26
23
|
}
|
|
27
|
-
export interface IOrderBookFunctionsGroup_Constants {
|
|
24
|
+
export interface IOrderBookFunctionsGroup_Constants extends IProtocolConstants {
|
|
28
25
|
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
29
|
-
FRACTION_SCALE(): Promise<bigint>;
|
|
30
|
-
LEVERAGE_SCALE(): Promise<bigint>;
|
|
31
|
-
PRECISION(): Promise<bigint>;
|
|
32
26
|
}
|
|
33
27
|
export interface IOrderBookService {
|
|
34
28
|
orderManagement: IOrderBookFunctionsGroup_OrderManagement;
|
|
35
|
-
|
|
29
|
+
contractReferences: IOrderBookFunctionsGroup_ContractReferences;
|
|
30
|
+
pendableAdmin: IPendableAdmin;
|
|
31
|
+
pendableImplementation: IPendableImplementation;
|
|
36
32
|
administration: IOrderBookFunctionsGroup_Administration;
|
|
37
33
|
constants: IOrderBookFunctionsGroup_Constants;
|
|
38
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOrderBookService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OrderBookService/IOrderBookService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"IOrderBookService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/OrderBookService/IOrderBookService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,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CAAC,CAAC;IACjF,OAAO,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,kCAAmC,SAAQ,kBAAkB;IAG5E,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,wCAAwC,CAAC;IAC1D,kBAAkB,EAAE,2CAA2C,CAAC;IAChE,aAAa,EAAE,cAAc,CAAC;IAC9B,sBAAsB,EAAE,uBAAuB,CAAC;IAChD,cAAc,EAAE,uCAAuC,CAAC;IACxD,SAAS,EAAE,kCAAkC,CAAC;CAC/C"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Signer, Provider } from "ethers";
|
|
2
|
-
import { IOrderBookService, IOrderBookFunctionsGroup_OrderManagement,
|
|
2
|
+
import { IOrderBookService, IOrderBookFunctionsGroup_OrderManagement, IOrderBookFunctionsGroup_ContractReferences, IOrderBookFunctionsGroup_Administration, IOrderBookFunctionsGroup_Constants } from "./IOrderBookService";
|
|
3
|
+
import { IPendableAdmin, IPendableImplementation } from "../common";
|
|
3
4
|
export declare class OrderBookService implements IOrderBookService {
|
|
4
5
|
private signerOrProvider;
|
|
5
6
|
private orderBookContract;
|
|
6
7
|
readonly orderManagement: IOrderBookFunctionsGroup_OrderManagement;
|
|
7
|
-
readonly
|
|
8
|
+
readonly contractReferences: IOrderBookFunctionsGroup_ContractReferences;
|
|
9
|
+
readonly pendableAdmin: IPendableAdmin;
|
|
10
|
+
readonly pendableImplementation: IPendableImplementation;
|
|
8
11
|
readonly administration: IOrderBookFunctionsGroup_Administration;
|
|
9
12
|
readonly constants: IOrderBookFunctionsGroup_Constants;
|
|
10
13
|
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
@@ -1 +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,
|
|
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,2CAA2C,EAC3C,uCAAuC,EACvC,kCAAkC,EAEnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAgIpE,qBAAa,gBAAiB,YAAW,iBAAiB;IAWtD,OAAO,CAAC,gBAAgB;IAV1B,OAAO,CAAC,iBAAiB,CAAc;IACvC,SAAgB,eAAe,EAAE,wCAAwC,CAAC;IAC1E,SAAgB,kBAAkB,EAAE,2CAA2C,CAAC;IAChF,SAAgB,aAAa,EAAE,cAAc,CAAC;IAC9C,SAAgB,sBAAsB,EAAE,uBAAuB,CAAC;IAChE,SAAgB,cAAc,EAAE,uCAAuC,CAAC;IACxE,SAAgB,SAAS,EAAE,kCAAkC,CAAC;gBAG5D,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAc9C"}
|
|
@@ -28,7 +28,7 @@ class OrderManagement {
|
|
|
28
28
|
return this.orderBookContract.updateOrderIdPositionInList(positionId);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
class
|
|
31
|
+
class ContractReferences {
|
|
32
32
|
constructor(orderBookContract) {
|
|
33
33
|
this.orderBookContract = orderBookContract;
|
|
34
34
|
}
|
|
@@ -38,12 +38,22 @@ class ContractInfo {
|
|
|
38
38
|
async tradingFloor() {
|
|
39
39
|
return this.orderBookContract.tradingFloor();
|
|
40
40
|
}
|
|
41
|
+
}
|
|
42
|
+
class PendableAdmin {
|
|
43
|
+
constructor(orderBookContract) {
|
|
44
|
+
this.orderBookContract = orderBookContract;
|
|
45
|
+
}
|
|
41
46
|
async admin() {
|
|
42
47
|
return this.orderBookContract.admin();
|
|
43
48
|
}
|
|
44
49
|
async pendingAdmin() {
|
|
45
50
|
return this.orderBookContract.pendingAdmin();
|
|
46
51
|
}
|
|
52
|
+
}
|
|
53
|
+
class PendableImplementation {
|
|
54
|
+
constructor(orderBookContract) {
|
|
55
|
+
this.orderBookContract = orderBookContract;
|
|
56
|
+
}
|
|
47
57
|
async implementation() {
|
|
48
58
|
return this.orderBookContract.implementation();
|
|
49
59
|
}
|
|
@@ -84,7 +94,9 @@ class OrderBookService {
|
|
|
84
94
|
this.signerOrProvider = signerOrProvider;
|
|
85
95
|
this.orderBookContract = OrderBookV1__factory_1.OrderBookV1__factory.connect(address, signerOrProvider);
|
|
86
96
|
this.orderManagement = new OrderManagement(this.orderBookContract);
|
|
87
|
-
this.
|
|
97
|
+
this.contractReferences = new ContractReferences(this.orderBookContract);
|
|
98
|
+
this.pendableAdmin = new PendableAdmin(this.orderBookContract);
|
|
99
|
+
this.pendableImplementation = new PendableImplementation(this.orderBookContract);
|
|
88
100
|
this.administration = new Administration(this.orderBookContract);
|
|
89
101
|
this.constants = new Constants(this.orderBookContract);
|
|
90
102
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ContractTransactionResponse } from "ethers";
|
|
2
2
|
import { PairPriceStruct } from "../../typechain/contracts/Lynx/Lex/PNLR/PNLR";
|
|
3
|
+
import { ILynxVersionedContract, IPendableAdmin } from "../common";
|
|
3
4
|
export type TPairPriceStruct = PairPriceStruct;
|
|
4
5
|
export interface IPNLRFunctionsGroup_EpochManagement {
|
|
5
6
|
advanceEpoch(pool: string, pairsPrices: TPairPriceStruct[], value?: bigint): Promise<ContractTransactionResponse>;
|
|
@@ -27,23 +28,14 @@ export interface IPNLRFunctionsGroup_AdminManagement {
|
|
|
27
28
|
_setPendingAdmin(newPendingAdmin: string): Promise<ContractTransactionResponse>;
|
|
28
29
|
_acceptAdmin(): Promise<ContractTransactionResponse>;
|
|
29
30
|
}
|
|
30
|
-
export
|
|
31
|
-
admin(): Promise<string>;
|
|
32
|
-
pendingAdmin(): Promise<string>;
|
|
33
|
-
getContractName(): Promise<string>;
|
|
34
|
-
getContractVersion(): Promise<string>;
|
|
35
|
-
}
|
|
36
|
-
export interface IPNLRFunctionsGroup_Constants {
|
|
37
|
-
CONTRACT_NAME(): Promise<string>;
|
|
38
|
-
CONTRACT_VERSION(): Promise<string>;
|
|
39
|
-
}
|
|
31
|
+
export type IPNLRFunctionsGroup_LynxVersionedContract = ILynxVersionedContract;
|
|
40
32
|
export interface IPNLRService {
|
|
41
33
|
epochManagement: IPNLRFunctionsGroup_EpochManagement;
|
|
42
34
|
pnlCalculation: IPNLRFunctionsGroup_PnLCalculation;
|
|
43
35
|
permissionManagement: IPNLRFunctionsGroup_PermissionManagement;
|
|
44
36
|
configuration: IPNLRFunctionsGroup_Configuration;
|
|
45
37
|
adminManagement: IPNLRFunctionsGroup_AdminManagement;
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
pendableAdmin: IPendableAdmin;
|
|
39
|
+
lynxVersionedContract: ILynxVersionedContract;
|
|
48
40
|
}
|
|
49
41
|
//# sourceMappingURL=IPNLRService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPNLRService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/IPNLRService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,8CAA8C,CAAA;
|
|
1
|
+
{"version":3,"file":"IPNLRService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/IPNLRService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,M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,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;IACpF,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACrD,iCAAiC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CACvD;AAED,MAAM,WAAW,iCAAiC;IAChD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAChC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;IACrE,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACjC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,mCAAmC;IAClD,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;IAC/E,YAAY,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAAA;CACrD;AAID,MAAM,MAAM,yCAAyC,GAAG,sBAAsB,CAAA;AAE9E,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,mCAAmC,CAAA;IACpD,cAAc,EAAE,kCAAkC,CAAA;IAClD,oBAAoB,EAAE,wCAAwC,CAAA;IAC9D,aAAa,EAAE,iCAAiC,CAAA;IAChD,eAAe,EAAE,mCAAmC,CAAA;IACpD,aAAa,EAAE,cAAc,CAAA;IAC7B,qBAAqB,EAAE,sBAAsB,CAAA;CAC9C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signer, Provider } from "ethers";
|
|
2
|
-
import { IPNLRService, IPNLRFunctionsGroup_EpochManagement, IPNLRFunctionsGroup_PnLCalculation, IPNLRFunctionsGroup_PermissionManagement, IPNLRFunctionsGroup_Configuration, IPNLRFunctionsGroup_AdminManagement
|
|
2
|
+
import { IPNLRService, IPNLRFunctionsGroup_EpochManagement, IPNLRFunctionsGroup_PnLCalculation, IPNLRFunctionsGroup_PermissionManagement, IPNLRFunctionsGroup_Configuration, IPNLRFunctionsGroup_AdminManagement } from "./IPNLRService";
|
|
3
|
+
import { ILynxVersionedContract, IPendableAdmin } from "../common";
|
|
3
4
|
export declare class PNLRService implements IPNLRService {
|
|
4
5
|
private pnlrContract;
|
|
5
6
|
epochManagement: IPNLRFunctionsGroup_EpochManagement;
|
|
@@ -7,8 +8,8 @@ export declare class PNLRService implements IPNLRService {
|
|
|
7
8
|
permissionManagement: IPNLRFunctionsGroup_PermissionManagement;
|
|
8
9
|
configuration: IPNLRFunctionsGroup_Configuration;
|
|
9
10
|
adminManagement: IPNLRFunctionsGroup_AdminManagement;
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
pendableAdmin: IPendableAdmin;
|
|
12
|
+
lynxVersionedContract: ILynxVersionedContract;
|
|
12
13
|
constructor(signerOrProvider: Signer | Provider, address: string);
|
|
13
14
|
}
|
|
14
15
|
//# sourceMappingURL=PNLRService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PNLRService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/PNLRService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAA+B,MAAM,QAAQ,CAAC;AAGvE,OAAO,EACL,YAAY,EACZ,mCAAmC,EACnC,kCAAkC,EAClC,wCAAwC,EACxC,iCAAiC,EACjC,mCAAmC,
|
|
1
|
+
{"version":3,"file":"PNLRService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/PNLRService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAA+B,MAAM,QAAQ,CAAC;AAGvE,OAAO,EACL,YAAY,EACZ,mCAAmC,EACnC,kCAAkC,EAClC,wCAAwC,EACxC,iCAAiC,EACjC,mCAAmC,EAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsLnE,qBAAa,WAAY,YAAW,YAAY;IAC9C,OAAO,CAAC,YAAY,CAAO;IAEpB,eAAe,EAAE,mCAAmC,CAAC;IACrD,cAAc,EAAE,kCAAkC,CAAC;IACnD,oBAAoB,EAAE,wCAAwC,CAAC;IAC/D,aAAa,EAAE,iCAAiC,CAAC;IACjD,eAAe,EAAE,mCAAmC,CAAC;IACrD,aAAa,EAAE,cAAc,CAAC;IAC9B,qBAAqB,EAAE,sBAAsB,CAAC;gBAEzC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM;CAqBjE"}
|
|
@@ -70,7 +70,7 @@ class PNLRFunctionsGroup_Configuration {
|
|
|
70
70
|
return this.contract.priceValidatorType();
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
class
|
|
73
|
+
class PNLRFunctionsGroup_PendableAdmin {
|
|
74
74
|
constructor(contract) {
|
|
75
75
|
this.contract = contract;
|
|
76
76
|
}
|
|
@@ -80,12 +80,6 @@ class PNLRFunctionsGroup_ContractInfo {
|
|
|
80
80
|
async pendingAdmin() {
|
|
81
81
|
return this.contract.pendingAdmin();
|
|
82
82
|
}
|
|
83
|
-
async getContractName() {
|
|
84
|
-
return this.contract.getContractName();
|
|
85
|
-
}
|
|
86
|
-
async getContractVersion() {
|
|
87
|
-
return this.contract.getContractVersion();
|
|
88
|
-
}
|
|
89
83
|
}
|
|
90
84
|
class PNLRFunctionsGroup_AdminManagement {
|
|
91
85
|
constructor(contract) {
|
|
@@ -98,10 +92,16 @@ class PNLRFunctionsGroup_AdminManagement {
|
|
|
98
92
|
return this.contract._acceptAdmin();
|
|
99
93
|
}
|
|
100
94
|
}
|
|
101
|
-
class
|
|
95
|
+
class PNLRFunctionsGroup_LynxVersionedContract {
|
|
102
96
|
constructor(contract) {
|
|
103
97
|
this.contract = contract;
|
|
104
98
|
}
|
|
99
|
+
async getContractName() {
|
|
100
|
+
return this.contract.getContractName();
|
|
101
|
+
}
|
|
102
|
+
async getContractVersion() {
|
|
103
|
+
return this.contract.getContractVersion();
|
|
104
|
+
}
|
|
105
105
|
async CONTRACT_NAME() {
|
|
106
106
|
return this.contract.CONTRACT_NAME();
|
|
107
107
|
}
|
|
@@ -117,8 +117,8 @@ class PNLRService {
|
|
|
117
117
|
this.permissionManagement = new PNLRFunctionsGroup_PermissionManagement(this.pnlrContract);
|
|
118
118
|
this.configuration = new PNLRFunctionsGroup_Configuration(this.pnlrContract);
|
|
119
119
|
this.adminManagement = new PNLRFunctionsGroup_AdminManagement(this.pnlrContract);
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
120
|
+
this.pendableAdmin = new PNLRFunctionsGroup_PendableAdmin(this.pnlrContract);
|
|
121
|
+
this.lynxVersionedContract = new PNLRFunctionsGroup_LynxVersionedContract(this.pnlrContract);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
exports.PNLRService = PNLRService;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { IPNLRService, IPNLRFunctionsGroup_EpochManagement, IPNLRFunctionsGroup_PnLCalculation, IPNLRFunctionsGroup_PermissionManagement, IPNLRFunctionsGroup_Configuration, IPNLRFunctionsGroup_AdminManagement,
|
|
1
|
+
export type { IPNLRService, IPNLRFunctionsGroup_EpochManagement, IPNLRFunctionsGroup_PnLCalculation, IPNLRFunctionsGroup_PermissionManagement, IPNLRFunctionsGroup_Configuration, IPNLRFunctionsGroup_AdminManagement, TPairPriceStruct } from "./IPNLRService";
|
|
2
2
|
export { PNLRService } from "./PNLRService";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,mCAAmC,EACnC,kCAAkC,EAClC,wCAAwC,EACxC,iCAAiC,EACjC,mCAAmC,EACnC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PNLRService/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,mCAAmC,EACnC,kCAAkC,EAClC,wCAAwC,EACxC,iCAAiC,EACjC,mCAAmC,EACnC,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
|
package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BytesLike, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import { IProtocolConstants } from "../common";
|
|
2
3
|
export type TAccrueFundingValuesOutput = {
|
|
3
4
|
freshened: boolean;
|
|
4
5
|
valueLong: bigint;
|
|
@@ -136,11 +137,8 @@ export interface IPoolAccountantV1FunctionsGroup_ContractInfo {
|
|
|
136
137
|
pendingImplementation(): Promise<string>;
|
|
137
138
|
registry(): Promise<string>;
|
|
138
139
|
}
|
|
139
|
-
export interface IPoolAccountantV1FunctionsGroup_Constants {
|
|
140
|
+
export interface IPoolAccountantV1FunctionsGroup_Constants extends IProtocolConstants {
|
|
140
141
|
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
141
|
-
FRACTION_SCALE(): Promise<bigint>;
|
|
142
|
-
LEVERAGE_SCALE(): Promise<bigint>;
|
|
143
|
-
PRECISION(): Promise<bigint>;
|
|
144
142
|
}
|
|
145
143
|
export interface IPoolAccountantV1Service {
|
|
146
144
|
tradeUtilities: IPoolAccountantV1FunctionsGroup_TradeUtilities;
|
package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IPoolAccountantV1Service.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"IPoolAccountantV1Service.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAG9C,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,oBAAoB,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAKD,MAAM,WAAW,8CAA8C;IAE7D,gBAAgB,CACd,UAAU,EAAE,MAAM,EAClB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,MAAM,CAAC,CAAA;IAGlB,sBAAsB,CACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAAA;CACnB;AAED,MAAM,WAAW,4CAA4C;IAE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